MCP Directory

MCP Server for Gmail: The Options, Ranked

Four real ways to give an AI assistant your inbox — and the one that gets you sending mail in about five minutes.

Hua·June 30, 2026·6 min read
Hands holding a smartphone over a laptop with coffee in a cozy home office setup.
Photo by Jakub Zerdzicki on Pexels

An MCP server for Gmail gives your AI client — Claude Desktop, Cursor, or anything that speaks MCP — typed tools to search, read, draft, and send email from your account. There is no single official Gmail server from Google, so the real choice is between a community stdio server you run locally, a provider-agnostic IMAP/SMTP server, or a hosted remote endpoint that also covers calendar and contacts.

This is a straight comparison of the options that actually work today, with the config for each. If you're new to the protocol, what an MCP server is covers the basics; if you just want the fastest path to sending mail, skip to the config for GongRzhe's Gmail server.

The fastest option: GongRzhe's Gmail MCP server

For most people the answer is the Gmail MCP Server by GongRzhe — a community, MIT-licensed Node server that runs locally over stdio and handles OAuth for you. It's the most-installed Gmail option (~1.1k GitHub stars) because the auth story is genuinely one command: you run auth, a browser opens, you sign in once, and the token is cached.

It exposes the full operational surface of Gmail, not just send/receive: send_email (with HTML and attachments), draft_email, search_emails using native Gmail operators like from:alice has:attachment newer_than:7d, plus label CRUD, filter creation, and batch modify/delete across hundreds of messages. That's real inbox triage, not a toy.

The minimal config, once your OAuth keys are in place:

{
  "mcpServers": {
    "gmail": {
      "command": "npx",
      "args": ["-y", "@gongrzhe/server-gmail-autoauth-mcp"]
    }
  }
}

Two caveats a senior engineer would flag before you commit. First, it stores your access and refresh tokens in plaintext under ~/.gmail-mcp/ — anything that can read your home directory can read your mailbox, so protect that folder. Second, the upstream repo was archived (read-only) in March 2026; the npm package still works, but if you need ongoing security fixes, evaluate a maintained fork.

When to pick a provider-agnostic IMAP/SMTP server instead

Choose an IMAP/SMTP server when you want one config that works across Gmail, Outlook, Yahoo, and iCloud — or when you'd rather use a Gmail App Password than set up a Google Cloud OAuth client. The Email MCP Server by ai-zerolab is the clean pick here: a Python server, stdio transport, provider-agnostic because it talks plain IMAP and SMTP.

It's deliberately smaller — four tools (get_emails_content, send_email, download_attachment, save_to_mailbox) rather than GongRzhe's two dozen. You get read, search, send, and attachment handling; you don't get Gmail-native labels or filters, because IMAP has no concept of them. That's the trade: portability over Gmail-specific features.

{
  "mcpServers": {
    "email": {
      "command": "uvx",
      "args": ["mcp-email-server@latest", "stdio"]
    }
  }
}

On Gmail specifically, IMAP/SMTP means you'll authenticate with an App Password (2FA must be on) rather than OAuth. Some people prefer that — no OAuth consent screen, no token cache — but an App Password is a long-lived credential, so store it as carefully as any secret.

The hosted route: Nylas remote MCP for email plus calendar

Reach for a remote server when you don't want a local process at all, or when "Gmail" is really "email, calendar, and contacts." The Nylas MCP Server is the notable one: an official, hosted, remote endpoint over streamable HTTP that covers Gmail, Outlook, Exchange, Yahoo, iCloud, and any IMAP provider behind a single Nylas auth flow.

Because it's remote, there's nothing to install — you point your client at a URL with a Bearer token:

{
  "mcpServers": {
    "nylas": {
      "url": "https://mcp.us.nylas.com",
      "headers": { "Authorization": "Bearer <your-nylas-api-key>" }
    }
  }
}

The trade-off is that your email now flows through a third party and you're on Nylas's pricing and rate limits, not a free local script. It earns that when you need cross-account calendar tools (create_event, availability, list_calendars) alongside mail, or when you're building for users who can't be asked to configure a Google Cloud project. For the fuller picture on this choice, see local vs remote MCP. Membrane's MCP server is a similar HTTP-based integration-hub option if you're already using Membrane to connect SaaS apps.

