Multi-Gmail MCP Server
Allows searching and reading email threads and messages from multiple Gmail accounts simultaneously, with the ability to specify which account to query.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Multi-Gmail MCP Serversearch my business Gmail for invoices from May"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Multi-Gmail MCP Server
Connects more than one Gmail account to Claude at the same time. Claude's
built-in Google connector only holds one account — this runs locally instead
and exposes search_threads / get_thread / get_message, each taking an
account label so you (and Claude) can pick which mailbox to query.
Read this whole file before running anything — steps 1–4 happen on Google's site, not in this project.
1. Create a Google Cloud OAuth client (one-time, ~10 minutes)
You have to do this part yourself — it needs your own Google login.
Go to https://console.cloud.google.com/ and create a new project (top left project picker → New Project). Name doesn't matter, e.g. "Personal Gmail MCP".
Enable the Gmail API: left sidebar → APIs & Services → Library → search "Gmail API" → Enable.
Configure the OAuth consent screen: APIs & Services → OAuth consent screen.
User type: External
App name / support email: anything, e.g. "Personal Gmail MCP" / your email
Scopes: leave blank here, the app requests the scope itself
Test users: add every Gmail address you plan to connect (both the personal and the business one). While the app is in "Testing" status, only addresses on this list can sign in — this is expected and fine, you don't need to publish or verify the app.
Create the OAuth client: APIs & Services → Credentials → Create Credentials → OAuth client ID.
Application type: Desktop app
Name: anything
Click Create, then Download JSON
Rename the downloaded file
credentials.jsonand put it directly in this folder (gmail-mcp-server/credentials.json). This file is git-ignored — never commit it or share it.
Tokens expire after 7 days in "Testing" mode — this is normal
While the OAuth app's publishing status is Testing, Google expires the
refresh token for every connected account after 7 days. When it happens all
your accounts usually fail at once, with invalid_grant, because they were
authorised on the same day.
The fix is step 2 again for that account — 30 seconds, no Google Cloud changes.
The server re-reads tokens/ whenever the files change, so a re-auth takes
effect on the next tool call; you do not need to restart Claude.
If the weekly re-auth annoys you, set the OAuth consent screen to In
production and refresh tokens stop expiring. Because gmail.readonly is a
restricted scope Google may ask for verification; for a desktop app used only
by your own accounts, many people publish and accept the "unverified app"
warning at sign-in.
Related MCP server: gmail-mcp-server
2. Connect each Gmail account
From this folder:
npm run auth -- personalThis opens your browser, has you sign in and grant read access, then
saves a token under tokens/personal.json. personal is just a label
you choose — pick whatever's memorable.
Repeat for the second account:
npm run auth -- businessRun npm run auth -- <label> again any time to add another account or
reconnect one whose access was revoked.
Only gmail.readonly scope is requested — this server can search and
read mail, not send, delete, or modify anything.
3. Register the server with Claude Code
Option A — CLI:
claude mcp add multi-gmail -- node "/absolute/path/to/multi-gmail-mcp/server.js"Option B — manual config: add this to your .mcp.json (project-level) or
Claude Code's user-level MCP settings:
{
"mcpServers": {
"multi-gmail": {
"command": "node",
"args": ["/absolute/path/to/multi-gmail-mcp/server.js"]
}
}
}Restart Claude Code (or start a new session) after adding it. Tools then
appear as list_accounts, search_threads, get_thread, get_message —
ask Claude to use them same as any other tool, e.g. "search the business
Gmail for invoices from May" — Claude will call search_threads with
account: "business".
What this does and doesn't do
Reads mail from every account you've run
npm run authfor, in the same conversation, without needing to disconnect/reconnect anything.Read-only — cannot send, label, delete, or modify email.
Cannot read attachment content (same limitation as Claude's built-in Gmail connector) — only filename/type/size.
Runs entirely on this machine. Tokens live in
tokens/*.json, never leave your computer except to talk to Google's API directly.This is unreviewed code written for you, not an audited product — reasonable for your own accounts, not something to hand to anyone else or point at a shared/company mailbox without a closer look first.
Credits
Created by Mohit Garg.
Built because Claude's built-in Google connector holds one account at a time, and some of us have four.
License
MIT — see LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Multiple Google accounts (Gmail, Calendar, Drive, Contacts, Tasks) in one Claude connector.
1Connect any mailbox to Claude, ChatGPT & AI: read, send, reply, schedule & search emails.
Manage Gmail end-to-end: search, read, send, draft, label, and organize threads. Automate workflow…
Read, organise and send from your existing email accounts. Nothing sends without your approval.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables seamless email management through natural language conversations with Claude. Supports searching, reading, and sending emails securely with Gmail and other email providers.4MIT
- AlicenseNot gradedqualityFmaintenanceEnables reading, sending, searching, and managing Gmail through Claude using the official Google Gmail API.1383MIT
- AlicenseNot gradedqualityCmaintenanceEnables Claude to read, search, send, label, and trash emails in any Gmail account via Google's Gmail API, using OAuth2 authentication with automatic token refresh.67MIT
- AlicenseNot gradedqualityCmaintenanceEnables searching and summarizing emails across multiple Gmail accounts simultaneously through Claude.1MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/mohitgargcanada-max/multi-gmail-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server