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.

Reply without switching apps

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

Connect Cursor to your email

  1. 1. Install Fluxmail and connect a mailbox

    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 every profile and capability, and the Cursor MCP docs for client settings.

Read an attachment alongside your code

The setup above uses read-only access. Try this prompt 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 default full profile allows it. Use the read-write profile if Cursor should draft without sending.
Does Fluxmail work with Cursor on Windows and Linux?
Yes. Fluxmail runs anywhere Node.js 20.20.x or 22.22 and newer runs, and it can also run in Docker. Cursor connects to it through stdio or Streamable HTTP.

Reviewed

Build on top of email

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