How to Connect Claude Code to Gmail
Run `claude mcp add --transport http connect-my-email https://mcp.connectmyemail.com/mcp` in your terminal, then sign in to Connect My Email when Claude Code opens the browser. Claude Code gets 150+ email tools against your real inbox.
The manual method
- 1Create a Google Cloud project
Set up a project in Google Cloud Console and enable the Gmail API.
- 2Configure an OAuth client
Create OAuth credentials, configure the consent screen, and add yourself as a test user.
- 3Self-host a Gmail MCP server
Clone an open-source Gmail MCP repo, wire in your client ID and secret, and run it locally.
- 4Register it with Claude Code
Add the local server via `claude mcp add`, then complete the OAuth flow and manage token refresh yourself.
The CME + your AI method
Connect My Email gives your AI live access to your real inbox via MCP.
- 1Sign up and connect Gmail
Create a free account at connectmyemail.com and authorize your Gmail via OAuth — no Google Cloud project needed.
- 2Sign in from Claude Code
The first time Claude Code connects, it opens a Connect My Email sign-in page. No API key goes in the MCP config.
- 3Add the MCP server
Run: claude mcp add --transport http connect-my-email https://mcp.connectmyemail.com/mcp
- 4Ask Claude Code to work your inbox
'Find every newsletter in my Gmail and simulate a cleanup' — Claude Code previews before anything moves.
Manual vs. CME + your AI
Frequently asked questions
Does Claude Code support remote MCP servers?
Yes — `claude mcp add --transport http` accepts a remote URL and handles the sign-in, which is exactly how CME connects.
Is my Gmail password shared with Claude Code?
No. Gmail is authorized through CME, and Claude Code holds only your CME credential. CME does not maintain a secondary inbox archive; metadata and feature-specific content are handled under the privacy policy.
Can Claude Code delete emails through this?
Yes, on paid tiers with write actions — and cleanup is always simulated first so you see exactly what would move before confirming.
Does this work for inboxes other than Gmail?
Yes — iCloud, Yahoo, Fastmail, Zoho, AOL, and any IMAP account connect through the same MCP endpoint (Outlook coming soon). ProtonMail works via Bridge on a self-hosted connector only.
Let your AI do this for you.
Free tier available. Connect your inbox in under a minute.