Email for Claude Code

Fluxmail is a self-hosted MCP server that lets Claude Code search, read, draft, and send email in your Gmail, Outlook, Exchange, or IMAP mailboxes. It runs on your machine, and you decide which mailboxes and actions Claude Code can use.

What you can do

Morning inbox brief

Ask Claude Code to summarize unread mail from the last day, group it by sender or project, and list what needs a reply.

Find messages and attachments

Describe the message you need. Claude Code turns it into a Fluxmail search across your mailboxes, opens the thread, and can download an attachment to read alongside your code.

Draft replies for review

Have Claude Code draft a reply in your mailbox. You read it in your mail client and send it, or allow sending once you trust the workflow.

Connect Claude Code to your email

  1. 1. Install Fluxmail and connect a mailbox

    Install the CLI, create the first administrator, and connect a mailbox. Use outlook or imap instead of gmail for other providers. 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 Claude Code

    When Fluxmail and Claude Code run on the same computer, add the stdio server:

    claude mcp add fluxmail -- fluxmail stdio
  3. Or connect over HTTP

    When Fluxmail runs in Docker or on another machine, create an API key with fluxmail apikey create --name claude-code. Start the server with fluxmail serve unless Docker is already running it, then connect over Streamable HTTP:

    claude mcp add --transport http fluxmail http://localhost:8977/mcp \
      --header "Authorization: Bearer fmk_..."

Add --profile read-only to the stdio command if Claude Code should only search and read. For HTTP, the API key holds the permission profile, so you can change it later without editing the Claude Code config.

Run claude mcp list to confirm the server is connected, then ask Claude Code for the five latest emails in your inbox.

See Permissions for every profile and capability, and the Claude Code MCP docs for client settings.

Common questions

Does Claude Code have built-in Gmail access?
Claude Code connects to email through MCP servers you add. Fluxmail is one option. It works with Gmail and also with Outlook, Exchange, and IMAP mailboxes.
Can Claude Code send email through Fluxmail?
Yes, when the connection allows the mail.send capability. The default full profile allows it. With the read-write profile, Claude Code can draft but not send.
Where is my email stored?
Fluxmail runs on your computer or server and connects directly to your email provider. Provider credentials are encrypted in a local SQLite database. Claude Code sends the email content it reads to Anthropic, as it does with any tool output.

Reviewed

Build on top of email

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