Email for Codex
Fluxmail gives Codex CLI and the Codex app access to your Gmail, Outlook, Exchange, or IMAP mailboxes through MCP. Codex can search, read, draft, and send email, limited to the mailboxes and actions you allow.
What you can do
Turn email into tasks
Ask Codex to read a bug report or customer thread and open the relevant files, so the context comes straight from the message.
Find the right thread
Ask for the thread about a deploy, an invoice, or a contract. Codex builds the search with sender, date, and folder filters, so you do not need the exact subject line.
Draft status updates
Have Codex draft a reply that summarizes what changed in the code, then review it in your mail client before it goes out.
Connect Codex to your email
1. Install Fluxmail and connect a mailbox
Install the CLI, create the first administrator, and connect a mailbox. Use
outlookorimapinstead ofgmailfor 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 gmail2. Add Fluxmail to Codex
For Codex CLI on the same computer as Fluxmail, add the stdio server:
codex mcp add fluxmail -- fluxmail stdioOr connect over HTTP
To connect over Streamable HTTP, create an API key with
fluxmail apikey create --name codex. Start the server withfluxmail serveunless Docker is already running it, then add it to~/.codex/config.toml:[mcp_servers.fluxmail] url = "http://localhost:8977/mcp" http_headers = { Authorization = "Bearer fmk_..." }
In the ChatGPT or Codex app, open Settings > Plugins > MCPs > Add server. Choose STDIO with the command fluxmail and the argument stdio, or choose Streamable HTTP with the URL and an Authorization header.
Restart the app after saving, then ask Codex for the five latest emails in your inbox to test the connection.
See Permissions for every profile and capability, and the Codex MCP docs for client settings.
Common questions
- Does this work with both Codex CLI and the Codex app?
- Yes. Codex CLI reads MCP servers from
~/.codex/config.tomlorcodex mcp add. The Codex app has its own MCP settings. Both can use stdio or Streamable HTTP. - Can I keep Codex read-only?
- Yes. Add
--profile read-onlyto the stdio arguments, or create the HTTP API key with--profile read-only. Codex can then search and read but cannot draft, send, or change mail. - Which email providers can Codex reach?
- Any mailbox connected to Fluxmail: Gmail and Google Workspace, Outlook and Exchange through Microsoft Graph, and other providers through IMAP and SMTP.
Reviewed
Build on top of email
Run Fluxmail on your own infrastructure and use it through MCP, REST API, or CLI.