Gmail MCP Server
Provides tools for reading and sending emails, managing labels, searching, creating drafts, and replying to threads through the Gmail API.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Gmail MCP Servershow my unread emails from today"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Gmail MCP Server
Public Gmail MCP server — Streamable HTTP + OAuth 2.1, same architecture as the Salesforce and Outlook MCP Servers. One deployed URL works with:
Archon AI portal (Managed MCP via Anthropic / OpenAI)
Claude.ai custom connectors
ChatGPT custom MCP
Any standalone MCP client (n8n, Cursor, custom apps) via the PATH B flow
Tools (11)
Tool | Kind | Description |
| read | Connected Gmail account (email, message counts) |
| read | List messages by label, filters: unread, sender |
| read | Full body (text + HTML) of one message |
| read | Gmail-syntax search across all mail |
| read | All labels (Gmail's folders) |
| read | Attachment names/types/sizes |
| write | Send a new email |
| write | In-thread reply / reply-all (proper threading headers) |
| write | Draft without sending |
| write | Archive / trash / apply label |
| write | Read/unread + star |
Related MCP server: Gmail MCP Server
Setup
1. Google Cloud OAuth client (one-time)
https://console.cloud.google.com → create/select a project
APIs & Services → Library → enable Gmail API
OAuth consent screen → External → add scope
https://www.googleapis.com/auth/gmail.modify(+ openid, email, profile). While the app is in Testing status, add your Gmail address under Test users — otherwise login fails withaccess_denied.Credentials → Create credentials → OAuth client ID → Web application Authorized redirect URIs:
https://claude.ai/api/mcp/auth_callback(Claude connector)<BASE_URL>/auth/callback(PATH B standalone)
2. Run
cp .env.example .env # fill in GOOGLE_CLIENT_ID / GOOGLE_CLIENT_SECRET / BASE_URL
npm install
npm run dev # http://localhost:32003. Deploy (Render)
Build command:
npm installStart command:
npm startEnv vars:
BASE_URL(the Render URL),GOOGLE_CLIENT_ID,GOOGLE_CLIENT_SECRET,GOOGLE_REDIRECT_URI=<BASE_URL>/auth/callbackAfter deploy, add
<BASE_URL>/auth/callbackto the Google OAuth client's redirect URIs.
Auth paths
PATH A — Bearer header (portals, Claude connector). The client sends
Authorization: Bearer <google access token> on /mcp. Tokens acquired
through this server's /token proxy get vaulted, enabling server-side
refresh when Google returns 401 (Google access tokens live ~1 hour).
PATH B — session flow (standalone clients). Visit
<BASE_URL>/auth?session=<id> → Google login → tokens stored server-side
keyed by the stable Google account id.
The /authorize proxy forces access_type=offline&prompt=consent so Google
actually issues a refresh token, and both proxies force the real Google
client credentials so Dynamic Client Registration (Claude invents a random
client id) still works — the only requirement is the client's redirect URI
being whitelisted on the Google OAuth client.
Gmail-specific notes
Gmail message ids are opaque hex strings; always source them from
listEmails/searchEmailsin the same session.Gmail has labels, not folders.
moveEmailmaps the familiar folder actions: archive = removeINBOX, trash = the dedicated trash endpoint.replyEmailfetches the original'sMessage-ID/Referencesheaders and sends withthreadId, so replies thread correctly in both Gmail and the recipient's client.
This server cannot be deployed
Maintenance
Related MCP Connectors
Manage Gmail end-to-end: search, read, send, draft, label, and organize threads. Automate workflow…
Manage Gmail messages, threads, labels, drafts, and settings from your workflows. Send and organiz…
Email infrastructure for AI agents — send, receive, search, and reply to email over MCP.
Email inboxes for AI agents: send, receive, reply, search, and manage threaded email over MCP.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceEnables comprehensive Gmail management with 17 tools for searching, sending, and organizing emails, managing labels, threads, drafts, and attachments through the Gmail API.-
- AlicenseNot gradedqualityNot gradedmaintenanceEnables AI assistants to interact with Gmail through natural language, supporting email sending/reading, searching, draft management, label organization, and batch operations with secure OAuth authentication.-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to read, search, organize, and draft emails in Gmail inboxes with support for multiple accounts, OAuth authentication, and 26 comprehensive tools for email management.89 npm3MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage Gmail through natural language, supporting operations like sending, searching, and reading emails. It includes comprehensive label management, batch processing, and a streamlined OAuth2 auto-authentication flow.MIT