How to Connect Multiple Gmail Accounts to Claude Code
One Claude Code session can search, draft, and send across every Gmail account you own once Carly is holding them. Authorize each Google identity in Carly, register one MCP server, and the terminal addresses whichever inbox you name. The same Carly account holds your Outlook mailboxes and every calendar on both sides, so you set this up once for all of it.
Claude Code reaches mail the way it reaches everything outside your repository: through the Model Context Protocol. That makes the account question a server question, not a Claude Code setting. Whichever server you register decides how many inboxes exist.
1. Add your Gmail accounts to Carly
- Sign in at carlyassistant.com.
- Open carlyassistant.com/integrations.
- Find Gmail, click Connect, and authorize the account.
- Click Connect again for the next one, and keep going for as many accounts as you want.
Repeat for each additional identity, choosing Use another account if Google preselects the first login. Verify the full address after every authorization before adding the next.
If a Google Workspace account requires administrator review, ask that Workspace administrator to approve the connection, then finish authorization. Each Workspace approves independently.
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 server in ~/.claude.json and loads it in every project, which is what you want for mail. Drop the flag and it lands in local scope, available only in the directory where you added it. Use --scope project instead to write it into a committed .mcp.json and share it with a team.
Then authenticate:
claude mcp login carly
That opens a browser for the OAuth flow. Sign in to the Carly workspace holding the Gmail accounts. You can also complete the same flow from the /mcp panel inside a session.
Confirm the server is live before moving on:
claude mcp list
A healthy entry reads ✔ Connected. ! Needs authentication means the OAuth flow did not finish, and ✘ Failed to connect means the URL or network is the problem, not your Carly account.
What one session can do afterwards
- Search two employers’ inboxes in the same question.
- Pull the thread that explains a failing deploy from whichever account received it.
- Build a morning briefing grouped by inbox.
- Draft or send from the exact address you name.
- Label, archive, or move mail in the correct account.
- Read several calendars while writing to only one.
Nothing is merged and nothing is forwarded. Each Google identity keeps its own authorization, and Carly keeps every account separately addressable.
Why one server beats one per account
The usual route is a per-inbox Gmail MCP server, often with your own Google Cloud project and OAuth client behind it. That is survivable for one address. Three addresses means three server entries in your config, three OAuth apps to keep alive, and no shared vocabulary for telling Claude which inbox you meant.
The part that outlives the session
A terminal session ends when you close it. Most inbox work does not: triage every morning, chase the quote that went quiet, file the receipts, answer the third client in the same voice as the first two.
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 individually, so a rule can fire on mail arriving in the client account and stay silent on the personal one. Claude Code then becomes the place you go to ask questions about work that already happened, rather than the thing that has to be running for the work to happen at all.
There is a wrinkle worth knowing if you want Carly available inside a Claude Code routine. Routines run in the cloud and use the connectors on your claude.ai account, and a server you added locally with claude mcp add lives on your machine rather than your account. To use Carly in a routine, add it at claude.ai/customize/connectors as well, or declare it in a committed .mcp.json so it arrives with the cloned repository. Claude Code routines also start from a schedule, a GitHub pull request or release, or an HTTP call you build yourself, and every one of them requires a repository. None of that notices a lead emailing you.
Per-account MCP servers versus Carly in Claude Code
| Need | Per-account Gmail MCP server | Carly MCP server |
|---|---|---|
| Reach one inbox | Yes | Yes |
| Reach several inboxes | One server per account | One server, all accounts |
| Address a specific account in a prompt | No shared convention | Yes, by email address |
| Manage your own Google OAuth client | Usually required | No |
| Add a fourth account 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 an inbox 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 connected the same Gmail twice | Remove the duplicate and reconnect with Use another account |
| A Workspace blocks authorization | Ask that Workspace administrator to approve Carly |
| Claude queries the wrong inbox | Use the full address and require source attribution |
Frequently asked questions
Does Claude Code have a built-in Gmail connector?
Claude Code reaches outside services through MCP servers rather than a bundled mail integration, so what it can do with Gmail is decided by the server you register. Point it at Carly at https://carlyassistant.com/mcp/ and every inbox Carly holds becomes reachable from one session.
How many Gmail accounts can this reach?
As many as you authorize in Carly. Claude Code connects to one server, so the account count is a Carly setting rather than a Claude Code one.
Will this work in a non-interactive run?
Yes, once you have signed in. Claude Code cannot run the 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.
Should I use Claude Code for inbox work?
For scripted, 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: Claude Code alternatives · Multiple Outlook accounts in Claude Code · Multiple Gmail accounts in Codex · Claude Code pricing · What is Claude Code · Gmail MCP
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."


