# Gmail

> Send, read, search, and label Gmail from an AI agent — community MCP with auto-OAuth.

[Canonical HTML page](https://top-mcps.com/mcp/gmail) · [server.json](https://top-mcps.com/mcp/gmail.json) · [methodology](https://top-mcps.com/about/methodology)

## Install

### Claude Desktop — `claude_desktop_config.json`

Paste under mcpServers. Fully quit and reopen Claude after editing.

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

### Claude Code — `CLI or .mcp.json`

Run from your repo. Commit .mcp.json to share with your team.

```shell
claude mcp add gmail -- npx @gongrzhe/server-gmail-autoauth-mcp
```

### Cursor — `.cursor/mcp.json`

Global path: ~/.cursor/mcp.json. Reload window after editing.

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

### VS Code — `.vscode/mcp.json`

VS Code uses the "servers" key (not "mcpServers").

```jsonc
{
  "servers": {
    "gmail": {
      "command": "npx",
      "args": [
        "@gongrzhe/server-gmail-autoauth-mcp"
      ]
    }
  }
}
```

### Windsurf — `~/.codeium/windsurf/mcp_config.json`

Open via Cascade → hammer icon → Configure.

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

### Cline — `cline_mcp_settings.json`

Open via the Cline sidebar → MCP Servers → Edit.

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

### Continue — `~/.continue/config.json`

Continue uses modelContextProtocolServers with a transport block.

```json
{
  "experimental": {
    "modelContextProtocolServers": [
      {
        "transport": {
          "type": "stdio",
          "command": "npx",
          "args": [
            "@gongrzhe/server-gmail-autoauth-mcp"
          ]
        }
      }
    ]
  }
}
```

### Codex CLI — `~/.codex/config.toml`

Codex uses TOML. Each server is a [mcp_servers.<name>] subtable.

```shell
# ~/.codex/config.toml
[mcp_servers.gmail]
command = "npx"
args = [
  "@gongrzhe/server-gmail-autoauth-mcp",
]
```

### Zed — `~/.config/zed/settings.json`

Zed calls them "context_servers". Settings live-reload on save.

```jsonc
{
  "context_servers": {
    "gmail": {
      "command": {
        "path": "npx",
        "args": [
          "@gongrzhe/server-gmail-autoauth-mcp"
        ]
      }
    }
  }
}
```

### ChatGPT — `ChatGPT → Apps directory`

Gmail doesn't ship a hosted HTTPS endpoint today. ChatGPT supports remote MCP servers only — to use this server in ChatGPT you'll need to deploy it to a public HTTPS URL first (e.g. via Cloudflare Workers or Vercel) or wait for an official remote build.

```none

```

## At a glance

- **Maintainer:** GongRzhe (community)
- **Transport:** stdio
- **Auth model:** OAuth 2.1
- **Required secrets:** None
- **Supported clients:** Claude, Cursor, Any MCP-compatible client, Google accounts
- **License:** MIT
- **Language:** JavaScript
- **Latest version:** latest
- **Last verified:** 2026-05-27
- **GitHub stars:** 1,119 (fetched 2026-06-02T11:55:52.236Z)
- **Score:** 58/100 (rubric 2026-04 — see https://top-mcps.com/about/methodology)
- **Source:** https://github.com/GongRzhe/Gmail-MCP-Server

## Quick answer

**What it does.** Exposes Gmail operations as MCP tools: send, draft, read, search, label management, filter creation, attachment download, batch operations.

**Best for:**
- Sending drafted replies
- Inbox triage and labelling
- Search across mail
- Filter and label CRUD
- Personal-account or workspace flows

**Not for:**
- Compliance-bound enterprise (no vendor support)
- Production multi-tenant apps
- Workflows where Gmail features change faster than community catch-up

## Description

The most-installed Gmail MCP (community, not by Google). Auto-OAuth flow with browser launch, full Gmail surface: send, draft, search, labels, filters, attachments. Google has not published an official Gmail MCP, so this is the de-facto canonical option.

## Why it matters

Email is the highest-frequency surface for many users. Google has no official MCP; this community implementation has the highest install count and the cleanest auto-OAuth UX.

## Key features

- Auto-OAuth with browser launch
- Send, draft, read, search, label tools
- Filter creation + templates
- Batch modify and delete
- MIT, community-maintained

## FAQ

### Is there an official Google Gmail MCP?

No — as of 2026-05, Google has not published an official Gmail MCP. This community implementation is the de-facto canonical option.

### How does OAuth work?

You place a Google Cloud OAuth credentials JSON at ~/.gmail-mcp/, then run the auth subcommand and complete browser-based consent.

### Is the repo maintained?

It was archived 2026-03-03 (read-only). Snapshots still work; verify before relying on it for new flows.

## Changelog

- **2026-05-27** — Refreshed install snippets and fact sheet; verified for 2026.
- **2025-02-10** — Initial directory listing.
