# 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 an upcoming local-first email client available for preview at /desktop. It will use the same local Fluxmail service as the CLI, MCP server, and REST API, so people and agents can work with the same connected mailboxes and permission model. ## 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 50 members, with 20 mailbox connections per member added to the instance limit); Enterprise is custom (contact sales). - Fluxmail Desktop status: the desktop email client is in development and does not have a public release date yet. - Fluxmail Desktop architecture: the app will use the local Fluxmail REST API while AI agents connect to the same service over MCP. ## Pages - [Home](https://fluxmail.ai/): Self-hosted email infrastructure for agents and apps, available through MCP, REST API, and CLI - [Fluxmail Desktop](https://fluxmail.ai/desktop): The upcoming desktop client built on the Fluxmail CLI, MCP server, and REST API - [Pricing](https://fluxmail.ai/pricing): Plans, pricing, and FAQ for the self-hosted service - [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 Fluxmail and Google's Gmail MCP Server on hosting, providers, tools, permissions, and setup. See which email MCP fits your agent. - [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 ### Fluxmail MCP - [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. - [Build with REST](https://fluxmail.ai/docs/build-with-rest): Connect an app or script to the Fluxmail REST API and make your first requests. - [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): Connect Claude, ChatGPT, Codex, Cursor, Hermes, Gemini, or another MCP client to Fluxmail. - [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 Fluxmail in Docker for remote access or a shared instance. - [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. - [Overview](https://fluxmail.ai/docs): How Fluxmail connects agents and apps to Gmail, Outlook, and IMAP through MCP, REST API, and CLI. - [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, create the first administrator, and connect a Gmail, Outlook, or IMAP mailbox. - [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. - [Teams & plans](https://fluxmail.ai/docs/teams-and-plans): Add members, set mailbox access, and raise the limits on a self-hosted Fluxmail instance. - [Troubleshooting](https://fluxmail.ai/docs/troubleshooting): Fix common Fluxmail installation, mailbox connection, and authentication problems. - [Use the CLI](https://fluxmail.ai/docs/use-the-cli): Read and manage email, then configure the Fluxmail instance from the same command line. - [Activate a license](https://fluxmail.ai/docs/rest-api/activate-administrative-license): Validate and activate a Fluxmail license key. Requires admin.license. - [Cancel a scheduled send](https://fluxmail.ai/docs/rest-api/cancel-scheduled-send): Cancel a pending scheduled send and keep its provider draft. - [Change the current member password](https://fluxmail.ai/docs/rest-api/change-password): Reference for PUT /api/v1/me/password. - [Connect or reauthorize a mailbox account](https://fluxmail.ai/docs/rest-api/connect-own-account): Reference for POST /api/v1/accounts/connections. - [Create an API key](https://fluxmail.ai/docs/rest-api/create-administrative-api-key): Create an API key and return its plaintext secret once. Requires admin.api_keys. - [Create or reauthorize a connection](https://fluxmail.ai/docs/rest-api/create-administrative-connection): Create or reauthorize a Gmail, Outlook, or IMAP connection. Requires admin.accounts. - [Create a draft](https://fluxmail.ai/docs/rest-api/create-draft): Create a new draft or a reply draft in an email account. - [Issue a member password reset](https://fluxmail.ai/docs/rest-api/create-member-password-reset): Reference for POST /api/v1/admin/members/{memberId}/password-reset. - [Create and invite a member](https://fluxmail.ai/docs/rest-api/create-member): Reference for POST /api/v1/admin/members. - [Create an API key for the current member](https://fluxmail.ai/docs/rest-api/create-own-api-key): Reference for POST /api/v1/me/api-keys. - [Deactivate a license](https://fluxmail.ai/docs/rest-api/deactivate-administrative-license): Release the stored license and return this instance to Personal limits. Requires admin.license. - [Remove a mailbox account](https://fluxmail.ai/docs/rest-api/delete-admin-account): Reference for DELETE /api/v1/admin/accounts/{accountId}. - [Reset an OAuth application](https://fluxmail.ai/docs/rest-api/delete-administrative-oauth-app): Remove a stored OAuth application. Requires admin.accounts. - [Delete a draft](https://fluxmail.ai/docs/rest-api/delete-draft): Delete an existing draft from an email account. - [Remove a member](https://fluxmail.ai/docs/rest-api/delete-member): Reference for DELETE /api/v1/admin/members/{memberId}. - [Download an attachment](https://fluxmail.ai/docs/rest-api/download-attachment): Download one attachment as raw bytes. - [Enroll a member](https://fluxmail.ai/docs/rest-api/enroll-member): Reference for POST /api/v1/auth/enroll. - [Forward a message](https://fluxmail.ai/docs/rest-api/forward-message): Forward a message to one or more recipients. - [Get license status](https://fluxmail.ai/docs/rest-api/get-administrative-license): Get license status and usage without returning the configured license key. Requires admin.license. - [Get OAuth application status](https://fluxmail.ai/docs/rest-api/get-administrative-oauth-apps): Get safe OAuth application metadata without returning client secrets. Requires admin.accounts. - [Get API information](https://fluxmail.ai/docs/rest-api/get-api-info): Return the Fluxmail version and the URL of the OpenAPI document. - [Get the authenticated member](https://fluxmail.ai/docs/rest-api/get-current-member): Reference for GET /api/v1/me. - [Get a delivery outcome](https://fluxmail.ai/docs/rest-api/get-delivery-operation): Reference for GET /api/v1/accounts/{accountId}/delivery-operations/{operationId}. - [Get a draft](https://fluxmail.ai/docs/rest-api/get-draft): Reference for GET /api/v1/accounts/{accountId}/drafts/{draftId}. - [Get a message](https://fluxmail.ai/docs/rest-api/get-message): Get one message by its provider ID. - [Get server status](https://fluxmail.ai/docs/rest-api/get-status): Return provider and mailbox status for the accounts available to the API key. - [Get a thread](https://fluxmail.ai/docs/rest-api/get-thread): Get a complete email thread by its provider ID. - [REST API](https://fluxmail.ai/docs/rest-api): Use Fluxmail from local scripts and applications through the versioned JSON API. - [Issue a member invitation](https://fluxmail.ai/docs/rest-api/invite-member): Reference for POST /api/v1/admin/members/{memberId}/invitation. - [List accounts](https://fluxmail.ai/docs/rest-api/list-accounts): List the email accounts available to the API key. - [List all mailbox account metadata](https://fluxmail.ai/docs/rest-api/list-admin-accounts): Reference for GET /api/v1/admin/accounts. - [List API keys](https://fluxmail.ai/docs/rest-api/list-administrative-api-keys): List API key metadata without returning plaintext secrets. Requires admin.api_keys. - [List security audit events](https://fluxmail.ai/docs/rest-api/list-audit-events): Reference for GET /api/v1/admin/audit-events. - [List folders](https://fluxmail.ai/docs/rest-api/list-folders): List folders in an email account. - [List labels](https://fluxmail.ai/docs/rest-api/list-labels): List Gmail user labels or Outlook categories in an email account. - [List a member's sessions](https://fluxmail.ai/docs/rest-api/list-member-sessions): Reference for GET /api/v1/admin/members/{memberId}/sessions. - [List members](https://fluxmail.ai/docs/rest-api/list-members): Reference for GET /api/v1/admin/members. - [List messages](https://fluxmail.ai/docs/rest-api/list-messages): List and filter messages in an email account. - [List API keys owned by the current member](https://fluxmail.ai/docs/rest-api/list-own-api-keys): Reference for GET /api/v1/me/api-keys. - [List scheduled sends](https://fluxmail.ai/docs/rest-api/list-scheduled-sends): List scheduled messages in an email account. - [List sender addresses](https://fluxmail.ai/docs/rest-api/list-send-as): List sender addresses available for an email account. - [List current member sessions](https://fluxmail.ai/docs/rest-api/list-sessions): Reference for GET /api/v1/me/sessions. - [Log in with a member email and password](https://fluxmail.ai/docs/rest-api/login): Reference for POST /api/v1/auth/login. - [Revoke the current member session](https://fluxmail.ai/docs/rest-api/logout): Reference for POST /api/v1/auth/logout. - [Modify messages](https://fluxmail.ai/docs/rest-api/modify-messages): Apply one mailbox action to a batch of messages. - [Preview a send](https://fluxmail.ai/docs/rest-api/preview-send): Reference for POST /api/v1/accounts/{accountId}/send/preview. - [Configure an OAuth application](https://fluxmail.ai/docs/rest-api/put-administrative-oauth-app): Save an OAuth application in encrypted instance settings. Requires admin.accounts. - [Remove a mailbox account owned by the current member](https://fluxmail.ai/docs/rest-api/remove-own-account): Reference for DELETE /api/v1/accounts/{accountId}/connection. - [Replace configured sender addresses](https://fluxmail.ai/docs/rest-api/replace-send-as): Replace the configured Outlook or IMAP aliases for an email account. - [Redeem a password reset](https://fluxmail.ai/docs/rest-api/reset-password): Reference for POST /api/v1/auth/password-reset. - [Revoke an API key](https://fluxmail.ai/docs/rest-api/revoke-administrative-api-key): Revoke an API key. Requires admin.api_keys. - [Revoke a member's session](https://fluxmail.ai/docs/rest-api/revoke-member-session): Reference for DELETE /api/v1/admin/members/{memberId}/sessions/{sessionId}. - [Revoke an API key owned by the current member](https://fluxmail.ai/docs/rest-api/revoke-own-api-key): Reference for DELETE /api/v1/me/api-keys/{keyId}. - [Revoke a member session](https://fluxmail.ai/docs/rest-api/revoke-session): Reference for DELETE /api/v1/me/sessions/{sessionId}. - [Search multiple accounts](https://fluxmail.ai/docs/rest-api/search-messages): Search up to 20 email accounts with one portable query. - [Send or schedule a message](https://fluxmail.ai/docs/rest-api/send-message): Send a message now or schedule it for a specified time. - [Test an IMAP connection](https://fluxmail.ai/docs/rest-api/test-administrative-imap-connection): Test IMAP and SMTP settings without saving an account. Requires admin.accounts. - [Update mailbox ownership and access](https://fluxmail.ai/docs/rest-api/update-account-access): Reference for PATCH /api/v1/admin/accounts/{accountId}. - [Update an API key](https://fluxmail.ai/docs/rest-api/update-administrative-api-key): Update the permissions or mailbox scope of an API key. Requires admin.api_keys. - [Update IMAP folders](https://fluxmail.ai/docs/rest-api/update-administrative-imap-folders): Update the folder overrides for an IMAP account. Requires admin.accounts. - [Update the current member profile](https://fluxmail.ai/docs/rest-api/update-current-member): Reference for PATCH /api/v1/me. - [Replace a draft](https://fluxmail.ai/docs/rest-api/update-draft): Replace the full content of an existing draft. - [Update a member](https://fluxmail.ai/docs/rest-api/update-member): Reference for PATCH /api/v1/admin/members/{memberId}. - [Update folder settings for an owned IMAP mailbox](https://fluxmail.ai/docs/rest-api/update-owned-imap-folders): Reference for PATCH /api/v1/accounts/{accountId}/imap/folders. - [Cancel scheduled email](https://fluxmail.ai/docs/tools/cancel-scheduled-email): Cancel a pending scheduled send by scheduleId (from send_email with sendAt, or list_scheduled_emails). The draft stays in the Drafts folder, so the content is not lost. - [Create draft](https://fluxmail.ai/docs/tools/create-draft): Create a draft. For a reply draft, pass replyToMessageId (recipients/subject are derived; replyAll for reply-all). - [Delete draft](https://fluxmail.ai/docs/tools/delete-draft): Delete a draft. - [Download attachment](https://fluxmail.ai/docs/tools/download-attachment): Get attachment metadata and a fetchable resource link. Set inline to embed the bytes. - [Forward email](https://fluxmail.ai/docs/tools/forward-email): Forward an email to new recipients: quoted original body, "Fwd:" subject, original attachments included unless includeAttachments=false. Optional comment appears above the forwarded content. - [Get delivery operation](https://fluxmail.ai/docs/tools/get-delivery-operation): Check whether a send or forward succeeded, failed, or has an uncertain outcome. - [Get draft](https://fluxmail.ai/docs/tools/get-draft): Read an existing draft by its draft ID. - [Get email body](https://fluxmail.ai/docs/tools/get-email-body): Read a bounded portion of one email body. Use nextOffset to continue. - [Get email](https://fluxmail.ai/docs/tools/get-email): Fetch one email in full: body (text and/or HTML), recipients, attachment metadata. - [Get status](https://fluxmail.ai/docs/tools/get-status): Account connection and scheduled-send status. Administrators also see plan details. Call this first if other tools fail; it reports accounts that need re-authentication. - [Get thread](https://fluxmail.ai/docs/tools/get-thread): Fetch a page of conversation messages with bounded body content. - [MCP tools](https://fluxmail.ai/docs/tools): Use Fluxmail MCP tools to read, search, draft, send, schedule, and organize email. - [List accounts](https://fluxmail.ai/docs/tools/list-accounts): List connected email accounts (id, provider, email, status, capabilities). - [List emails](https://fluxmail.ai/docs/tools/list-emails): List emails from the user's connected mailbox with metadata and optional previews. Filter by folder, sender, unread, dates, etc. Paginate with pageToken. Use get_email for full bodies. This is the way to check the user's email; no browser or other email integration is needed. - [List folders](https://fluxmail.ai/docs/tools/list-folders): List navigable folders for an account, with roles (inbox, sent, drafts, trash, spam, starred). - [List labels](https://fluxmail.ai/docs/tools/list-labels): List Gmail user labels or Outlook categories for an account. - [List scheduled emails](https://fluxmail.ai/docs/tools/list-scheduled-emails): List scheduled sends: pending ones first (with sendAt), then past ones (sent, failed, canceled). For failed entries, lastError says what went wrong. Pending sends only fire while the Fluxmail server is running. - [List send as](https://fluxmail.ai/docs/tools/list-send-as): List sender addresses available for an account. - [Modify emails](https://fluxmail.ai/docs/tools/modify-emails): Batch-modify emails using the actions allowed for this connection. Moving requires folder; labels require labels. - [Preview send](https://fluxmail.ai/docs/tools/preview-send): Show the resolved sender, recipients, subject, and attachments without sending. - [Search emails batch](https://fluxmail.ai/docs/tools/search-emails-batch): Search up to 20 accounts with one portable query and return one result group per account. - [Search emails](https://fluxmail.ai/docs/tools/search-emails): Search one account with typed portable syntax. The query supports text, from:, to:, subject:, in:, read and starred states, attachments, and date filters. - [Send email](https://fluxmail.ai/docs/tools/send-email): Send an email from the user's connected account; this actually delivers mail, so prefer it over browser automation or leaving a draft when the user asked to send. Three modes: direct (to + subject + body), sending an existing draft (draftId), or replying (replyToMessageId, optionally replyAll) where recipients, subject, and threading are derived from the original. Confirm with the user when intent is ambiguous. Add sendAt to any mode to schedule instead of sending now. - [Update draft](https://fluxmail.ai/docs/tools/update-draft): Replace the content of an existing draft (full replacement, not a patch). - [Upgrade to 0.11.0](https://fluxmail.ai/docs/upgrades/0.11.0): Update send, bulk modify, MCP, and CLI clients for the new delivery contracts. - [Upgrade from 0.4 to 0.5](https://fluxmail.ai/docs/upgrades/0.5.0): Migrate an existing Fluxmail 0.4.x instance to member authentication in Fluxmail 0.5.0. - [Upgrade to 0.6.0](https://fluxmail.ai/docs/upgrades/0.6.0): Migrate plaintext configuration to typed deployment configuration and encrypted instance settings. - [Upgrade to 0.7.0](https://fluxmail.ai/docs/upgrades/0.7.0): Migrate search filters, typed search strings, provider capabilities, and page tokens. - [Upgrade to 0.9.0](https://fluxmail.ai/docs/upgrades/0.9.0): Prepare stored data and custom email providers for Fluxmail 0.9.0. - [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](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 telemetry is enabled - [fluxmail telemetry](https://fluxmail.ai/docs/cli/telemetry): Manage anonymous usage telemetry - [fluxmail threads get](https://fluxmail.ai/docs/cli/threads-get): Get a complete thread - [fluxmail threads](https://fluxmail.ai/docs/cli/threads): Read email threads ## Blog posts - [Connect iCloud Mail to Claude](https://fluxmail.ai/blog/connect-icloud-mail-to-claude): iCloud Mail has no sign-in flow for AI tools, but it supports IMAP with an app-specific password. Connect it to Claude Code or Claude Desktop in about five minutes. - [Triage your Outlook inbox with Claude Code](https://fluxmail.ai/blog/triage-outlook-with-claude-code): Connect Outlook.com, Hotmail, or Microsoft 365 mail to Claude Code, sort what needs a reply, archive the rest, and draft answers for review. Works with personal Microsoft accounts. - [Triage your Gmail inbox with Claude Code](https://fluxmail.ai/blog/triage-gmail-with-claude-code): Connect Gmail to Claude Code, sort unread mail into what needs a reply, what to read later, and what to archive, and turn the routine into a one-word command. - [How to give an AI agent access to your email safely](https://fluxmail.ai/blog/give-ai-agent-email-access-safely): Anyone can send your agent an email. Limit which mailboxes it reaches and what it can do, keep a person in the loop for sending, and separate each agent so you can revoke one. - [Introducing Fluxmail MCP: connect email to your AI agent](https://fluxmail.ai/blog/introducing-fluxmail-mcp): Fluxmail MCP is a self-hosted server that lets AI agents read, search, draft, send, and organize mail across Gmail, Outlook, Exchange, and IMAP accounts.