How to Connect Codex to Gmail (Plugin and MCP)
Yes, you can connect Codex to Gmail, and with Carly you can reach every Gmail and Outlook mailbox from the same session. Connect each account to Carly once, run one codex mcp add line, and a single Codex session searches, drafts, and sends across all of them at once.
The first-party route gets you one inbox. Codex has a Gmail plugin, and it authorizes a single Google account; the Outlook plugins beside it hold a single Microsoft account the same way. No plugin browser exists in the IDE extension, and nothing runs until you type. Carly is the way past all of it, because it registers as one MCP server that already holds every mailbox you connect to it.
What the Gmail plugin covers
OpenAI’s plugin documentation puts it in one line: “Install the Gmail plugin to work with Gmail.” The documented way to use it is to describe the outcome, with “Summarize unread Gmail threads from today” as OpenAI’s own example.
Read that page carefully before you conclude anything is missing. It names Gmail, Google Drive, Slack, and Codex Security prefixed by “for example,” so the list is illustrative rather than complete. The curated marketplace behind it carries 180 plugins, and browsing it with codex plugin marketplace list turns up first-party outlook-email, outlook-calendar, teams, and sharepoint entries that the prose never mentions. Each ships a manifest naming OpenAI as author and github.com/openai/plugins as the repository.
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. It is a repackaging of how things are listed and discovered, not a change to the MCP plumbing underneath.
That merge is why a Codex user has a Gmail plugin at all. Codex and ChatGPT browse one catalog, so the mail access Codex gets is the mail access ChatGPT gets.
Installing it
In the Codex CLI, enter /plugins to open the plugin browser, install Gmail from the OpenAI tab, and connect the Google account when prompted. The ChatGPT desktop app carries the same directory under its Plugins tab.
Then start a new session. OpenAI’s docs are explicit that bundled skills and tools become available when you start a new chat or CLI session after installation, so the session you installed from will not see them.
One surface never gets it. “Plugins aren’t available in the IDE extension,” per the same page, so a plugin browser is not something to go looking for in VS Code.
Where the plugins stop
Four walls, in the order people hit them. The middle two are written into the plugins’ own skill files and appear in no OpenAI documentation.
Accounts per provider.
Two Gmail accounts in one ChatGPT conversation has been a documented feature since August 2026, and OpenAI widened multiple accounts to more plugins on September 17, 2026 without publishing which. For Microsoft accounts the documentation is thinner: a second one works "where supported," some actions need approval from each organization's Microsoft Entra administrator, and personal Outlook.com and Hotmail addresses go unmentioned. Carly holds all of them, Gmail and Outlook, personal and work.
Codex draws its first-party mail access from that shared directory, so it inherits the same rules. For Gmail that now means several accounts: a user on OpenAI’s Codex tracker confirmed in issue 20500 that Codex shows “Connect another account” for Gmail.
Outlook is vaguer. The plugin’s own description is “Work with Outlook Email using the configured Microsoft Outlook app connector,” singular, and OpenAI’s Outlook article says a second Microsoft account works only “where supported.”
Outlook mail goes out as plain text. outlook-email is a write-capable plugin with real actions behind it, including send_email, schedule_email, create_reply_draft, move_email, and send_email_on_behalf. What it will not do is format. The plugin instructs the model to refuse HTML, styled sections, and any markup whose meaning depends on layout, so every send, scheduled send, and reply draft leaves as unformatted text.
Shared and delegated mailboxes are a stricter, separate path. They run through their own actions, list_shared_messages and list_shared_mail_folders, and each call needs the exact mailbox_user_principal_name. The plugin is instructed not to guess that address from a display name and not to mix a shared message ID into an action meant for the signed-in user, so a delegated inbox is reachable only when you already know the precise address.
Nothing begins on its own. Codex acts when you type. Overnight triage, a reply that has to go out the moment a message lands, a follow-up three days later: none of that starts by itself.
Reach every mailbox: register Carly as an MCP server
Carly holds Gmail and Outlook accounts on its side and exposes all of them to Codex through one MCP server. One config entry, any number of mailboxes, both providers.
- Sign in at carlyassistant.com.
- Open carlyassistant.com/integrations, find Gmail or Outlook, and click Connect.
- Authorize the first account.
- Return to the integrations page and connect the next account. Choose Use another account if the provider preselects your previous login.
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 organization decides independently.
Then register the server. The CLI route is one line:
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 the whole machine. Then authenticate:
codex mcp login carly
That opens the browser OAuth flow. Sign in to the Carly workspace holding your mailboxes, then run codex mcp list to confirm the server is live. 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.
Start a fresh session before you go looking for the tools. Codex spawns its MCP servers once at session start and never revisits them while the session runs.
MCP configuration is shared across the ChatGPT desktop app, the Codex CLI, and the IDE extension, which is the surface the plugin route never reaches at all.
Ask across all of them
List the sender and subject of the five newest unread messages across all my inboxes.
Draft a reply to the newest Varonex thread. Do not send it yet.
Keep approvals on while you are testing. A coding agent holding send rights across two employers’ mailboxes deserves a confirmation step.
Codex plugins and Carly, side by side
| Codex plugins | Carly | |
|---|---|---|
| Gmail accounts at once | One | Every one you connect |
| Outlook accounts at once | One | Every one you connect |
| Gmail and Outlook together | One account of each | Any number of each |
| Works in the IDE extension | No | Yes, over MCP |
| Starts when mail arrives | No | Yes |
| Works with no session open | No | Yes |
| Adding a fourth mailbox | Not possible | No config change |
The half that never starts with a prompt
Wiring Carly into Codex closes the account problem. It does not, by itself, close the bigger one.
Connecting an MCP server used to give an assistant reach and nothing else. ChatGPT changed that with automations that fire on MCP events, yet the standard is still a draft, and OpenAI's docs list just three apps whose events can start a task: Gmail, Slack and GitHub. Everything else still waits to be asked. Carly covers more of it: its workflows start from an incoming email, a booking, a CRM change or a new spreadsheet row, and it can check any app with an API, then report back in the same chat.
Give Claude's scheduled tasks a time and they will run. Give them something that just happened and they will not. ChatGPT goes further, but only on web and mobile, and only for apps whose plugin supports events: OpenAI documents Gmail, Slack and GitHub and has not named the rest. A lead moving stage, a form landing, an invoice clearing: neither one has a published way to start on it. Carly starts on all of it.
Carly’s own side is where that gap closes. Its workflows fire on events and schedules rather than on you typing, so a message arriving is enough to start triage, a draft, a reply, a calendar hold, or a CRM update. Each agent carries its own name, email address, and memory, so a client can write to one directly and the work begins 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 a public API. Carly offers free Zapier-style workflows; AI agents start at $35/month.
Connect every inbox at carlyassistant.com.
Quick fixes when Gmail does not respond
| Problem | Fix |
|---|---|
| The plugin browser is missing | You are in the IDE extension; use the Codex CLI or the ChatGPT desktop app |
| No tools in the session | Start a new session after installing a plugin or adding a 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 |
Frequently Asked Questions
Does OpenAI Codex integrate with Gmail?
Yes. A first-party Gmail plugin lives in the catalog that ChatGPT and Codex share, installable from the Codex CLI plugin browser or the ChatGPT desktop app. Since August 2026 it holds several Google accounts, added under Settings > Plugins > Connected accounts > Connect another account. The IDE extension does not support plugins at all.
Can Codex reach two Gmail accounts?
Yes, since August 2026. Add the second Google account under Settings > Plugins > Connected accounts in the ChatGPT desktop app. Outlook is the gap: OpenAI documents a second Microsoft account only “where supported,” so connect those mailboxes to Carly, register one MCP server, and a single Codex session reaches all of them alongside Gmail.
Can Codex connect to Outlook?
Yes. First-party outlook-email and outlook-calendar plugins sit in the marketplace even though the documentation prose never lists them, and they work against a configured Microsoft Outlook connector. OpenAI’s September 2026 multi-account note covers ChatGPT plugins and does not mention Codex, so treat that connector as one account until Codex says otherwise. Outbound mail is plain text only, and a shared mailbox needs its exact principal name. Connecting every Microsoft and Google mailbox to Carly and pointing Codex at https://carlyassistant.com/mcp/ puts them all in the same session.
Can Codex send emails for me?
It can act in whatever account is connected, and the exact actions depend on which route you use. For an assistant that triages, drafts and sends, and follows up on its own across Gmail and Outlook, see Carly.
Should I run inbox work inside Codex?
Codex is a coding agent, so terminal mail suits scripted or one-off tasks: read the support thread, check the alert, quote it into a fix. Recurring triage and follow-up belong in a Carly workflow that runs with nothing open.
More: Connect multiple email accounts to Codex · Codex MCP servers · Codex + Outlook · Codex + Slack · Codex + Google Calendar · Best AI email assistants · Carly’s Gmail 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."


