PluginBench
MCP Server
Active
MIT

io.github.gx-55/multi-gmail-mcp MCP Server

io.github.gx-55/multi-gmail-mcp

Manage multiple Gmail accounts in Claude Desktop — search, send, reply, and organize emails.

What is the io.github.gx-55/multi-gmail-mcp MCP server?

The multi-gmail-mcp MCP server lets Claude Desktop manage unlimited Gmail accounts simultaneously with full read/write capabilities. It supports searching, reading, sending, replying, drafting, and organizing emails across multiple accounts using Gmail's native search syntax and label system.

This server bridges Claude and Gmail, enabling you to handle email workflows directly from Claude Desktop. You can authenticate multiple Gmail accounts (personal, work, side projects), search with full Gmail syntax, read complete emails, send and reply in threads, create drafts, and organize with labels—all while keeping OAuth tokens stored securely on your machine.

How to install io.github.gx-55/multi-gmail-mcp

Copy-paste configuration for popular MCP clients.

transport: stdio
Config generated by PluginBench — verify against the source before use.
Environment / auth
  • GOOGLE_CLIENT_ID

    Google OAuth2 client ID from your Google Cloud project (alternative to ~/.gmail-mcp-oauth.json)

  • GOOGLE_CLIENT_SECRET
    secret

    Google OAuth2 client secret from your Google Cloud project (alternative to ~/.gmail-mcp-oauth.json)

~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "multi-gmail-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "multi-gmail-mcp"
      ],
      "env": {
        "GOOGLE_CLIENT_ID": "<YOUR_GOOGLE_CLIENT_ID>",
        "GOOGLE_CLIENT_SECRET": "<YOUR_GOOGLE_CLIENT_SECRET>"
      }
    }
  }
}

Tools & capabilities

Tools this server exposes to the agent.

  • list_accounts — List all authenticated Gmail accounts
  • initiate_auth — Start OAuth flow — returns a URL to open in browser
  • complete_auth — Finalize auth after completing Google sign-in
  • remove_account — Remove an account and its stored credentials
  • search_emails — Search with Gmail syntax (is:unread, from:, after:, etc.)
  • get_email — Fetch full email content by message ID
  • send_email — Send an email (supports To, CC, BCC)
  • reply_to_email — Reply in thread, preserving References headers
  • create_draft — Save an email as a draft
  • list_labels — List all Gmail labels for an account
  • add_label — Add one or more labels to a message
  • remove_label — Remove one or more labels from a message
  • archive_email — Remove from Inbox
  • mark_as_read — Remove the UNREAD label
  • mark_as_unread — Add the UNREAD label

Use cases

  • Search and filter emails across multiple accounts using Gmail's full search syntax (unread, from, date range, etc.)
  • Send emails and reply in threads from specific Gmail accounts without leaving Claude
  • Organize emails by adding, removing, or listing labels and archiving messages
  • Summarize or extract information from emails across personal and work accounts simultaneously
  • Create and save email drafts for review before sending

io.github.gx-55/multi-gmail-mcp MCP server FAQ

What is the multi-gmail-mcp server?

It's an MCP server that gives Claude Desktop the ability to manage multiple Gmail accounts—search, read, send, reply, draft, and organize emails—all through Claude's interface.

Is it free to use?

Yes, it's open-source and free. You only need a Google Cloud project with the Gmail API enabled, which is free to set up.

How do I install it in Claude Desktop?

Run `npm install -g multi-gmail-mcp`, set up a Google Cloud OAuth credential, save it to `~/.gmail-mcp-oauth.json`, then add the server to your Claude Desktop config at `~/Library/Application Support/Claude/claude_desktop_config.json`.

Do I need to authenticate each Gmail account?

Yes. After installation, run `gmail-mcp-cli add your@gmail.com` for each account you want to connect. This opens a browser for Google sign-in and stores tokens locally.

Where are my Gmail credentials stored?

OAuth tokens are stored in `~/.gmail-mcp-tokens.db` on your machine—never committed to git or sent to external servers. The server runs over stdio only with no network port.

Can I use it with multiple Gmail accounts at once?

Yes, you can authenticate unlimited accounts (personal, work, side projects) and Claude can manage all of them in a single conversation.

README (reference)

Source of truth, from the repository.

multi-gmail-mcp

A Model Context Protocol (MCP) server that lets Claude Desktop manage multiple Gmail accounts simultaneously. Listed on the official Anthropic MCP registry and published on npm.

demo


Features

  • Connect unlimited Gmail accounts — personal, work, side projects
  • Search any inbox using full Gmail search syntax
  • Read complete emails with MIME parsing
  • Send, reply in thread, and create drafts
  • Organize with labels: add, remove, list, archive
  • Mark as read / unread
  • Tokens stored locally in ~/.gmail-mcp-tokens.db — never committed to git
  • Auto-refreshes OAuth tokens silently

Requirements

  • Node.js >= 22.5.0
  • A Google Cloud project with the Gmail API enabled
  • Claude Desktop

Installation

npm install -g multi-gmail-mcp

This registers two global commands: gmail-mcp (the MCP server) and gmail-mcp-cli (account manager).


Google Cloud Setup

