How to Connect Multiple Email Accounts to Claude Code
One Claude Code session can work across every Gmail and Outlook account you own at the same time. Connect each mailbox to Carly, register one MCP server, and the terminal reads all of them together.
Claude Code’s own route to mail is narrower. Anthropic’s Claude Code documentation describes two paths outside your repository: MCP servers you register yourself, and the connectors on your claude.ai account, which load automatically on a subscription login and cover Gmail, Google Calendar, Microsoft 365 and Slack. Those connectors hold one account per provider. An open feature request on the Claude Code GitHub repository says it plainly about Slack, that the built-in connector supports only one workspace per Claude account, and a separate request for multi-account connectors came from someone running a personal Gmail through MCP while reaching their work Gmail by driving a browser. A personal Gmail beside a work Microsoft 365 mailbox is fine. A second Gmail beside the first is not.
The account count is therefore a property of the server you register, never a Claude Code setting.
1. Add your Gmail and Outlook mailboxes to Carly
- Sign in at carlyassistant.com.
- Open carlyassistant.com/integrations.
- Find Gmail and Outlook, click Connect, and authorize the mailbox.
- Click Connect again for the next one, and keep going for as many accounts as you want.
Mix providers freely. Two Gmail addresses, a personal Outlook.com address and two Microsoft 365 mailboxes at different employers can all sit side by side in the same Carly account.
Providers like to reuse the session you are already signed into, so choose Use another account on Google’s screen, or a private window on Microsoft’s, and check the full address after every authorization.
A work account governed by an administrator may need approval first. Each Workspace and each Microsoft tenant decides on its own, so approval at one employer says nothing about the other.
Carly connects to thousands of apps, so while you are on that page you can add your calendars, files, CRM and anything else you want Claude Code to reach through the same connector.
2. Register Carly as an MCP server
Carly is a remote HTTP server, so one command does it:
claude mcp add --transport http --scope user carly https://carlyassistant.com/mcp/
--scope user stores the entry in ~/.claude.json and loads it in every project, which is what you want for mail. Leave the flag off and it lands in local scope, available only in the directory where you added it. --scope project writes a committed .mcp.json instead, which is the right choice when a team shares the server.
Then authenticate:
claude mcp login carly
That opens a browser for the OAuth flow. Sign in to the Carly workspace holding your mailboxes. The /mcp panel inside a session runs the same flow if you would rather stay in Claude Code, and claude mcp login carly --no-browser prints the URL instead, which is what you want over SSH.
Confirm it before moving on:
claude mcp list
✔ Connected means you are ready. ! Needs authentication means the browser flow did not finish, and ✘ Failed to connect points at the URL or the network rather than your Carly account.
What one session can do afterwards
- “Check all my inboxes for anything from Databricks about the renewal and tell me which threads still need a reply today.”
- Sweep every mailbox for the Stripe invoice without guessing which address it landed in.
- Build one morning briefing that covers personal Gmail and work Outlook together, grouped by inbox.
- Draft replies across several accounts in one pass, each sent from its own address.
- Label, move, flag or archive in the correct account.
- Read all of your calendars for conflicts while writing to only one.
- Answer a team inbox such as
billing@alongside your own.
Nothing is merged and nothing is forwarded. Each mailbox keeps its own credentials and its own authorization, and every action reports the address it came from.
Why one server per mailbox falls apart
The usual do-it-yourself route is a mail MCP server per account, with your own Google Cloud project or Microsoft Entra application behind each one. That survives a single address. Josh Whitaker, running a personal Gmail, a Workspace account at his own company and a Microsoft 365 mailbox at a client, is not managing one integration with three logins. He is managing three server entries, two OAuth applications and a consent chain owned by an administrator he has never met.
Token upkeep is where it bites. Reports on the Claude Code GitHub repository about MCP OAuth credentials going stale are steady: one request asks for automatic refresh on expiry, noting tool calls start failing with no warning and that the problem compounds when several servers expire at different times. An open bug describes a custom HTTP server showing “Connection expired” daily despite a valid refresh token. A third describes a Gmail connector refusing to switch Google accounts, reporting that access already exists while every tool call comes back not connected. Each extra server you register is another one of those waiting to happen.
Carly is one server entry and one sign-in for all of your mail, so adding a fourth mailbox next quarter changes nothing in your config.
The part that outlives the session
Terminal sessions end. The mail does not. Triage at 8am, the follow-up on a quote nobody answered, the receipt that has to reach the bookkeeper: all of it recurs, and none of it should depend on a window being open.
That work belongs in a Carly workflow or a Carly agent, which runs with nothing open and no session attached. Carly watches each connected mailbox as its own trigger source, so a rule can fire on mail arriving at the client address and stay silent on the personal one. Claude Code then becomes the place you go to ask sharp questions about work that already happened.
One detail matters if you want Carly inside a Claude Code routine. A routine is a prompt, one or more GitHub repositories and a set of connectors, run in the cloud when a trigger fires, and it draws those connectors from your claude.ai account. A server added locally with claude mcp add lives on your machine instead, so add Carly at claude.ai/customize/connectors as well, or commit it in .mcp.json so it travels with the cloned repository. Routines themselves start from a schedule, a GitHub event or an API call you make, and every one of them needs a repository, so none of them notices a client emailing you.
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. Shared mailboxes wired up across a whole team are available too: book a call.
Per-account MCP servers versus Carly in Claude Code
| Need | Per-account mail MCP servers | Carly MCP server |
|---|---|---|
| Reach one mailbox | Yes | Yes |
| Reach two Gmail accounts at once | One server each | One server, all of them |
| Reach Gmail and Outlook in one question | Two servers, two vocabularies | One server, one question |
| Mailboxes in two Microsoft tenants | Consent per tenant, per app | Both, side by side |
| Maintain your own OAuth applications | Usually required | No |
| Add a fourth mailbox later | New server entry | No config change |
| Keep the work running with the terminal closed | No | Yes |
Carly gives Claude Code one account-aware mail toolset instead of a stack of per-inbox servers. Carly offers free Zapier-style workflows; AI agents start at $35/month.
Quick fixes when a mailbox does not appear
| Problem | Fix |
|---|---|
Server shows ! Needs authentication | Run claude mcp login carly and finish the browser flow |
| Server missing in another project | Re-add with --scope user, or move the entry out of local scope |
claude -p reports the tools are unavailable | Sign in interactively once with /mcp, then rerun the script |
| Google reconnected the same Gmail twice | Remove the duplicate and reconnect with Use another account |
| Microsoft reused the signed-in mailbox | Sign out or use a private window, then reconnect |
| A Workspace or tenant blocks authorization | Ask that administrator to approve Carly |
| Only some inboxes answered | Ask for all of them explicitly and require source attribution |
Frequently asked questions
Does Claude Code have a built-in email connector?
It inherits the connectors on your claude.ai account when you sign in with a subscription login, which covers Gmail and Microsoft 365 at one account each. Everything beyond that is decided by the MCP server you register. Point Claude Code at Carly at https://carlyassistant.com/mcp/ and every mailbox Carly holds is reachable from one session.
Can Claude Code connect Gmail and Outlook at the same time?
Yes, one of each through the claude.ai connectors. For several of either, connect every mailbox to Carly and register Carly once. A single session then works across all of them together.
How many email accounts can this reach?
As many as you authorize in Carly. Claude Code talks to one server, so the account count is a Carly setting.
Will this work in a non-interactive run?
Yes, once you have signed in. Claude Code cannot run an OAuth flow during a claude -p run, so complete claude mcp login carly from an interactive session first and the script inherits the stored token.
What about a shared mailbox like billing@?
Carly connects it as a mailbox of its own, listed beside your personal accounts, so an unattended run can answer it rather than leaving drafts in it. See Can Claude access a shared mailbox?.
Should I use Claude Code for inbox work?
For scripted or one-off mailbox work from a terminal, it is a genuine fit. Recurring triage, drafting and follow-up belong in a Carly workflow that runs without a session open.
Related: Multiple Gmail accounts in Claude Code · Multiple Outlook accounts in Claude Code · Claude Code multiple accounts · Connect multiple email accounts to Claude · Claude Code MCP · Best AI assistants for multiple email accounts
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."

