Gmail MCP

io.github.A1-x-Tech/mcp-google-gmail

MCP server for the Gmail API: search, read and send email, manage drafts, labels and the trash.

Connect this server

Add this to your MCP client config — claude_desktop_config.json (Claude Desktop) or .cursor/mcp.json (Cursor).Suits: Claude Desktop · Cursor.

{
  "mcpServers": {
    "mcp-google-gmail": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-google-gmail@1.1.2"
      ],
      "env": {
        "GOOGLE_GMAIL_CLIENT_SECRET": "<your GOOGLE_GMAIL_CLIENT_SECRET>",
        "GOOGLE_GMAIL_REFRESH_TOKEN": "<your GOOGLE_GMAIL_REFRESH_TOKEN>",
        "GOOGLE_GMAIL_ACCESS_TOKEN": "<your GOOGLE_GMAIL_ACCESS_TOKEN>",
        "GOOGLE_GMAIL_API_BASE": "https://gmail.googleapis.com",
        "GOOGLE_GMAIL_TIMEOUT_MS": "60000",
        "GOOGLE_GMAIL_MAX_RETRIES": "3"
      }
    }
  }
}
Environment variables
  • GOOGLE_GMAIL_CLIENT_SECRETsecretGoogle OAuth2 client secret (refresh-token flow). Treat it as a secret.
  • GOOGLE_GMAIL_REFRESH_TOKENsecretGoogle OAuth2 refresh token, exchanged for access tokens automatically. Treat it as a secret.
  • GOOGLE_GMAIL_ACCESS_TOKENsecretStatic OAuth2 access token (~1h lifetime) — alternative to the refresh-token trio, mostly for testing.
  • GOOGLE_GMAIL_API_BASEAPI root override.
  • GOOGLE_GMAIL_TIMEOUT_MSPer-request timeout in milliseconds.
  • GOOGLE_GMAIL_MAX_RETRIESRetries on transient errors (429 always; 5xx/network for reads).

A starting point — check the repository for exact arguments and setup. Restart your client after editing the config.

Category
Developer Tools
Version
1.1.2
Registry
active
Published
11/4/2026
Browse all Developer Tools →

Add the badge to your site

Show visitors that Gmail MCP is listed here — it’s also the link we check for a free listing.

Gmail MCP — listed on Serverdex

HTML — for your website

<a href="https://serverdex.io/server/io-github-a1-x-tech-mcp-google-gmail?utm_source=badge"><img src="https://serverdex.io/brand/badge.svg" alt="Gmail MCP — listed on Serverdex" width="123" height="40" loading="lazy"></a>

Recommended. A dofollow link from your own domain is the one that counts for search engines, and it's the link we check for a free listing.

Markdown — for your README

[![Gmail MCP — listed on Serverdex](https://serverdex.io/brand/badge.svg)](https://serverdex.io/server/io-github-a1-x-tech-mcp-google-gmail?utm_source=badge)

Nice for visibility, but GitHub marks README links nofollow, so it doesn't pass authority. Use the HTML badge on your site as well.