Gmail

v2.4.0
io.github.domdomegg/gmail-mcp Checked 8 hours ago Published 4 months ago

Allow AI systems to read, send, archive, and manage emails via Gmail.

Values you need

VariableWhat it is
GOOGLE_ACCESS_TOKENrequired secret Google OAuth access token with Gmail scopes.

npm (npx) discovery passed

Requires Node.js 18+

Run in a terminal
claude mcp add gmail-mcp -e 'GOOGLE_ACCESS_TOKEN=<GOOGLE_ACCESS_TOKEN>' -- npx -y gmail-mcp@2.4.0
Add to claude_desktop_config.json
{
  "mcpServers": {
    "gmail-mcp": {
      "args": [
        "-y",
        "gmail-mcp@2.4.0"
      ],
      "command": "npx",
      "env": {
        "GOOGLE_ACCESS_TOKEN": "<GOOGLE_ACCESS_TOKEN>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "gmail-mcp": {
      "args": [
        "-y",
        "gmail-mcp@2.4.0"
      ],
      "command": "npx",
      "env": {
        "GOOGLE_ACCESS_TOKEN": "<GOOGLE_ACCESS_TOKEN>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "GOOGLE_ACCESS_TOKEN",
      "id": "google-access-token",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "gmail-mcp": {
      "args": [
        "-y",
        "gmail-mcp@2.4.0"
      ],
      "command": "npx",
      "env": {
        "GOOGLE_ACCESS_TOKEN": "${input:google-access-token}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.gmail-mcp]
command = "npx"
args = ["-y", "gmail-mcp@2.4.0"]
env = { "GOOGLE_ACCESS_TOKEN" = "<GOOGLE_ACCESS_TOKEN>" }

For AI agents

  1. Ask the user for: GOOGLE_ACCESS_TOKEN. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: get_profile, messages_list, message_get, message_send, message_forward, message_modify, message_archive, message_trash, ….
  5. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json