llms.txt
# Fluxmail
> Self-hosted email infrastructure for agents and apps. Access your Gmail, Outlook, Exchange, and IMAP email accounts through MCP, REST API, or CLI.
Fluxmail is self-hosted email infrastructure for agents and apps. It connects Gmail, Outlook, Exchange, and IMAP mailboxes through MCP, a versioned REST API, and a CLI. All three interfaces can search, read, draft, send, schedule, and organize email. AI agents can connect over local stdio or Streamable HTTP, while apps and backend workflows can use REST. The CLI includes Fluxmail-managed Gmail OAuth and also accepts custom Google credentials. Fluxmail encrypts provider credentials in local storage. Installation instructions are available at /docs/quickstart.
Fluxmail Desktop is a free, open-source email client for macOS with public releases on GitHub, linked from /desktop. It runs the Fluxmail engine inside the app and connects directly to Gmail, Outlook, and IMAP providers, with no Fluxmail server in between. It shares connected accounts with the Fluxmail CLI and MCP server, so people and agents can work with the same mailboxes.
Fluxmail Cloud provides hosted MCP and REST access to existing mailboxes at cloud.fluxmail.ai. Cloud uses separate mailbox connections, OAuth authorization for MCP clients, and scoped agent keys for REST automation. Cloud documentation is at /docs/cloud, with a pasteable agent setup prompt at /docs/cloud/quickstart#agent-first-setup and a Cloud-only plain-text guide at /docs/cloud/llms.txt. Cloud offers Pro and Business subscriptions, a seven-day trial on a workspace's first subscription, and workspace invitations on Business. Cloud scheduling and remote CLI configuration are not implemented.
## Key facts
- Self-hosted server: Fluxmail packages its CLI, MCP server, and REST API in the `fluxmail` npm package (Node.js 20.20.x or 22.22+) and a Docker image, with source available on GitHub.
- Self-hosted transports: `fluxmail stdio` connects local agents (Claude Code, Claude Desktop, Cursor, Codex, Gemini CLI, VS Code Copilot); `fluxmail serve` runs a Streamable HTTP MCP endpoint authenticated with `fmk_` API keys.
- Self-hosted email operations: MCP, REST API, and CLI can read and search threads, manage drafts, send and forward email, organize messages, and handle attachments.
- Gmail OAuth: the Fluxmail CLI includes a managed OAuth flow and a bundled local OAuth client, and it also accepts custom Google credentials.
- Self-hosted privacy: Google and Microsoft OAuth tokens and IMAP/SMTP passwords are stored locally in SQLite and encrypted with AES-256-GCM, with no Fluxmail cloud involved.
- Self-hosted providers: Gmail, Google Workspace, Outlook, Exchange, and mailboxes with IMAP and SMTP access are supported today.
- Self-hosted pricing: the free Personal plan includes 1 member and 3 mailboxes; Pro is $15/month or $120/year (1 member, 10 mailboxes); Business is $25/month or $240/year per member (up to 100 members, with 20 mailbox connections per member added to the instance limit); Enterprise is custom (contact sales).
- Fluxmail Desktop status: the desktop email client has public releases available on GitHub.
- Fluxmail Desktop architecture: the app runs the Fluxmail engine in its own process, connects directly to the mail provider, and shares the accounts in `~/.fluxmail` with the Fluxmail CLI and MCP server.
## Pages
- [Home](https://fluxmail.ai/): Self-hosted email infrastructure for agents and apps, available through MCP, REST API, and CLI
- [Fluxmail Cloud](https://fluxmail.ai/cloud): Hosted MCP and REST access to Gmail, Outlook, and IMAP mailboxes, with per-agent mailbox and permission approval
- [Fluxmail Desktop](https://fluxmail.ai/desktop): Free, open-source Mac email client that connects directly to Gmail, Outlook, and IMAP and shares accounts with the Fluxmail CLI and MCP server
- [Pricing](https://fluxmail.ai/pricing): Plans, pricing, and FAQ for self-hosted Fluxmail and Fluxmail Cloud
- [Docs](https://fluxmail.ai/docs): Product documentation and how-to guides
- [Integrations](https://fluxmail.ai/integrations): Setup guides for Claude Code, Codex, Cursor, and other MCP clients
- [Compare](https://fluxmail.ai/compare): Fluxmail compared with other email MCP servers, connectors, and email APIs
- [Security](https://fluxmail.ai/security): Data location, credential encryption, access control, audit events, license checks, and telemetry
- [Blog](https://fluxmail.ai/blog): Product updates and email productivity tips
- [Privacy Policy](https://fluxmail.ai/privacy): How Fluxmail handles personal data
- [Terms of Service](https://fluxmail.ai/terms): Legal terms of use
## Integrations
- [Email for Claude Code](https://fluxmail.ai/integrations/claude-code): Give Claude Code access to Gmail, Outlook, Exchange, or IMAP with a self-hosted MCP server. One command to connect, with read-only and send permissions you control.
- [Email for Codex](https://fluxmail.ai/integrations/codex): Connect Codex CLI or the Codex app to Gmail, Outlook, Exchange, or IMAP with a self-hosted MCP server. Set up with one command or a few lines of config.toml.
- [Email for Cursor](https://fluxmail.ai/integrations/cursor): Add email to Cursor with a self-hosted MCP server for Gmail, Outlook, Exchange, and IMAP. Configure it globally or per project in mcp.json.
## Comparisons
- [Fluxmail vs Gmail MCP Server](https://fluxmail.ai/compare/gmail-mcp): Compare Gmail MCP pricing, personal Gmail access, and setup. Fluxmail has a free self-hosted plan; Google's server requires Workspace preview enrollment.
- [Fluxmail vs Work IQ MCP](https://fluxmail.ai/compare/outlook-mcp): Looking for an Outlook MCP server? Compare Fluxmail and Microsoft's Work IQ MCP on hosting, providers, email tools, permissions, setup, and cost.
- [Fluxmail vs AgentMail](https://fluxmail.ai/compare/agentmail): Compare Fluxmail and AgentMail as an email API for AI agents: new agent inboxes or your existing mailboxes, MCP, REST, webhooks, permissions, and pricing.
- [Fluxmail vs EmailEngine](https://fluxmail.ai/compare/emailengine): Compare Fluxmail and EmailEngine on MCP, REST, webhooks, providers, permissions, deployment, and pricing for self-hosted email infrastructure.
- [Fluxmail vs ChatGPT Gmail](https://fluxmail.ai/compare/chatgpt-gmail): Compare Fluxmail with the ChatGPT Gmail app on setup, email actions, providers, privacy, MCP access, and the best fit for your workflow.
- [Fluxmail vs Claude Gmail](https://fluxmail.ai/compare/claude-gmail): Compare Claude's built-in Gmail integration with Fluxmail on sending, attachments, Outlook and IMAP support, and setup, and see when the built-in one is enough.
- [Fluxmail vs Composio Gmail](https://fluxmail.ai/compare/composio-gmail): Compare Fluxmail and Composio Gmail on MCP hosting, OAuth, email tools, providers, permissions, pricing, and multi-app agent workflows.
## Documentation
A plain-text version of every doc is available at https://fluxmail.ai/docs/llms-full.txt
Self-hosted setup instructions for coding agents: https://fluxmail.ai/docs/self-hosted/setup.txt
Self-hosted guides and reference only: https://fluxmail.ai/docs/self-hosted/llms.txt
### Fluxmail Self-Hosted
- [Architecture](https://fluxmail.ai/docs/architecture): Where Fluxmail keeps your data and how MCP, REST, and CLI requests reach each email provider.
- [Authentication and instances](https://fluxmail.ai/docs/authentication-and-instances): Log in to local and remote Fluxmail instances, enroll members, manage sessions, and create API keys.
- [Back up and restore](https://fluxmail.ai/docs/backup-and-restore): Preserve the database and encryption key, then restore an installation from a complete backup.
- [Build with REST](https://fluxmail.ai/docs/build-with-rest): Create a scoped key, verify provider access, and read your first inbox messages.
- [Configuration](https://fluxmail.ai/docs/configuration): Deployment configuration, encrypted instance settings, outbound proxies, local logging, secret files, and telemetry controls.
- [Connect IMAP/SMTP](https://fluxmail.ai/docs/connect-an-imap-mailbox): Connect any mailbox with IMAP and SMTP access, set its security options, and correct special-folder mappings.
- [Connect an MCP client](https://fluxmail.ai/docs/connect-an-mcp-client): Choose your MCP client, configure local or HTTP access, and verify the mailbox connection.
- [Connect Gmail / Google Workspace](https://fluxmail.ai/docs/connect-gmail-to-mcp): Connect a Gmail or Google Workspace mailbox, configure Google OAuth, and reconnect expired tokens.
- [Connect Outlook / Exchange](https://fluxmail.ai/docs/connect-outlook-to-mcp): Register a Microsoft Entra application for Microsoft 365 or Outlook.com.
- [Deploy with Docker](https://fluxmail.ai/docs/deploy-with-docker): Run a persistent Fluxmail server, configure HTTPS, and verify a client connection.
- [Email search](https://fluxmail.ai/docs/email-search): Use the same portable search syntax with Fluxmail CLI, MCP, and REST clients.
- [Local logs](https://fluxmail.ai/docs/logging): Find and configure Fluxmail local logs without allowing unbounded disk use.
- [Fluxmail Self-Hosted](https://fluxmail.ai/docs/self-hosted): Connect your existing mailboxes to agents and apps with a Fluxmail server you control.
- [Permissions](https://fluxmail.ai/docs/permissions): Give each MCP or REST connection only the Fluxmail email permissions it needs.
- [Quickstart](https://fluxmail.ai/docs/quickstart): Install Fluxmail, connect a mailbox, and verify your first agent or CLI connection.
- [Send from another address](https://fluxmail.ai/docs/send-as-addresses): Use an existing Gmail, Outlook, or IMAP alias when you draft, reply, forward, send, or schedule a message.
- [Sending and retries](https://fluxmail.ai/docs/sending-and-retries): Preview a send, track its delivery, and retry without sending a duplicate.
- [Teams & plans](https://fluxmail.ai/docs/teams-and-plans): Add members, set mailbox access, and raise the limits on a self-hosted Fluxmail instance.
- [Telemetry](https://fluxmail.ai/docs/telemetry): See what usage data Fluxmail sends and how to turn it off.
- [Troubleshooting](https://fluxmail.ai/docs/troubleshooting): Fix common Fluxmail installation, mailbox connection, and authentication problems.
- [Upgrade Fluxmail](https://fluxmail.ai/docs/upgrade-fluxmail): Back up an installation, check client compatibility, and verify an upgrade.
- [Use the CLI](https://fluxmail.ai/docs/use-the-cli): Read and manage email, then configure the Fluxmail instance from the same command line.
- [fluxmail accounts access](https://fluxmail.ai/docs/cli/accounts-access): Set who can access a mailbox
- [fluxmail accounts add](https://fluxmail.ai/docs/cli/accounts-add): Connect a Gmail, Outlook, or IMAP account
- [fluxmail accounts assign](https://fluxmail.ai/docs/cli/accounts-assign): Change mailbox ownership
- [fluxmail accounts configure](https://fluxmail.ai/docs/cli/accounts-configure): Set special folder paths for an IMAP account
- [fluxmail accounts list](https://fluxmail.ai/docs/cli/accounts-list): List connected accounts
- [fluxmail accounts remove](https://fluxmail.ai/docs/cli/accounts-remove): Disconnect an account and delete its stored tokens
- [fluxmail accounts send-as add](https://fluxmail.ai/docs/cli/accounts-send-as-add): Add a configured Outlook or IMAP sender address
- [fluxmail accounts send-as list](https://fluxmail.ai/docs/cli/accounts-send-as-list): List available sender addresses
- [fluxmail accounts send-as remove](https://fluxmail.ai/docs/cli/accounts-send-as-remove): Remove a configured Outlook or IMAP sender address
- [fluxmail accounts send-as](https://fluxmail.ai/docs/cli/accounts-send-as): Manage sender addresses
- [fluxmail accounts](https://fluxmail.ai/docs/cli/accounts): Manage connected email accounts
- [fluxmail apikey accounts](https://fluxmail.ai/docs/cli/apikey-accounts): Replace or clear an API key mailbox allowlist
- [fluxmail apikey capabilities](https://fluxmail.ai/docs/cli/apikey-capabilities): List capabilities for API key permission policies
- [fluxmail apikey create](https://fluxmail.ai/docs/cli/apikey-create): Create an API key (shown once)
- [fluxmail apikey list](https://fluxmail.ai/docs/cli/apikey-list): List API keys
- [fluxmail apikey permissions](https://fluxmail.ai/docs/cli/apikey-permissions): Change the permissions for an API key
- [fluxmail apikey revoke](https://fluxmail.ai/docs/cli/apikey-revoke): Revoke an API key
- [fluxmail apikey](https://fluxmail.ai/docs/cli/apikey): Manage API keys for the HTTP MCP and REST APIs
- [fluxmail attachments download](https://fluxmail.ai/docs/cli/attachments-download): Download an attachment
- [fluxmail attachments](https://fluxmail.ai/docs/cli/attachments): Download message attachments
- [fluxmail auth recover-admin](https://fluxmail.ai/docs/cli/auth-recover-admin): Reset an administrator password using local filesystem access
- [fluxmail auth revoke-session](https://fluxmail.ai/docs/cli/auth-revoke-session): Revoke one of the current member's sessions
- [fluxmail auth sessions](https://fluxmail.ai/docs/cli/auth-sessions): List sessions for the current member
- [fluxmail auth](https://fluxmail.ai/docs/cli/auth): Manage interactive authentication
- [fluxmail config init](https://fluxmail.ai/docs/cli/config-init): Create config.toml in the Fluxmail data directory
- [fluxmail config migrate](https://fluxmail.ai/docs/cli/config-migrate): Import settings from an env file without deleting it
- [fluxmail config show](https://fluxmail.ai/docs/cli/config-show): Show effective configuration, sources, paths, and restart requirements
- [fluxmail config](https://fluxmail.ai/docs/cli/config): Inspect and initialize deployment configuration
- [fluxmail drafts create](https://fluxmail.ai/docs/cli/drafts-create): Create a draft
- [fluxmail drafts delete](https://fluxmail.ai/docs/cli/drafts-delete): Delete a draft
- [fluxmail drafts get](https://fluxmail.ai/docs/cli/drafts-get): Read a draft
- [fluxmail drafts update](https://fluxmail.ai/docs/cli/drafts-update): Replace the content of a draft
- [fluxmail drafts](https://fluxmail.ai/docs/cli/drafts): Create and manage drafts
- [fluxmail emails delivery-status](https://fluxmail.ai/docs/cli/emails-delivery-status): Check a send or forward outcome
- [fluxmail emails forward](https://fluxmail.ai/docs/cli/emails-forward): Forward a message
- [fluxmail emails get](https://fluxmail.ai/docs/cli/emails-get): Get a complete message
- [fluxmail emails list](https://fluxmail.ai/docs/cli/emails-list): List and filter messages
- [fluxmail emails modify](https://fluxmail.ai/docs/cli/emails-modify): Apply one action to one or more messages
- [fluxmail emails preview](https://fluxmail.ai/docs/cli/emails-preview): Preview sender, recipients, and attachments
- [fluxmail emails search-batch](https://fluxmail.ai/docs/cli/emails-search-batch): Search multiple email accounts
- [fluxmail emails search](https://fluxmail.ai/docs/cli/emails-search): Search messages
- [fluxmail emails send](https://fluxmail.ai/docs/cli/emails-send): Send or schedule a message
- [fluxmail emails](https://fluxmail.ai/docs/cli/emails): Read, send, and organize email
- [fluxmail folders list](https://fluxmail.ai/docs/cli/folders-list): List folders in an email account
- [fluxmail folders](https://fluxmail.ai/docs/cli/folders): Work with navigable mailbox folders
- [CLI reference](https://fluxmail.ai/docs/cli): Work with email and manage the Fluxmail server from the command line.
- [fluxmail instances list](https://fluxmail.ai/docs/cli/instances-list): List configured instances
- [fluxmail instances remove](https://fluxmail.ai/docs/cli/instances-remove): Remove a CLI profile and its local session
- [fluxmail instances use](https://fluxmail.ai/docs/cli/instances-use): Select the default instance
- [fluxmail instances](https://fluxmail.ai/docs/cli/instances): Manage local and remote CLI instances
- [fluxmail labels list](https://fluxmail.ai/docs/cli/labels-list): List Gmail user labels or Outlook categories
- [fluxmail labels](https://fluxmail.ai/docs/cli/labels): Work with Gmail labels and Outlook categories
- [fluxmail license activate](https://fluxmail.ai/docs/cli/license-activate): Store a license key and validate it with the license server
- [fluxmail license deactivate](https://fluxmail.ai/docs/cli/license-deactivate): Release the license from this instance and remove the stored key and cached lease
- [fluxmail license status](https://fluxmail.ai/docs/cli/license-status): Show the configured license and cached lease
- [fluxmail license](https://fluxmail.ai/docs/cli/license): Manage the paid-tier license
- [fluxmail login](https://fluxmail.ai/docs/cli/login): Log in to a local or remote instance
- [fluxmail logout](https://fluxmail.ai/docs/cli/logout): Revoke the current CLI session
- [fluxmail logs](https://fluxmail.ai/docs/cli/logs): Show recent local log entries
- [fluxmail members add](https://fluxmail.ai/docs/cli/members-add): Add a member (subject to your plan's member limit)
- [fluxmail members invite](https://fluxmail.ai/docs/cli/members-invite): Issue a new enrollment code
- [fluxmail members list](https://fluxmail.ai/docs/cli/members-list): List members with their mailbox and API key counts
- [fluxmail members password-reset](https://fluxmail.ai/docs/cli/members-password-reset): Issue a password reset code
- [fluxmail members remove](https://fluxmail.ai/docs/cli/members-remove): Remove a member after reassigning or removing their mailboxes
- [fluxmail members revoke-session](https://fluxmail.ai/docs/cli/members-revoke-session): Revoke a member session
- [fluxmail members role](https://fluxmail.ai/docs/cli/members-role): Change a member role
- [fluxmail members sessions](https://fluxmail.ai/docs/cli/members-sessions): List sessions for a member
- [fluxmail members status](https://fluxmail.ai/docs/cli/members-status): Activate or suspend a member
- [fluxmail members](https://fluxmail.ai/docs/cli/members): Manage members (people using this instance)
- [fluxmail oauth configure google](https://fluxmail.ai/docs/cli/oauth-configure-google): Configure a custom Google OAuth application
- [fluxmail oauth configure outlook](https://fluxmail.ai/docs/cli/oauth-configure-outlook): Configure a custom Microsoft OAuth application
- [fluxmail oauth configure](https://fluxmail.ai/docs/cli/oauth-configure): Configure an OAuth application
- [fluxmail oauth reset](https://fluxmail.ai/docs/cli/oauth-reset): Remove a stored OAuth application
- [fluxmail oauth status](https://fluxmail.ai/docs/cli/oauth-status): Show OAuth application status without secrets
- [fluxmail oauth](https://fluxmail.ai/docs/cli/oauth): Manage OAuth applications
- [fluxmail scheduled cancel](https://fluxmail.ai/docs/cli/scheduled-cancel): Cancel a scheduled send and keep its draft
- [fluxmail scheduled list](https://fluxmail.ai/docs/cli/scheduled-list): List scheduled sends
- [fluxmail scheduled run](https://fluxmail.ai/docs/cli/scheduled-run): Run scheduled delivery for this local instance without HTTP or MCP
- [fluxmail scheduled](https://fluxmail.ai/docs/cli/scheduled): Manage scheduled sends
- [fluxmail serve](https://fluxmail.ai/docs/cli/serve): Run the HTTP server (MCP at /mcp and REST at /api/v1)
- [fluxmail setup](https://fluxmail.ai/docs/cli/setup): Create the first local administrator or claim a migrated administrator
- [fluxmail status](https://fluxmail.ai/docs/cli/status): Show mailbox and provider status for the selected instance
- [fluxmail stdio](https://fluxmail.ai/docs/cli/stdio): Run as a stdio MCP server (for Claude Desktop / Claude Code local config)
- [fluxmail telemetry disable](https://fluxmail.ai/docs/cli/telemetry-disable): Stop sending anonymous usage telemetry
- [fluxmail telemetry enable](https://fluxmail.ai/docs/cli/telemetry-enable): Allow anonymous usage telemetry
- [fluxmail telemetry status](https://fluxmail.ai/docs/cli/telemetry-status): Show whether anonymous usage telemet