gmail-mcp
Provides read-only access to a Gmail inbox, allowing search using Gmail search syntax and retrieval of full email messages.
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-mcpfind recent emails from Sarah about the meeting"
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
A read-only Gmail MCP server, built from scratch on the MCP SDK — no third-party Gmail MCP packages. Lets Claude Code (or any MCP client) search and read a Gmail inbox without ever being able to send, delete, or modify anything.
Tools
Tool | What it does |
| Search the inbox with full Gmail search syntax ( |
| Fetch a single message by id: headers plus the full plain-text body |
Related MCP server: Gmail MCP Server
Design notes
Read-only by construction. The OAuth scope is
gmail.readonly— the token Google issues cannot send or delete mail even if the server were compromised.Google OAuth 2.0 Desktop-app flow. A one-time
npm run authopens a browser for consent, then stores a refresh token locally. The server auto-refreshes access tokens and persists them back to disk, so auth survives restarts.Secrets stay out of the repo.
credentials.json(OAuth client) andtoken.json(tokens) are gitignored; the code loads them from disk at startup.
Setup
In Google Cloud Console, create a project, enable the Gmail API, and create an OAuth client of type Desktop app. Download it as
credentials.jsoninto this folder. While the consent screen is in Testing mode, add your address under Audience → Test users.Install and authenticate:
npm install npm run auth # opens browser, writes token.jsonRegister with Claude Code (user scope makes it available in every session):
claude mcp add gmail -s user -- node /absolute/path/to/gmail-mcp/index.jsVerify with
claude mcp list— the server should show as Connected.
Files
index.js— the MCP server (tool definitions, Gmail API calls, token refresh persistence)auth.js— one-time OAuth consent flow; writestoken.json
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.
Related MCP Servers
- Alicense-qualityDmaintenanceA read-only MCP server that enables users to interact with the Gmail API to search messages, retrieve threads, and download attachments. It supports standard Gmail query operators and requires OAuth authentication for secure read-only access to mailbox data.Last updated1MIT
- Alicense-qualityBmaintenanceRead-only MCP server for Gmail that enables searching threads, reading messages, and listing labels without any write access.Last updated152MIT
- Alicense-qualityAmaintenanceMCP server for Gmail that enables searching, reading, archiving, and managing email from any MCP client.Last updated281MIT
- Alicense-qualityBmaintenanceA local MCP server that provides Gmail tools (search, read, send, draft, label management) while keeping your emails only between your machine and Google, with no third-party access.Last updatedMIT
Related MCP Connectors
Read, search, send, organize, draft and schedule email across your inboxes from any MCP client.
Read-only MCP server for Robinhood Chain token discovery, research, and due diligence via GMGN.
Read-only MCP server for ClassQuill, a tutoring-business-management platform.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/paultrusov/gmail-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server