How to Connect Multiple Google Drive Accounts to Codex
Codex’s first-party Google Drive plugin holds one Google account per provider, so a personal Drive and a work Drive in one session runs through Carly: authorize each Google identity there, register one MCP server, and name the Drive you mean. Adding a fourth account later changes nothing in config.toml. Carly holds your OneDrive accounts, and every mailbox and calendar on both sides, in the same place.
What one chat can do afterwards
- Search a personal Gmail Drive and a Workspace Drive in the same question.
- Say which account each copy of a document lives in.
- Copy, file or update a document in the Drive you name.
- Reach Drive from the VS Code extension, where plugins do not run.
- Add a fourth Google account with a Connect click, not a Cloud project.
- Keep the work running when no session is open.
Nothing is merged. Each Google identity keeps its own authorization, and every Drive stays individually addressable.
The plugin is one account per provider
The plugin directory is shared between ChatGPT and Codex, and Google Drive is in it. OpenAI’s plugin documentation says plainly: “Install the Google Drive plugin to work across Drive, Docs, Sheets, and Slides.” What the plugin does not do is carry two identities.
The clearest statement is OpenAI’s own tracker. openai/codex issue 20500, “Feature request: support multiple named accounts per app/connector”, open since April 2026 and still being updated in August, records that “the app/connector model appears oriented around one active connection per provider”. The request names Drive specifically, asking to “search a company Google Drive without also exposing personal Drive content”. The same issue notes that Drive setup warns users with multiple Google accounts to choose the work account, and uses domain matching to prevent connecting the wrong one. That is a guard rail against the mistake, not a second slot.
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.
Where plugins work is not where MCP works
Two different surface lists, and mixing them up wastes an afternoon. Plugins, per OpenAI’s documentation, “work in Chat and Work across ChatGPT on the web, desktop, and mobile, and in Codex in the ChatGPT desktop app”, and the Codex CLI has a plugin browser too. The exclusion is explicit: “The IDE extension doesn’t support plugins.” If you live in VS Code, the Drive plugin is not available to you at all.
MCP servers are the wider cut: the CLI, the desktop app and the IDE extension all read your MCP config. Codex MCP servers is the reference for config keys and transports.
Google’s own Drive MCP server does not finish an OAuth handshake from Codex
Google ships a Drive MCP server at drivemcp.googleapis.com, and it is worth knowing why it is not the answer. It is gated behind the Google Workspace Developer Preview Program, on top of a Google Cloud project and an OAuth consent screen, and its eight tools are read-heavy, with no update and no delete.
Then there is a credential mismatch, and it is the reason people report codex mcp login hanging against it. Google’s server expects a client ID and a client secret. Codex’s OAuth configuration has a field for the client ID only, with no client secret key and no --oauth-client-secret flag. Its two fallbacks are dynamic client registration and client ID metadata documents. Reading Google’s authorization server metadata at accounts.google.com/.well-known/oauth-authorization-server today, registration_endpoint is absent, so dynamic registration is impossible, client_id_metadata_document_supported is absent, and the supported token endpoint auth methods are client_secret_post and client_secret_basic with no none, which the metadata-document path needs.
That a token exchange cannot complete from Codex today is an inference from those verified components rather than a run of the flow, and the preview gate makes it the wrong first stop either way. Hand-rolling a self-hosted Drive server is the other thing people try, and it costs a Cloud project, a Desktop-app OAuth client, an alias table to maintain, and a fresh round of all of it for the fourth account, while the maintained community servers still list cross-account search as future work.
1. Give each Drive account a role
For example, all fictional:
| Address | Role |
|---|---|
fictional.sam.okafor@gmail.com | Personal |
fictional.sam.okafor@stripe.com | Main Company |
fictional.sam.okafor@shopify.com | Client |
Use the role in ordinary queries and the full address before anything that changes a file.
2. Connect every Google account to Carly
- Sign in at carlyassistant.com.
- Open carlyassistant.com/integrations.
- Find Google Drive and click Connect.
- Choose the first Google account and approve access.
- Confirm the connected address in Carly.
Repeat for each additional Google identity, choosing Use another account if Google preselects the first login, and verify the full address after every authorization. If a Workspace account requires administrator review, ask that Workspace administrator to approve it. Each Workspace approves independently.
3. Register Carly as an MCP server
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. You can also write the entry by hand:
[mcp_servers.carly]
url = "https://carlyassistant.com/mcp/"
A url key is what makes this a streamable HTTP server; a command key would make it stdio. That is the whole rule, and there is no separate transport field to set. A trusted project can carry its own .codex/config.toml if you would rather scope the server to one repository.
Then authenticate:
codex mcp login carly
That opens a browser for the OAuth flow. Sign in to the Carly workspace holding the Drive accounts. Codex supports OAuth and bearer-token auth against remote HTTP MCP servers, so there is no API key to paste into a config file. Confirm the server is live before moving on:
codex mcp list
4. Gate the writes, and ignore the sandbox advice
The common assumption is that you have to open the sandbox to reach Drive. That is wrong, and turning the sandbox off is a real cost. OpenAI’s permissions documentation lists MCP under what the network proxy does not control: “MCP servers: Local and remote MCP servers use their own process or transport. Control them with mcp_servers configuration and managed server allowlists.” Leave your sandbox as it is.
What does gate Drive changes is approvals. OpenAI states that destructive tool calls always require approval when the tool advertises a destructive annotation, even if it also advertises read-only hints. Add one more key to the same table so reads run and writes ask:
default_tools_approval_mode = "writes"
The four modes are auto, prompt, writes and approve, with per-tool overrides underneath.
5. Test one account at a time
Start a new session so the tools load, then keep each prompt to a single account:
In
fictional.sam.okafor@stripe.com, list the five most recently modified files in the shared Engineering folder. Read only.
In
fictional.sam.okafor@gmail.com, find the newest spreadsheet with “invoice” in the title and state which account it came from.
Then the question a single plugin connection cannot answer:
Find every version of the Databricks proposal across all three Drives, tell me which is newest, and say which account each copy lives in.
If the tools are missing, start a fresh session. Codex loads a newly installed server’s tools at session start, not mid-session.
6. Reuse this routing prompt
Treat
fictional.sam.okafor@gmail.comas Personal,fictional.sam.okafor@stripe.comas Main Company, andfictional.sam.okafor@shopify.comas Client. Always state the target address before changing a file. Ask before uploads, copies, edits or deletes.
Then name the target in each action:
Copy the Q3 retro doc from Main Company into its Archive folder. Confirm the account before you act.
Nothing starts when a file lands in Drive
There is no such thing as an MCP trigger. The protocol's own working group states plainly that clients find out about server-side changes by polling for them, and a real event mechanism remains unshipped.
So a new contract in a shared folder, or a spreadsheet a client edits overnight, does not reach Codex until you open a session and ask. One detail muddies this if you skim the plugin docs: plugins can carry scheduled task templates. Those are clocks, not Drive events.
Both ChatGPT Scheduled Tasks and Claude Cowork can do unattended work on a timer. Neither ordinary scheduler is a general webhook or business-app event listener. ChatGPT Workspace Agents accept API triggers, but only after an upstream service notices the event.
Codex versus Carly on Google Drive
| Need | Codex plugin | Carly MCP server |
|---|---|---|
| Reach one Drive account | Yes | Yes |
| Two Drive accounts side by side | One connection per provider | Yes, authorize each identity |
| Setup cost for the second account | Not available | A second Connect click |
| Address a specific account in a prompt | No | Yes, by address |
| One query spanning both Drives | No | Yes |
| Works in the VS Code extension | No, plugins are excluded | Yes, MCP config is read there |
| Act when a file is added or changed | No | Yes, event triggers |
| Runs with no session open | No | Yes |
Carly gives Codex one account-aware Drive toolset instead of a single-slot plugin, with no Cloud project, no Desktop OAuth client and no alias table to maintain. It also starts on the event: the file lands, the contract gets read, the row gets written, with nobody at a terminal.
Free Zapier-style workflows; AI agents from $35/month. Connect the accounts at carlyassistant.com/integrations, then point Codex at carlyassistant.com/mcp.
Quick fixes
| Problem | Fix |
|---|---|
| Drive plugin missing in VS Code | The IDE extension does not support plugins; the MCP server works there |
| Plugin connected the wrong Google account | Domain matching steers you to the work account; connect every identity to Carly instead |
codex mcp login stalls on Google’s Drive server | It expects a client secret and Codex stores only a client ID |
| Tools do not appear after editing config | Start a new Codex session; tools load at session start |
codex mcp login carly never completes | Finish the browser OAuth flow, then rerun codex mcp list |
Project .codex/config.toml seems ignored | Project config loads only from trusted directories |
| Codex queries the wrong Drive | Use the full address and require source attribution |
Frequently asked questions
Can the Google Drive plugin hold two accounts?
No. OpenAI’s open issue 20500 describes the app and connector model as oriented around one active connection per provider, and asks for named multi-account support as a feature. Drive setup also uses domain matching to steer you to one account. The plugin also does not run in the IDE extension at all.
How many Google Drive accounts can this reach?
As many as you authorize in Carly. Codex connects to one server, so the account count is a Carly setting rather than a Codex one.
Will Codex notice when a file changes in Drive?
No. MCP has no trigger mechanism, so nothing runs until you ask inside a session. Scheduled task templates in plugins run on a clock, which is not the same as reacting to a file landing. Carly runs on the event.
Related: Codex MCP servers · Multiple Gmail accounts in Codex · Multiple Google Calendars in Codex · Multiple Notion workspaces in Codex · Best AI assistants for Google Drive · MCP servers · Google Drive 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."


