Codex · about 2 min

Give Codex your inbox, read-only

Codex CLI, the IDE extension and the ChatGPT desktop app share one MCP configuration. Add Emailgents once and all of them can read your mail.

~/.codex/config.toml
# or: codex mcp add emailgents --url https://emailgents.com/mcp
[mcp_servers.emailgents]
url = "https://emailgents.com/mcp"

server: https://emailgents.com/mcp

Setup

Sign in happens in the browser once; the client remembers it.

  1. 01
    Connect your mailboxes in EmailgentsSign up at emailgents.com and add your accounts under Mailboxes.
  2. 02
    Add the serverRun codex mcp add as below, or add the TOML block to ~/.codex/config.toml.
  3. 03
    Sign in onceCodex opens the Emailgents sign-in the first time it connects; approve once and the session is kept.
  4. 04
    AskCodex now has the Emailgents tools next to its own; start with inbox_overview.

Things to ask

  • “Find the email with the staging credentials from DevOps and tell me which host to use.”
  • “Pull the latest failing-build notification and summarize the error.”
  • “Search all accounts for the invoice number 4471 and quote the amount.”

Good to know

  • Codex supports streamable HTTP servers with OAuth sign-in; no bearer token is needed for Emailgents.
  • Project-scoped .codex/config.toml works in trusted projects if you want the server only there.

Codex questions

Do I need an API key?

Not for MCP. You sign in to Emailgents in the browser when the client connects and approve once. API keys exist for scripts that use the REST API instead.

Which inboxes will it see?

Every mailbox you have connected in Emailgents: Gmail and Google Workspace, Outlook and Microsoft 365, iCloud, Yahoo, Fastmail, AOL, Zoho, GMX, WEB.DE and any IMAP server. Add or remove mailboxes in Emailgents and the agent sees the change on its next call.

Can it read several accounts at once?

Yes. search_messages and inbox_overview cover every connected mailbox by default. Pass account_ids to narrow to one; each result carries its account so the agent can tell them apart.

Can it send, delete or move my mail?

No. The tool set is read-only apart from set_flags, which toggles read and starred. An instruction hidden inside an email cannot make the agent send anything on your behalf, and every call is listed on your Activity page.

Other agents

Your agents can read mail in five minutes.

One account, as many mailboxes as you need, every agent you run.