gmail-mcp-server
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 recent 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
Local MCP server that lets Claude Desktop read and manage your Gmail (list, search, send, draft, reply, archive, labels, trash).
Claude asks → this server calls the Gmail API → actions run on your account.
Structure
gmail-mcp-server/
├── server.py # MCP tools + dispatch
├── gmail_auth.py # OAuth + token cache
├── gmail_tools.py # Gmail API wrappers
├── requirements.txt
├── credentials.json # from Google (do not commit)
└── token.json # created after first login (do not commit)Related MCP server: Gmail MCP Server
Setup
1. Install (Python 3.10+)
cd gmail-mcp-server
/opt/homebrew/bin/python3.12 -m venv .venv # or any python3.10+
source .venv/bin/activate
pip install -r requirements.txt2. Google Cloud credentials
Google Cloud Console → create/select a project.
Enable Gmail API.
OAuth consent screen → External → fill app info → add yourself as a Test user (keep status Testing).
Credentials → Create → OAuth client ID → type Desktop app → download JSON.
Save it as
credentials.jsonin this folder (must have an"installed"key, not"web").
3. Claude Desktop config
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"gmail": {
"command": "/Users/mdparwezansari/Desktop/gmail-mcp-server/.venv/bin/python",
"args": ["/Users/mdparwezansari/Desktop/gmail-mcp-server/server.py"]
}
}
}Use absolute paths. Quit Claude fully (Cmd+Q) and reopen.
Claude starts the server automatically — you don’t need to run python server.py yourself.
4. First OAuth
In Claude, ask e.g. “List my recent emails.” Approve Google in the browser. That creates token.json for later runs.
Tools
Tool | Description |
| Recent mail (optional Gmail |
| Search ( |
| Full body by message ID |
| Send now |
| Draft only |
| Reply in-thread |
| Remove from inbox |
| Toggle unread |
| Move to Trash |
| Labels |
Scope: gmail.modify (change in gmail_auth.py if you want less access).
Optional env
GMAIL_CREDENTIALS_PATH— default./credentials.jsonGMAIL_TOKEN_PATH— default./token.json
Troubleshooting
Problem | Fix |
| Need Python 3.10+ |
Server not connected | Check paths; Cmd+Q Claude and reopen; see |
Access blocked | Add your Gmail as OAuth Test user |
Re-login needed | Delete |
Never commit credentials.json or token.json.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
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 Connectors
Connect any mailbox to Claude, ChatGPT & AI: read, send, reply, schedule & search emails.
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…
Multiple Google accounts (Gmail, Calendar, Drive, Contacts, Tasks) in one Claude connector.
1
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceEnables reading, sending, searching, and managing Gmail through Claude using the official Google Gmail API.1383MIT
- AlicenseNot gradedqualityCmaintenanceEnables Claude to read, search, send, label, and trash emails in any Gmail account via Google's Gmail API, using OAuth2 authentication with automatic token refresh.67MIT
- FlicenseNot gradedqualityDmaintenanceProvides Claude with Gmail capabilities including sending emails, managing drafts, and searching messages.-
- AlicenseNot gradedqualityDmaintenanceEnables Claude to read, search, send, and manage Gmail messages and threads through natural language.205MIT
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/Parwez0786/gmail-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server