You only need to do this once.

  1. Go to console.cloud.google.com → create a project
  2. Enable the Gmail API (APIs & Services → Library)
  3. Configure the OAuth consent screen — External, add your Gmail addresses as test users
  4. Add scopes: gmail.readonly, gmail.send, gmail.modify, gmail.labels
  5. Create a Desktop app OAuth credential → download the JSON
  6. Save it to ~/.gmail-mcp-oauth.json

Alternatively, set environment variables in the Claude Desktop config (see below).


Authenticating Gmail Accounts

# Add accounts (opens browser for Google sign-in)
gmail-mcp-cli add personal@gmail.com
gmail-mcp-cli add work@company.com

# List authenticated accounts
gmail-mcp-cli list

# Remove an account
gmail-mcp-cli remove work@company.com

Tokens are saved to ~/.gmail-mcp-tokens.db and refreshed automatically.


Claude Desktop Configuration

Edit ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "multi-gmail": {
      "command": "gmail-mcp"
    }
  }
}

If you prefer environment variables over ~/.gmail-mcp-oauth.json:

{
  "mcpServers": {
    "multi-gmail": {
      "command": "gmail-mcp",
      "env": {
        "GOOGLE_CLIENT_ID": "your-client-id.apps.googleusercontent.com",
        "GOOGLE_CLIENT_SECRET": "your-client-secret"
      }
    }
  }
}

Restart Claude Desktop after saving. Click the hammer icon to confirm 19 tools are loaded.


Available Tools

Account Management

ToolDescription
list_accountsList all authenticated Gmail accounts
initiate_authStart OAuth flow — returns a URL to open in browser
complete_authFinalize auth after completing Google sign-in
remove_accountRemove an account and its stored credentials

Reading Email

ToolDescription
search_emailsSearch with Gmail syntax (is:unread, from:, after:, etc.)
get_emailFetch full email content by message ID

Writing Email

ToolDescription
send_emailSend an email (supports To, CC, BCC)
reply_to_emailReply in thread, preserving References headers
create_draftSave an email as a draft

Organization

ToolDescription
list_labelsList all Gmail labels for an account
add_labelAdd one or more labels to a message
remove_labelRemove one or more labels from a message
archive_emailRemove from Inbox
mark_as_readRemove the UNREAD label
mark_as_unreadAdd the UNREAD label

Example Prompts

List all my authenticated Gmail accounts.
Search my work@company.com inbox for unread emails from this week.
Reply to that email from my personal account saying I'll be there Saturday.
Send an email from personal@gmail.com to friend@example.com
with subject "Dinner plans" and body "Are you free Saturday?"
Archive everything older than a week in my side-project inbox that's already read.
Check both my accounts for emails from GitHub and summarize them.

Security

  • ~/.gmail-mcp-oauth.json and ~/.gmail-mcp-tokens.db live in your home directory — outside the project, never committed
  • .gitignore excludes *.db, .gmail-mcp-oauth.json, and .env
  • The server runs over stdio only — no network port is opened
  • OAuth scopes are limited to the minimum required

See SECURITY.md for full details: token storage, network behavior, scope rationale, revocation steps, and how to report a vulnerability.


Registry

Listed on the official Anthropic MCP registry:

io.github.gx-55/multi-gmail-mcp
curl "https://registry.modelcontextprotocol.io/v0.1/servers?search=io.github.gx-55"

Project Structure

multi-gmail-mcp/
├── bin/
│   ├── gmail-mcp.js        # Entry point for the MCP server command
│   └── gmail-mcp-cli.js    # Entry point for the CLI command
├── src/
│   ├── server.js           # MCP server — all 19 tools
│   ├── gmail-client.js     # Gmail API wrapper
│   ├── auth.js             # OAuth2 flow with auto-refresh
│   ├── db.js               # SQLite token storage (node:sqlite)
│   └── cli.js              # Account management CLI
└── package.json

Troubleshooting

"No OAuth credentials found" Make sure ~/.gmail-mcp-oauth.json exists or set GOOGLE_CLIENT_ID / GOOGLE_CLIENT_SECRET in the Claude Desktop config.

"Account not found. Authenticate it first" Run gmail-mcp-cli add your@gmail.com before using that account in Claude.

Tools not appearing in Claude Desktop Confirm gmail-mcp is in your PATH (which gmail-mcp) and restart Claude Desktop.

Token expired errors Tokens auto-refresh if a valid refresh token is stored. If refresh fails, remove the account and re-authenticate: gmail-mcp-cli remove your@gmail.com && gmail-mcp-cli add your@gmail.com.

Related MCP servers

Read-only MCP server for Huawei GaussDB (centralized & distributed), built for coding agents.

1
Go
Apache-2.0
View repository →
AAAAI Gateway logo

Unified MCP & Skill management gateway that reduces context tokens by 99% and auto-discovers tools across AI agents.

98
TypeScript
Apache-2.0
View repository →

Job postings with real posting dates, read from employers' Greenhouse/Lever/Ashby/Beisen/Moka ATS.

2
Python
MIT
View repository →

RISE CRM MCP server — 36 tools across CRM, projects, tickets, finance, sales, HR, and reports.

View repository →

Model Context Protocol server for the DocAuto document-generation API.

View repository →

Trade bonding curve tokens on Base via Mint Club V2 — buy, sell, swap, create

6
TypeScript
View repository →