Email for Cursor

Fluxmail lets Cursor's agent search, read, draft, and send email in your Gmail, Outlook, Exchange, or IMAP mailboxes. Add it once in mcp.json for every project, or per project when only one codebase needs email.

What you can do

Bring a report into the editor

Have Cursor's agent read the email with the error report or feature request and start working from its details.

Review attachments

Download a CSV, log, or PDF attachment from a message so the agent can inspect it next to your code.

Send email from Cursor

Ask the agent to reply to a thread or write a new message. Review the draft in your mail client, or let Cursor send it if the connection allows sending.

Connect Cursor to your email

Set up with Cursor

Paste this prompt into Cursor from the project where you want to use email. It installs Fluxmail, asks which mailboxes to connect and what Cursor may do, configures the connection, and checks that it works. You enter passwords and approve provider access yourself.

Setup prompt
Set up Fluxmail Self-Hosted for this project. Read https://fluxmail.ai/docs/self-hosted/setup.txt and follow the setup guide. Ask me where I want to run it, which mailboxes to connect, and what the agent should be allowed to do. Configure my client and verify the connection without reading message bodies or changing mail. Guide me through password entry and provider consent.

Or set it up manually

  1. 1. Install Fluxmail and connect a mailbox

    Fluxmail Self-Hosted runs on your own computer or server. Install the CLI, create the first administrator, and connect Gmail with the local OAuth flow. Outlook needs a Microsoft app registration; IMAP needs provider credentials. The quickstart covers Docker and provider setup.

    npm install -g fluxmail
    fluxmail setup --name "Your name" --email you@example.com
    fluxmail accounts add gmail
  2. 2. Add Fluxmail to Cursor

    Add the stdio server to ~/.cursor/mcp.json, or to .cursor/mcp.json in a project:

    {
      "mcpServers": {
        "fluxmail": {
          "command": "fluxmail",
          "args": ["stdio", "--profile", "read-only"]
        }
      }
    }
  3. Or connect over HTTP

    To connect over Streamable HTTP, create an API key with fluxmail apikey create --name cursor --profile read-only. Start the server with fluxmail serve unless Docker is already running it, then use the server URL instead:

    {
      "mcpServers": {
        "fluxmail": {
          "url": "http://localhost:8977/mcp",
          "headers": { "Authorization": "Bearer fmk_..." }
        }
      }
    }

If Cursor cannot find the fluxmail command, use the absolute path printed by which fluxmail. Desktop apps sometimes start with a limited PATH.

The setup above grants read-only access. Replace read-only with read-write in args to draft and organize without sending.

See Permissions for what each permission allows, and the Cursor MCP docs for client settings.

Read an attachment alongside your code

This prompt only reads mail. Try it with a mailbox you connected:

Find the email with subject [replace with a subject you know has an attachment]. List the attached files, then read the CSV attachment and summarize its columns. Do not send mail or change messages.

Check the result

The filename and columns should match the CSV you see in your mail client. If the client cannot fetch an MCP resource link, ask it to download the attachment with inline: true; large files may still exceed provider or client limits.

To create drafts, change the stdio profile or HTTP key to read-write and reconnect. That profile also allows organizing and trashing mail, but cannot send or permanently delete messages. Review a draft in your mail client before sending it yourself.

Extract invoice data from email attachments

If the connection does not work

  • Check that Fluxmail is enabled in Cursor MCP settings and that the current agent session lists its tools. A project configuration applies only when that project is open.
  • If the server connects but no mailbox appears, run fluxmail accounts list as the same operating-system user. Check the instance, member, and mailbox scope used by the client.
  • For a command-not-found error, use the absolute path to the installed Fluxmail executable. For HTTP 401, check the API key and Authorization header. For a permission error, check the key or stdio profile before retrying.
Troubleshoot provider authentication and client access

Common questions

Should I configure Fluxmail globally or per project?
Use ~/.cursor/mcp.json when you want email in every project. Use .cursor/mcp.json in a repository when only that project needs it, and keep API keys out of version control.
Can Cursor send email?
Yes, if the connection allows the mail.send capability. The setup above uses read-only, so change the profile to full to allow sending. Cursor's agent can then send a new message, reply in a thread, or forward an email, and it goes out from your own Gmail, Outlook, or IMAP mailbox. Use the read-write profile if Cursor should write drafts for you to send.
Does Fluxmail work with Cursor on Windows and Linux?
Yes. Fluxmail requires Node.js 22.22 or newer and runs on macOS, Linux, and Windows. You can also run it in Docker. Cursor connects through stdio or Streamable HTTP.

Reviewed

Connect your agent to your email

Run Fluxmail on your own infrastructure and use it through MCP, REST API, or CLI.