What to skip: don't reach for a general ingestion server like Graphlit if your goal is sending email. Graphlit ingests and runs RAG over Gmail (and Slack, Drive, GitHub) for search and Q&A — it's a knowledge layer, not an outbound-mail tool. Right tool, wrong job for this task.

Side-by-side: which Gmail MCP server to use

The short version: local + Gmail-only + free → GongRzhe; portable across providers → zerolab; hosted + calendar too → Nylas. Here's the honest breakdown.

ServerTransportAuthBest forWatch out for
GongRzhe Gmailstdio (local)Google OAuthFull Gmail control: labels, filters, batch opsPlaintext token cache; repo archived Mar 2026
zerolab Emailstdio (local)IMAP/SMTP (App Password)One config across Gmail/Outlook/iCloudOnly 4 tools; no Gmail labels/filters
NylasHTTP (remote)Bearer API keyEmail + calendar + contacts, no installThird-party routing; paid tiers
MembraneHTTP (remote)Connected accountsAlready using Membrane's integration hubAdds a hub dependency

One fact that shapes the pick regardless: about 90% of MCP servers run locally over stdio, so the two local options above are the well-trodden path, and the remote ones are the exception you choose deliberately. For a broader shortlist beyond email, the best MCP servers roundup and the capabilities breakdown are the next stops.

Wiring it up and keeping your tool budget sane

Adding any of these is the same three steps: put the config block in your client's MCP settings, provide the credential, restart the client, and confirm with a search_emails (or list_messages) call. The how to add an MCP server guide has the exact file location per client, and the config generator emits a correct block if you'd rather not hand-write JSON.

Budget matters more than it looks. Coding clients like Cursor start degrading around 40 active tools — past that, the model picks the wrong tool. GongRzhe's Gmail server alone is roughly two dozen tools, so if you also run GitHub, a database, and a browser server, you're near the ceiling. Enable Gmail only in the client where you actually do email, and turn it off elsewhere.

Security is the other non-negotiable. Every one of these can read and send mail as you, so treat the credential like a password: keep the token directory locked down for the local servers, and rotate the API key for the remote ones. If a server won't connect after setup, the usual suspects — wrong path, stale token, missing scope — are in troubleshooting. And if none of these fit, alternatives lists adjacent options.

FAQ

Is there an official Gmail MCP server from Google?

No. Google does not publish an official Gmail MCP server, so the practical options are community servers you run locally (like GongRzhe's Gmail server over stdio) or an official hosted server from a third party like Nylas that connects Gmail through its own auth flow.

Is a Gmail MCP server free and safe to use?

The local community servers (GongRzhe's Gmail server and zerolab's IMAP/SMTP server) are free and MIT-licensed; the Gmail API itself is free within normal personal quotas. Safety is on you: these servers can read and send mail as you, so protect the credential — GongRzhe stores OAuth tokens in plaintext under ~/.gmail-mcp/, and IMAP setups use a long-lived App Password. Hosted options like Nylas route mail through a third party and have paid tiers.

Do I need a Google Cloud project to use a Gmail MCP server?

For the OAuth route (GongRzhe's server) yes — you create a Google Cloud project, enable the Gmail API, and download OAuth client credentials. To skip that, use an IMAP/SMTP server like zerolab's with a Gmail App Password (2FA required), or a hosted server like Nylas that handles Google auth for you.

Which Gmail MCP server has the most tools?

GongRzhe's Gmail server has the widest Gmail-specific surface — sending with attachments, drafts, native-operator search, full label CRUD, filter creation, and batch modify/delete. zerolab's IMAP/SMTP server is intentionally minimal at four tools (read, send, download attachment, save to mailbox); Nylas adds calendar and contacts tools on top of email.

Can an MCP client use Gmail and Outlook at the same time?

Yes. Use a provider-agnostic IMAP/SMTP server like zerolab's, which speaks standard IMAP and SMTP across Gmail, Outlook, Yahoo, and iCloud, or a hosted server like Nylas that spans Gmail, Outlook, and Exchange behind one auth flow. Note the roughly 40-tool client budget if you enable several mail accounts alongside other servers.

Put this into practice

Browse MCP servers by capability, or check your own setup's tool budget and security.

More essays