Fluxmail

Overview

How Fluxmail connects agents and apps to Gmail, Outlook, and IMAP through MCP, REST API, and CLI.

Fluxmail is self-hosted email infrastructure for agents and apps. It connects to Gmail, Microsoft 365, Outlook.com, and IMAP/SMTP mailboxes, then provides one service for working with them.

Features

  • ๐Ÿ“ฌ Connect Gmail, Google Workspace, Microsoft 365, Outlook.com, and IMAP/SMTP mailboxes to one instance.
  • ๐Ÿค– Give agents MCP tools to list, search, read, draft, reply, forward, send, schedule, and organize email.
  • ๐Ÿ”Œ Use the same mailbox operations from the versioned REST API and CLI.
  • ๐Ÿงต Fetch complete messages and threads, work across several mailboxes, and download attachments.
  • ๐Ÿ—‚๏ธ Mark mail as read, star or archive it, move it between folders, send it to Trash, and manage Gmail labels or Outlook categories.
  • ๐Ÿ” Limit each client to selected mailboxes and actions with permission profiles or custom policies.
  • ๐Ÿ‘ฅ Add members and share selected mailboxes on Team and Enterprise plans.
  • ๐Ÿ  Run Fluxmail locally or in Docker while keeping its database and encrypted provider credentials on your infrastructure.

Choose an interface

InterfaceUse it for
MCPGive AI agents tools to read, search, draft, send, and organize email.
REST APIAdd email to apps, internal tools, and backend workflows through a versioned JSON API.
CLIInstall and run Fluxmail, connect mailboxes, manage members and access, and create API keys.

MCP and REST use the same mailbox operations, permissions, and provider integrations. The CLI configures and runs that service. You do not need a separate Gmail, Microsoft Graph, or IMAP integration for each client.

How it works

You run Fluxmail on your computer or on a server you control. Agents connect over MCP, apps use the REST API, and the CLI manages either a local or remote named instance. The CLI signs in as a Fluxmail member. Local MCP clients use that member session over stdio, while remote MCP clients use a scoped API key over Streamable HTTP.

Local agents   -> authenticated MCP stdio session -> Fluxmail -> Gmail API
Remote agents  -> scoped MCP HTTP API key --------->          -> Microsoft Graph
Apps and jobs  -> REST API ------------------------>          -> IMAP and SMTP
CLI operators  -> authenticated control plane ---->

Fluxmail stores its SQLite database and encrypted provider credentials on the machine where it runs. It does not copy email content to a service operated by Fluxmail. An MCP client may send content returned by Fluxmail to its model provider, depending on how that client works.

Supported mailboxes

ProviderConnection methodNotes
Gmail and Google WorkspaceGmail API with OAuthFluxmail includes an OAuth app for local connections. Hosted connections need your own Google Cloud app.
Microsoft 365 and Outlook.comMicrosoft Graph with OAuthYou create and control the Microsoft Entra app registration.
Other email providersIMAP for reading and SMTP for sendingThe provider must allow IMAP and SMTP access. Some providers require an app password.

These guides use mailbox for a connected email address. The CLI and API call the same resource an account, so commands such as fluxmail accounts list and fields such as accountId keep that name.

You can connect several mailboxes to one Fluxmail instance. Members and mailbox access rules decide which mailboxes each person can reach. Permission profiles separately control whether a client can only read mail, manage drafts and folders, or send and permanently delete messages.

Choose where to run it

SetupBest forAvailable interfaces
Local processOne person using an agent on the same computerMCP over stdio, plus the CLI
Local HTTP serverLocal apps, scripts, or MCP clients that connect by URLREST API, MCP over Streamable HTTP, plus the CLI
Docker serverRemote access, shared instances, or several clientsREST API, MCP over Streamable HTTP, plus the CLI

The Quickstart installs Fluxmail and connects the first mailbox. See Deploy with Docker for a remote or shared server. Authentication and instances explains member sessions, remote CLI profiles, and API keys. For provider-specific steps, see Connect Gmail / Google Workspace, Connect Outlook / Exchange, or Connect IMAP/SMTP.

Last updated