Connect Multiple Email Accounts to Codex
Yes, you can connect multiple email accounts to Codex with Carly. Add every personal Gmail, Google Workspace, and Microsoft 365 mailbox to Carly once, register one MCP server in the Codex CLI, and a single session can search or act in whichever inbox you name without disconnecting anything.
Codex’s own plugins are one account each. The Gmail plugin authorizes a single Google identity, and the outlook-email plugin beside it works against one configured Microsoft connector, so a second address of either kind replaces the first rather than joining it.
What one Codex session can do afterwards
- Search a personal Gmail and a work Outlook in the same prompt.
- Compare a thread in one employer’s mailbox against another client’s.
- Pull every message about a failed deploy across all connected accounts at once.
- Draft or send from the exact address you choose.
- Label, move, flag or archive in the correct account.
- Read a client mailbox while writing only to your own.
Nothing is merged into a single pooled inbox. Each account stays individually addressable by its full address, and every result names the account it came from.
Where Codex’s local design helps, and where it stops
Codex is a local process you configure yourself, which is a real advantage over a hosted assistant: its MCP servers live in a TOML file on your machine rather than a vendor’s settings screen, so you decide what it reaches. That freedom does not extend to the account count inside a first-party connector.
OpenAI's app directory became a plugin directory on July 9, 2026, shared between ChatGPT and Codex. Plugins are packages that can carry apps, skills, or app templates — a repackaging of how things are listed and discovered, not a change to the MCP plumbing underneath.
Codex draws its first-party mail access from that shared directory, which means it inherits the shared limit.
The built-in connectors hold one account per provider. ChatGPT, Claude, and Gemini each authorize a single Google identity, and connecting a second one replaces the first rather than adding to it. Switching inboxes means disconnecting and reauthorizing, which is why "personal and work" is still two sessions rather than one.
Gmail authorizes one Google identity. Sign in with a second and it takes the slot rather than sitting beside the first. OpenAI’s own tracker says as much: the open Codex request support multiple named accounts per app/connector notes that “the app/connector model appears oriented around one active connection per provider,” and a second open issue, Gmail connector should support multiple named accounts, reports that “the assistant appears to access only one active Gmail account.”
Outlook is in the same position, which is easy to miss because the documentation never says so. The plugin page lists Gmail, Google Drive, Slack and Codex Security prefixed by “for example,” while the curated marketplace behind it carries 180 plugins including first-party outlook-email, outlook-calendar, teams and sharepoint. Run codex plugin marketplace list and they are there. outlook-email describes itself as working with “the configured Microsoft Outlook app connector,” singular, so it inherits the same one-account shape as Gmail. Two Microsoft 365 mailboxes are no more reachable than two Google ones.
Two further limits live in that plugin’s own instructions rather than in any document. Outbound Outlook mail is plain text only, because the plugin is told to refuse HTML, styled sections and layout-dependent markup on anything it writes. And a shared or delegated mailbox runs through separate actions, list_shared_messages and list_shared_mail_folders, each needing the exact mailbox_user_principal_name, with guessing from a display name explicitly forbidden.
The workaround people reach for is one mail MCP server per account, third-party or self-hosted. Because the config is local it technically works, and it is still the wrong shape: three mailboxes across two providers means three server entries, three OAuth applications you register and rotate yourself, and no shared convention for saying which inbox you mean. Skip it. One server that already holds every account is less machinery and less to get wrong.
1. Give each mailbox a role
Using fictional addresses:
| Address | Provider | Role |
|---|---|---|
fictional.marcus.deleon@gmail.com | Gmail | Personal |
fictional.marcus.deleon@twilio.com | Google Workspace | Main Company |
fictional.marcus.deleon@instacart.com | Microsoft 365 | Client |
Roles like Personal, Main Company and Client read better in everyday prompts. Keep the full address for anything that changes a mailbox.
2. Connect every mailbox to Carly
- Sign in at carlyassistant.com.
- Open carlyassistant.com/integrations.
- Find Gmail or Outlook and click Connect.
- Authorize the first account and confirm the address Carly shows.
- Return to the integrations page and connect the next identity.
- Choose Use another account if the provider preselects your previous login, and verify the full address each time.
Mix providers freely. A second Gmail sits beside the first, and an Outlook mailbox sits beside both. If a Google Workspace or Microsoft 365 account needs administrator review, ask that administrator to approve. Each tenant approves independently, so one company declining does not block the rest.
3. Register Carly as an MCP server in Codex
The CLI route is the shortest:
codex mcp add carly --url https://carlyassistant.com/mcp/
Servers added this way land in ~/.codex/config.toml at user scope. The hand-written equivalent:
[mcp_servers.carly]
url = "https://carlyassistant.com/mcp/"
A trusted project can carry its own .codex/config.toml if you would rather scope the server to one repository than to your whole machine.
Then authenticate:
codex mcp login carly
That opens the browser OAuth flow. Sign in to the Carly workspace holding your mailboxes. Codex supports OAuth against remote HTTP MCP servers, including Client ID Metadata Documents and Dynamic Client Registration, so no secret has to sit in a config file. Confirm the server is live:
codex mcp list
4. Test each address read-only
Start a new session so the tools load, then take one account per prompt:
In
fictional.marcus.deleon@twilio.com, list the sender and subject of the five newest unread messages. Do not change anything.
In
fictional.marcus.deleon@instacart.com, find the newest thread containing “staging outage.” State the source account and do not draft.
Then a question that crosses providers:
Search the Twilio and personal Gmail example accounts for “renewal” in the last 30 days. Include the full source address on every row.
If no tools appear, start a fresh session. Codex loads a newly added server’s tools at session start rather than mid-session.
5. Reuse one routing prompt
Treat
fictional.marcus.deleon@gmail.comas Personal,fictional.marcus.deleon@twilio.comas Main Company, andfictional.marcus.deleon@instacart.comas Client. Always state the target address before changing data. Ask before sends, moves, deletes or labels.
Then name the target on each action:
Draft the reply from
fictional.marcus.deleon@twilio.com. Do not send yet.
Send the approved reply from the mailbox that received the original message.
Keep approvals on while testing. A coding agent holding send rights on two employers’ mailboxes deserves a confirmation step.
What the first-party plugins still cover
One Google account and one Microsoft account, worked from a terminal, are genuine capabilities. Install either from the plugin browser at /plugins in the Codex CLI. The IDE extension does not support plugins at all.
They stop at the second identity on the same provider, at Outlook formatting beyond plain text, at any shared mailbox whose principal name you cannot supply exactly, and at anything that has to happen while the terminal is closed. Those are the walls people hit: a client account arrives, a second employer shows up on the same provider, or the triage needs to run overnight. They have the same fix.
Codex plugins and per-account MCP servers versus Carly
| Codex plugins | One MCP server per account | Carly | |
|---|---|---|---|
| Gmail accounts at once | One | One each | Every one you connect |
| Outlook accounts at once | One | One each | Every one you connect |
| Gmail and Outlook together | One account of each | Two setups | Yes, any number of each |
| OAuth apps you maintain | None | One per account | None |
| Adding a fourth account | Not possible | New config entry | No config change |
| Says which account it used | Not consistently | No shared convention | On every action |
| Runs with no session open | No | No | Yes |
Carly’s agents carry their own name, email address and memory, so a client can write to one directly and the work starts on arrival rather than the next time you open a terminal. Around the mail sit 260+ native integrations plus your own API key for anything else with an API. Carly offers free Zapier-style workflows; AI agents start at $35/month.
Connect every inbox at carlyassistant.com.
Quick fixes when a mailbox does not appear
| Problem | Fix |
|---|---|
| No tools in the session | Start a new Codex session after adding the server |
codex mcp login never completes | Finish the browser OAuth flow, then rerun codex mcp list |
| The provider reused your signed-in account | Choose Use another account rather than the suggested profile |
| A work account stalls at consent | Ask that Google Workspace or Microsoft 365 administrator to approve |
| Codex answered from the wrong inbox | Name the full address; roles are for reading, addresses are for acting |
Frequently asked questions
Can Codex connect to multiple email accounts?
Yes, through Carly. Codex’s own plugins carry one account per provider, so a second Gmail or a second Microsoft 365 mailbox replaces the first. Connecting every mailbox to Carly and registering one MCP server lets a single Codex session reach all of them.
Can Codex reach Gmail and Outlook in the same session?
Yes, through Carly. Both providers arrive as one account-aware mail toolset, so a prompt can cross from a personal Gmail to a work Microsoft 365 mailbox.
How many mailboxes can this reach?
As many as you authorize in Carly. Codex talks to one server, so the account count is a Carly setting rather than a Codex one.
Will it tell me which account it used?
Yes. Every action reports the source address, which is what makes cross-account work safe to trust.
Should I run inbox work inside Codex?
Codex is a coding agent, and terminal mail suits scripted or one-off tasks. Recurring triage and follow-up belong in a Carly workflow that runs with nothing open.
More: Multiple Gmail accounts in Codex · Multiple Outlook accounts in Codex · Connect multiple email accounts to ChatGPT · Connect multiple email accounts to Claude · Carly’s Gmail integration · Carly’s Outlook integration
Ready to automate your busywork?
Carly schedules, researches, and briefs you—so you can focus on what matters.
See what people say
"Before Carly, I relied on a Calendly link, but the whole process felt impersonal and not very professional. Carly changed that by handling all the back-and-forth, so I'm no longer stuck in endless email threads trying to line up schedules.
Now Carly reaches out to candidates, shares my real-time availability, lets them pick a slot, then sends a Zoom link and drops it straight into my calendar. She sends reminders to both of us before each call, which has significantly reduced no-shows and last-minute confusion.
On top of scheduling, Carly acts like a full executive assistant, sending me my schedule the night before so I can prepare for each call. It reminds me of the old x.ai assistant, but Carly is noticeably smarter, faster, and better suited to my healthcare recruitment business."


