← Back to blog

Introducing Fluxmail MCP: connect email to your AI agent

announcements

Today we're releasing Fluxmail MCP, a self-hosted Model Context Protocol (MCP) server that connects your email to the AI agent you already use. It works with Gmail and IMAP/SMTP mailboxes, giving any compatible MCP client one set of tools to read, search, draft, send, and organize mail.

Why we built it

We built Fluxmail Mail as our take on what an AI email client should be. But plenty of people already work from an agent all day. They want to handle email from that same conversation, whether they're catching up on a project, preparing for a meeting, or clearing their inbox between coding tasks.

MCP makes that connection possible. The messy part is everything behind it. Gmail uses labels, IMAP uses folders, providers disagree about threads, and a reply-all is easy to get subtly wrong. Fluxmail handles those differences on the server so the agent sees one consistent email model.

That means you can ask your agent to:

  • Find unread messages from a customer and summarize the open questions.
  • Pull up the full thread before drafting a reply.
  • Create a draft for you to review, or send and schedule mail when you allow it.
  • Archive, label, star, move, or trash messages in batches.
  • Forward a message with its original attachments.

For example, ask: "Find the unread messages from Acme this week, summarize the open questions, and draft replies without sending them." Fluxmail searches the mailbox, opens the relevant threads, and leaves the drafts ready for review.

Fluxmail MCP includes 16 tools in total, including full-text search, draft management, scheduled sending, attachment downloads, and account health checks.

One server for all your mailboxes

Fluxmail works with Gmail and Google Workspace through OAuth. It also connects to providers that support IMAP and SMTP, including mailboxes on custom domains.

The tools stay the same regardless of which provider sits underneath. An agent can search across accounts, open a thread, and draft a reply without learning a different API for each mailbox.

Run it where you want

For a local setup, your MCP client launches Fluxmail over stdio when it needs it. If you want remote access or a shared instance, the Docker image serves the same tools over Streamable HTTP.

Fluxmail uses SQLite for local state. OAuth tokens and mailbox passwords are encrypted at rest with AES-256-GCM. Your Gmail connection uses a Google OAuth app that you own, and you choose the machine or server where Fluxmail runs.

You also choose what each agent is allowed to do. A connection can be read-only, read-write without sending, or full access. Custom permissions can separate reading, drafting, organizing, sending, trashing, and permanent deletion.

Get started

First, create a Google OAuth app and add its credentials to Fluxmail. Then install the CLI and connect Gmail:

npm install -g fluxmail
fluxmail accounts add gmail

Then add Fluxmail to your MCP client. For example, with Claude Code:

claude mcp add fluxmail -- fluxmail stdio

The same local server works with Codex and other stdio clients. Docker is available for clients that connect over HTTP. The quickstart has setup instructions for Gmail, IMAP, Claude, Codex, Cursor, Hermes, Gemini CLI, and remote deployments.

Fluxmail MCP is free to self-host on the Personal plan, which includes three connected mailboxes for one person. Pro adds more mailboxes, while Team adds members and shared mailboxes.

The server is available now on npm, as a Docker image, and as source-available software on GitHub under the Fluxmail license.

Connect your inbox, then ask your agent: "Which unread emails need a reply? Summarize them and draft responses, but don't send anything yet."