Gmail
MCP server by domdomegg Community
gmail-mcp is an MCP server that lets AI assistants read, send, archive and manage Gmail messages, threads, drafts, labels and filters. It is built for people who want an assistant to handle their email, using Google OAuth credentials.
Install Gmail
Built from the published package, never by AI.
claude mcp add gmail -e GOOGLE_ACCESS_TOKEN=YOUR_GOOGLE_ACCESS_TOKEN -- npx -y gmail-mcpRun in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"gmail": {
"env": {
"GOOGLE_ACCESS_TOKEN": "YOUR_GOOGLE_ACCESS_TOKEN"
},
"args": [
"-y",
"gmail-mcp"
],
"command": "npx"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
{
"mcpServers": {
"gmail": {
"env": {
"GOOGLE_ACCESS_TOKEN": "YOUR_GOOGLE_ACCESS_TOKEN"
},
"args": [
"-y",
"gmail-mcp"
],
"command": "npx"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"gmail": {
"env": {
"GOOGLE_ACCESS_TOKEN": "YOUR_GOOGLE_ACCESS_TOKEN"
},
"args": [
"-y",
"gmail-mcp"
],
"command": "npx"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add gmail --env GOOGLE_ACCESS_TOKEN=YOUR_GOOGLE_ACCESS_TOKEN -- npx -y gmail-mcp{
"mcpServers": {
"gmail": {
"env": {
"GOOGLE_ACCESS_TOKEN": "YOUR_GOOGLE_ACCESS_TOKEN"
},
"args": [
"-y",
"gmail-mcp"
],
"command": "npx"
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
gemini mcp add gmail npx -y gmail-mcpGemini CLI was replaced by Antigravity CLI in June 2026 and remains only for enterprise licences and paid API keys.
MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the gmail block.
About
gmail-mcp is an MCP server for Gmail. It lets an AI assistant read, send, archive and manage emails, including searching messages and threads, creating and sending drafts, managing labels and filters, downloading attachments, and setting vacation auto-replies. The server acts as an OAuth proxy to Google and holds no tokens or state itself.
Setup requires a Google OAuth client ID and secret with the Gmail API enabled. You run the server over HTTP, which listens on port 3000 by default, and then connect an MCP client to it. The source gives examples such as checking in for a flight, filing Amazon receipts as expenses, tracking a package, and setting up vacation mode. It is aimed at people who want an assistant to handle their email workflows.
Written from the project's README and checked against it.
Tools it gives your assistant
gmail_get_profileGet user's email address and profile info.gmail_threads_listSearch or list threads (recommended).gmail_thread_getGet all messages in a thread (recommended).gmail_message_sendSend an email.gmail_message_forwardForward an email to new recipients.gmail_message_archiveArchive a message (remove from inbox).gmail_draft_createCreate a draft.gmail_draft_sendSend a draft.gmail_labels_listList all labels.gmail_attachment_getDownload attachment.
What you need
- Google Cloud project with the Gmail API enabled
- Google OAuth client ID and client secret
- Node.js
- An MCP client such as Claude Code, Claude Desktop, Cursor, Cline or VS Code
| Setting | Needed | What it is |
|---|---|---|
GOOGLE_Environment variable, secret | Required | Google OAuth access token with Gmail scopes. |
From the publisher's entry in the official MCP Registry. Required settings are already in the install config below as placeholders.
Try asking
- Check my Gmail for the flight confirmation and find the booking reference
- Archive all newsletters from last week using Gmail
- Draft a follow-up email to the team with the action items from this thread
Good to know
- Permanent delete tools (gmail_message_delete, gmail_messages_batch_delete) remove messages without a trash step.
- The source recommends gmail_threads_list over gmail_messages_list for searching.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: README.md, package.json. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to Gmail
All alternatives →Agentmesh MCP Proxy is a security proxy for MCP servers, described by its publisher as a firewall for the Model Context Protocol. It is aimed at teams that run AI agents which call tools and other agents.
Hardens client-side artifacts such as binaries, Electron apps, JS bundles, Python and WebAssembly against AI reverse-engineering agents. Built for developers who ship proprietary logic to user-controlled devices.
Bla Agents is an MCP server and CLI that adds seeded, format-specific decoys to shipped binaries, JavaScript, WebAssembly and other artifacts. It is for developers who ship proprietary logic to user-controlled devices and want to make AI reverse-engineering slower.
A shared OAuth server for the MCP route of an app, built on better-auth, with passkey sign-in for the owner
Agent Governance Toolkit adds policy enforcement, identity, sandboxing and audit logging to autonomous AI agents. It is aimed at teams shipping agents to production. The source does not confirm the Claude Desktop MCP server named in the listing.
Convex MCP Gateway is a Convex component that exposes selected Convex functions as MCP tools. It checks each call with your own authorize callback and writes an audit log. It is for developers who run Convex apps and want AI assistants to call parts of them.
Compare with Agentmesh MCP Proxy, Bla or Bla Agents
Gmail: common questions
Does gmail-mcp store my Gmail tokens?
No. The source says the server holds no tokens or state and only proxies OAuth requests to Google.
Which Gmail permissions does it request?
The source lists three scopes: gmail.readonly for reading, gmail.send for sending, and gmail.modify for archiving, labels and trash.
Can it send emails on my behalf?
Yes. The tool list includes gmail_message_send and gmail_draft_send, and the gmail.send scope covers sending messages.
How do I install Gmail?
In Claude Code run claude mcp add gmail -e GOOGLE_ACCESS_TOKEN=YOUR_GOOGLE_ACCESS_TOKEN -- npx -y gmail-mcp. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.
Is Gmail the official server?
Gmail is a community project by domdomegg, not verified by a company domain.
Is Gmail free?
The code is public, but no licence file was found, so check the repository before commercial use.
Is Gmail safe to use?
It scores 73 of 100. Grades: maintenance A, licence F, quality C. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to Gmail?
Similar MCP servers: Agentmesh MCP Proxy, Bla, Bla Agents, MCP Auth.
Does Gmail work with ChatGPT?
Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.
