Several OneDrive accounts reached from a single terminal session

How to Connect Multiple OneDrive Accounts to Codex

Want Codex working across your OneDrive accounts? Codex has no OneDrive connector at all, so on its own it reaches none of them. Connect your accounts to Carly and you can add as many as you want, then one Codex session can search across all of them.

1. Add your OneDrive accounts to Carly

  1. Sign in at carlyassistant.com.
  2. Open carlyassistant.com/integrations.
  3. Find OneDrive, click Connect, and authorize the account.
  4. Click Connect again for the next one, and keep going for as many accounts as you want.

Repeat for every additional identity, using a private window if Microsoft preselects the previous login. Personal Outlook.com accounts and Microsoft 365 work accounts connect the same way, and each tenant approves independently, so one company’s administrator declining does not block the others.

Carly connects to thousands of apps, so while you are on that page you can add your inboxes, calendars, CRM, and anything else you want Codex to reach through the same connector.

2. 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. The hand-written equivalent:

[mcp_servers.carly]
url = "https://carlyassistant.com/mcp/"
default_tools_approval_mode = "writes"

A url key is what makes this a streamable HTTP server; a command key would make it stdio. There is no transport field to set in Codex, and adding one is a mistake rather than a hint. The approval mode is worth setting from the start: reads run, and anything that changes a drive stops for confirmation.

Then authenticate:

codex mcp login carly

That opens the browser OAuth flow. Sign in to the Carly workspace holding the drives. Codex supports OAuth and bearer tokens against remote HTTP MCP servers, so no secret sits in a config file. A trusted project can keep its own .codex/config.toml if you would rather scope the server to one repository. Verify with:

codex mcp list

What one chat can do afterwards

  • Search a personal Microsoft drive and two work tenants in the same question.
  • Say which account each copy of a document lives in.
  • Upload, move, share or delete a file in the drive you name.
  • Add a fourth tenant without a new sign-in ritual or a config edit.
  • Reach the drives from the IDE extension, the CLI and the desktop app alike.
  • Act when the file lands in the client folder, with no session open.

Nothing is merged. Each Microsoft identity keeps its own authorization, and every drive stays individually addressable.

Three different Microsoft things get confused here

Sort these before you start, because search results mix them freely.

OpenAI’s Codex documentation index carries no OneDrive, SharePoint or Microsoft entry at all. That absence is meaningful rather than a search failure: the same index lists third-party pages for GitHub, Linear and Slack, so the probe finds things when they exist. OpenAI’s plugins documentation names Codex Security, Gmail, Google Drive and Slack, plus GitHub as a connector. No Microsoft storage anywhere in it.

It exists. Microsoft documents a Work IQ OneDrive server with a tenant-scoped URL and tools covering listing, search, metadata, reads and writes, folder creation, rename, delete, share and sensitivity labels.

The community server route, and what it costs

For completeness, there is a generic Graph-backed community server, @softeria/ms-365-mcp-server, which maps hundreds of tools one-to-one onto Microsoft Graph endpoints and does support several signed-in accounts, injecting an account parameter into every tool once more than one is cached. Its README never mentions Codex, so compatibility is an inference rather than a vendor promise.

What it costs is worth knowing before you choose it. Every account needs its own device-code sign-in at the terminal, and every tenant’s own user-consent policy decides whether you self-consent or bounce to an administrator. A cross-drive question becomes a fan-out of per-account calls rather than one request. Node, an npx fetch on first launch and a startup_timeout_sec you will end up raising all sit in the path. And it watches nothing, which is the next section.

Nothing fires when a file lands, and one thing looks like it does

MCP has no trigger and no scheduler. Its own Triggers and Events working group opens by conceding that clients learn about server-side changes by polling or by holding a connection open, and the specification work for a callback mechanism is still listed as ideating rather than shipped. Carly supplies the missing half: connect it and the workflows that start on an event run behind whatever assistant you already use.

The Triggers and Events working group charter is dated March 2026 and its events item is still at the ideating stage with no champion assigned, so this is not a next-release matter.

Here is the trap. Graph-backed servers expose create-subscription, list-subscriptions and get-drive-delta, and those names read like triggers. They are not. A Graph subscription pushes to a publicly reachable notification URL you have to run yourself, and nothing delivers into a Codex session. delta is a poll you initiate. The file-triggered half of the job runs on Carly’s side.

One related myth: the sandbox does not gate MCP. Codex’s sandbox_workspace_write.network_access setting governs outbound network access for code and shell commands, and MCP is absent from the sandboxing documentation entirely, so do not turn network access on hoping to fix a server that will not load.

Codex versus Carly on OneDrive

NeedCodex aloneCarly MCP server
Reach one OneDrive accountOnly via a server you registerYes
Hold several personal accounts and tenantsNot nativelyYes, one connection each
Read, write, delete, share filesDepends on the serverYes
Answer one question across two drives at onceA sequence of per-account callsOne request
Setup cost per extra accountA terminal sign-in and a consent promptA Connect click
Act when a file arrives or changesNo, nothing watchesYes
Run when nothing is openNo, you are at the keyboardYes

Carly authorizes each Microsoft identity as its own connection, so one question spans a personal drive and two tenants without a per-account fan-out, and its workflows start from the event: the file lands in the client folder, gets read, filed and logged, and the right person hears about it with no terminal open. Carly reaches roughly 260 apps natively and anything else with a public API through your own key, so the drive is rarely the only step in the chain.

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

ProblemFix
No tools appear after codex mcp addStart a new Codex session; tools load at session start
codex mcp login carly never completesFinish the browser OAuth flow, then rerun codex mcp list
Codex rejected the configRemove any type key. Codex selects stdio from command and streamable HTTP from url
A tenant blocks the sign-inThat tenant restricts user consent; ask its Microsoft 365 administrator to approve
Codex writes to the wrong driveUse the full address in the prompt and require the account name in every answer
Microsoft connected the same drive twiceRemove the duplicate and reconnect from a private window
You expected MCP in Codex cloudMCP works on the surfaces running on your machine; OpenAI’s MCP page does not cover cloud

Frequently asked questions

Does Codex have a native OneDrive integration?

No. OpenAI’s Codex documentation index lists no OneDrive, SharePoint or Microsoft connector, while it does carry third-party pages for GitHub, Linear and Slack. Codex reaches OneDrive through an MCP server you register yourself.

How many OneDrive accounts can Codex 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, and personal Microsoft accounts and work tenants mix freely.

Will an administrator have to approve this?

Sometimes, and it depends on the tenant rather than on the permission. Microsoft’s Graph reference lists delegated Files.Read and Files.ReadWrite as not requiring admin consent, but each tenant sets its own user-consent policy and decides separately, so one blocked client does not affect the others.

Can Codex notice when a file lands in OneDrive?

No. Graph subscription and delta tools are not triggers: a subscription pushes to a public notification URL you would have to host, and delta is a poll you start. Nothing arrives in a Codex session on its own, which is why the watching half runs in a Carly workflow.

Why not use Microsoft’s official OneDrive MCP server?

Because Codex is not a supported client for it. Microsoft lists the Microsoft 365 admin center, Copilot Studio and Foundry, requires a Microsoft 365 Copilot license, and caps file operations at 5 MB in the current preview.


Related: Codex MCP servers · Multiple Outlook accounts in Codex · Multiple Outlook calendars in Codex · Multiple OneDrive accounts in ChatGPT · MCP servers · Best AI assistants for multiple Microsoft accounts · OneDrive 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."

Gus Ibrahim, Founder & Director, IHR