Home › Communication › Gmail MCP
Gmail MCP
MCP server for the Gmail API: search, read and send email, manage drafts, labels and the trash.
Topics: Communication
Connect
Review any command before running it. Package names and URLs come from the server's own registry entry.
Package (npm 1.0.0)
npx -y [email protected]
Or add to your MCP client config:
{
"mcpServers": {
"mcp-google-gmail": {
"command": "npx",
"args": [
"-y",
"[email protected]"
],
"env": {
"GOOGLE_GMAIL_CLIENT_ID": "<YOUR_VALUE>",
"GOOGLE_GMAIL_CLIENT_SECRET": "<YOUR_VALUE>",
"GOOGLE_GMAIL_REFRESH_TOKEN": "<YOUR_VALUE>",
"GOOGLE_GMAIL_ACCESS_TOKEN": "<YOUR_VALUE>",
"GOOGLE_GMAIL_OAUTH_PORT": "<YOUR_VALUE>",
"GOOGLE_GMAIL_API_BASE": "<YOUR_VALUE>",
"GOOGLE_GMAIL_TIMEOUT_MS": "<YOUR_VALUE>",
"GOOGLE_GMAIL_MAX_RETRIES": "<YOUR_VALUE>"
}
}
}
}
GOOGLE_GMAIL_CLIENT_ID— Google OAuth2 client id (refresh-token flow).GOOGLE_GMAIL_CLIENT_SECRETsecret — Google OAuth2 client secret (refresh-token flow). Treat it as a secret.GOOGLE_GMAIL_REFRESH_TOKENsecret — Google OAuth2 refresh token, exchanged for access tokens automatically. Treat it as a secret.GOOGLE_GMAIL_ACCESS_TOKENsecret — Static OAuth2 access token (~1h lifetime) — alternative to the refresh-token trio, mostly for testing.GOOGLE_GMAIL_OAUTH_PORT— 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.GOOGLE_GMAIL_API_BASE— API root override.GOOGLE_GMAIL_TIMEOUT_MS— Per-request timeout in milliseconds.GOOGLE_GMAIL_MAX_RETRIES— Retries on transient errors (429 always; 5xx/network for reads).
Related servers
Inbox Zero
Search Gmail and Outlook, save drafts, manage email rules, and view email stats.
whatsapp-mcp
Search personal WhatsApp messages and contacts, and send messages to individuals or groups.
slack-mcp-server
Slack workspace integration.
telegram-mcp
Telegram API integration: access user data, manage dialogs (chats, channels, groups), retrieve and send messages, and handle read status.
emailmd
Render markdown into email-safe HTML, lint drafts for deliverability problems, and preview emails.
Microsoft 365 MCP Server
Interact with Microsoft 365 and Office services through the Microsoft Graph API.
Listed in punkpeye/awesome-mcp-servers (MIT)
Data from the Official MCP Registry