Gmail MCP
MCP server for the Gmail API: search, read and send email, manage drafts, labels and the trash.
Documentation & Preview
{ "mcpServers": { "mcp-mcp-google-gmail-5d5085383371837a3ba2": { "command": "npx", "args": [ "-y", "--package", "mcp-google-gmail@1.1.2", "mcp-google-gmail" ], "env": { "GOOGLE_GMAIL_CLIENT_ID": "${ENV_GOOGLE_GMAIL_CLIENT_ID}", "GOOGLE_GMAIL_CLIENT_SECRET": "${ENV_GOOGLE_GMAIL_CLIENT_SECRET}", "GOOGLE_GMAIL_REFRESH_TOKEN": "${ENV_GOOGLE_GMAIL_REFRESH_TOKEN}", "GOOGLE_GMAIL_ACCESS_TOKEN": "${ENV_GOOGLE_GMAIL_ACCESS_TOKEN}", "GOOGLE_GMAIL_OAUTH_PORT": "${ENV_GOOGLE_GMAIL_OAUTH_PORT}", "GOOGLE_GMAIL_API_BASE": "${ENV_GOOGLE_GMAIL_API_BASE}", "GOOGLE_GMAIL_TIMEOUT_MS": "${ENV_GOOGLE_GMAIL_TIMEOUT_MS}", "GOOGLE_GMAIL_MAX_RETRIES": "${ENV_GOOGLE_GMAIL_MAX_RETRIES}" } } }, "setup": { "fields": [ { "id": "ENV_GOOGLE_GMAIL_CLIENT_ID", "label": "GOOGLE_GMAIL_CLIENT_ID", "description": "Google OAuth2 client id (refresh-token flow).", "required": false, "secret": false, "default": "" }, { "id": "ENV_GOOGLE_GMAIL_CLIENT_SECRET", "label": "GOOGLE_GMAIL_CLIENT_SECRET", "description": "Google OAuth2 client secret (refresh-token flow). Treat it as a secret.", "required": false, "secret": true, "default": "" }, { "id": "ENV_GOOGLE_GMAIL_REFRESH_TOKEN", "label": "GOOGLE_GMAIL_REFRESH_TOKEN", "description": "Google OAuth2 refresh token, exchanged for access tokens automatically. Treat it as a secret.", "required": false, "secret": true, "default": "" }, { "id": "ENV_GOOGLE_GMAIL_ACCESS_TOKEN", "label": "GOOGLE_GMAIL_ACCESS_TOKEN", "description": "Static OAuth2 access token (~1h lifetime) — alternative to the refresh-token trio, mostly for testing.", "required": false, "secret": true, "default": "" }, { "id": "ENV_GOOGLE_GMAIL_OAUTH_PORT", "label": "GOOGLE_GMAIL_OAUTH_PORT", "description": "Fixed port for the loopback listener of the in-chat login (127.0.0.1 + PKCE). Set it when the client runs over SSH port forwarding; otherwise a free port is picked per login.", "required": false, "secret": false, "default": "" }, { "id": "ENV_GOOGLE_GMAIL_API_BASE", "label": "GOOGLE_GMAIL_API_BASE", "description": "API root override.", "required": false, "secret": false, "default": "https://gmail.googleapis.com" }, { "id": "ENV_GOOGLE_GMAIL_TIMEOUT_MS", "label": "GOOGLE_GMAIL_TIMEOUT_MS", "description": "Per-request timeout in milliseconds.", "required": false, "secret": false, "default": "60000" }, { "id": "ENV_GOOGLE_GMAIL_MAX_RETRIES", "label": "GOOGLE_GMAIL_MAX_RETRIES", "description": "Retries on transient errors (429 always; 5xx/network for reads).", "required": false, "secret": false, "default": "3" } ], "requirements": [ "安装 Node.js / npm" ] }, "provenance": { "registryServer": "io.github.A1-x-Tech/mcp-google-gmail", "registryVersion": "1.1.2", "registryUrl": "https://registry.modelcontextprotocol.io/v0.1/servers/io.github.A1-x-Tech%2Fmcp-google-gmail/versions/1.1.2", "repository": null, "sourceCommit": null, "namespaceRepositoryOwnerMatched": false, "officialRegistryNamespaceVerified": true, "package": { "registry": "npm", "identifier": "mcp-google-gmail", "version": "1.1.2", "integrity": "sha512-TXxYSIvclwej+rKjRqIUOUOp9h1IHtSixRZoxxrch1MwMTPaQcarsxHOTbE4Ykw8QqvFbWGfLIvuxfou3tF7TA==", "registryNameMatched": "io.github.A1-x-Tech/mcp-google-gmail", "checkedAt": "2026-11-05T15:11:21.591Z" }, "scope": "Install configuration verified; dependency implementation and remote behavior have not been audited" } }