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 "Install 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 installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/SfdcAnnu/Gmail-MCP-Server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server