Gmail MCP
MCP server by A1-x-Tech Community
Lets an AI assistant search, read, draft and send Gmail messages, manage labels and move mail to the trash. Aimed at people who want to handle their Gmail in plain language.
Install Gmail MCP
Built from the published package, never by AI.
claude mcp add gmail-mcp -- npx -y mcp-google-gmailRun in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"gmail-mcp": {
"args": [
"-y",
"mcp-google-gmail"
],
"command": "npx"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
{
"mcpServers": {
"gmail-mcp": {
"args": [
"-y",
"mcp-google-gmail"
],
"command": "npx"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"gmail-mcp": {
"args": [
"-y",
"mcp-google-gmail"
],
"command": "npx"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add gmail-mcp -- npx -y mcp-google-gmail{
"mcpServers": {
"gmail-mcp": {
"args": [
"-y",
"mcp-google-gmail"
],
"command": "npx"
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
gemini mcp add gmail-mcp npx -y mcp-google-gmailGemini 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-mcp block.
About
A1 Gmail MCP lets an AI app work with a Gmail mailbox through the Gmail API. It can search and read messages and threads, prepare replies as drafts, send email, manage labels and move mail to the trash. The server connects from the conversation using Google OAuth with a loopback redirect and PKCE, and it stores the tokens itself.
The server separates drafts, which can still be edited, from sent email, which cannot be recalled. Removing mail goes to the reversible trash, and there is no permanent message delete tool. It requests only the gmail.modify scope. It is intended for users who want an AI app to handle their Gmail in plain language.
Written from the project's README and checked against it.
Tools it gives your assistant
create_draftCreates a draft email, which stays unsent until it is sent.get_draftShows a draft so it can be reviewed before sending.update_draftReplaces the whole content of an existing draft.send_draftSends an existing draft to its recipients.send_messageSends an email immediately, without creating a draft first.delete_draftPermanently deletes a draft, skipping the trash.manage_trashMoves messages or threads to or from the trash, reversible for about 30 days.start_loginReturns a Google consent link to connect the Gmail account from the chat.auth_statusShows whether a Gmail account is connected.raw_requestCalls Gmail API methods that have no dedicated tool.
What you need
- Node.js 20 or later
- A Google account with access to Gmail
- A Google Cloud project with the Gmail API enabled
- An OAuth Desktop app client, created in Google Cloud
| Setting | Needed | What it is |
|---|---|---|
GOOGLE_Environment variable | Optional | Google OAuth2 client id (refresh-token flow). |
GOOGLE_Environment variable, secret | Optional | Google OAuth2 client secret (refresh-token flow). Treat it as a secret. |
GOOGLE_Environment variable, secret | Optional | Google OAuth2 refresh token, exchanged for access tokens automatically. Treat it as a secret. |
GOOGLE_Environment variable, secret | Optional | Static OAuth2 access token (~1h lifetime) — alternative to the refresh-token trio, mostly for testing. |
GOOGLE_Environment variable | Optional | 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_Environment variable | Optional | API root override. Default: https://gmail.googleapis.com |
GOOGLE_Environment variable | Optional | Per-request timeout in milliseconds. Default: 60000 |
GOOGLE_Environment variable | Optional | Retries on transient errors (429 always; 5xx/network for reads). Default: 3 |
From the publisher's entry in the official MCP Registry. Required settings are already in the install config below as placeholders.
Try asking
- Show my unread emails from the last week and tell me which need a reply.
- Draft a reply to the latest Acme email saying the signed copy goes out Friday.
- Move that thread to the trash, and restore it if I change my mind.
Good to know
- Sent emails cannot be unsent, so the server does not re-send after an ambiguous failure.
- Removing mail uses the trash, reversible for about 30 days. There is no permanent message delete tool.
- Testing-mode OAuth refresh tokens can expire after seven days.
- Decoded bodies are truncated at a configurable limit, and attachments return as metadata only.
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 MCP
All alternatives →Jitsu MCP server lets AI assistants configure and operate Jitsu data pipelines. It covers destinations, streams, connections and functions, plus Live Events and connector syncs. It is aimed at teams that run event data pipelines.
Vexa sends a bot into Google Meet, Microsoft Teams, Zoom and Jitsi calls to capture speaker-labelled transcripts live or after the call. It suits teams that want meeting transcripts they can self-host.
Gives Claude and other MCP-compatible AI agents access to LinkedIn through your own browser session. It reads profiles, researches companies, finds jobs, and manages messages and connection requests.
Runs a NetSapiens phone system from Claude, ChatGPT, or any MCP client. Each person signs in as themselves, and their assistant gets role-aware tools for calls, voicemail, queues, and provisioning.
Resend MCP Server connects AI assistants to the Resend email platform. It lets them send and receive emails and manage contacts, broadcasts, templates, and domains. It suits developers and teams who use MCP clients such as Claude or Cursor.
The source does not describe labelhead-artist-momentum. It is a README for Paperclip, an open-source orchestration app for teams of AI agents.
Compare with Jitsu, Vexa or Linkedin MCP server
Gmail MCP: common questions
Can it delete Gmail messages permanently?
There is no permanent message delete tool. Removing mail moves it to the trash, which is reversible for about 30 days. Permanent deletion through raw_request requires the full mail.google.com scope.
Which Google scope does it use?
It uses only https://www.googleapis.com/auth/gmail.modify. The source says this excludes permanent deletion and access to Gmail settings.
Do I need to edit config files to connect Gmail?
No. The source says the assistant can walk you through creating the OAuth client and connecting from the chat, and tokens are saved to a local credentials file with mode 0600.
How do I install Gmail MCP?
In Claude Code run claude mcp add gmail-mcp -- npx -y mcp-google-gmail. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.
Is Gmail MCP the official server?
Gmail MCP is a community project by A1-x-Tech, not verified by a company domain.
Is Gmail MCP free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is Gmail MCP safe to use?
It scores 79 of 100. Grades: maintenance A, licence A, 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 MCP?
Similar MCP servers: Jitsu, Vexa, Linkedin MCP server, Netsapiens MCP.
Does Gmail MCP 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.
