Gmail MCP Server
Allows AI assistants to interact with Gmail securely, providing capabilities such as fetching unread messages with metadata, drafting thread-aware replies, and managing email tasks via 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 Servercheck my unread emails"
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 📧
A high-performance Model Context Protocol (MCP) server that enables AI assistants to interact with Gmail securely.
✨ Features
Smart Email Retrieval: Fetch unread messages with rich metadata.
Thread-Aware Drafting: Create replies that maintain conversation context.
Secure Authentication: Robust OAuth 2.0 implementation with token management.
Enterprise Ready: Structured for scalability and maintainability.
Related MCP server: Gmail AutoAuth MCP Server
🏗️ Architecture
System Data Flow
graph TD
User(["👤 User"]) <-->|"Natural Language"| Claude(["🤖 Claude Desktop"])
subgraph "MCP Server (Local Machine)"
Claude <-->|"JSON-RPC (stdio)"| Main["src/main.py"]
Main -->|Dispatch| Handler["src/handlers.py"]
Handler -->|Call| Client["src/client.py"]
end
Client <-->|"HTTPS / OAuth 2.0"| Gmail(["☁️ Google Gmail API"])
style User fill:#f9f,stroke:#333
style Claude fill:#e1f5fe,stroke:#01579b
style Gmail fill:#fce4ec,stroke:#880e4fThe project follows standard engineering practices:
MLI/
├── src/
│ ├── main.py # Application Entry Point
│ ├── client.py # Gmail API Client
│ └── handlers.py # Request Handlers
├── config/ # Configuration & Credentials
├── tests/ # Unit Tests
└── requirements.txt # Dependencies🚀 Quick Start
1. Prerequisite
Python 3.8+
Google Cloud Project with Gmail API enabled
2. Installation
# Clone and setup environment
python -m venv .venv
.venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt3. Configuration
Place your Google Cloud
credentials.jsoninconfig/.Copy the environment config:
copy .env.example .env
4. Claude Integration
Add to your Claude Desktop config (%APPDATA%\Claude\claude_desktop_config.json):
{
"mcpServers": {
"gmail": {
"command": "C:\\Path\\To\\MLI\\.venv\\Scripts\\python.exe",
"args": ["-m", "src.main"],
"cwd": "C:\\Path\\To\\MLI",
"env": {
"CREDENTIALS_PATH": "config/credentials.json",
"TOKEN_PATH": "config/token.json"
}
}
}
}🛠️ Usage
Check Emails:
"Check my unread emails"
Draft Reply:
"Draft a reply to the email from [Name]"
🛡️ Security
Credentials are never committed to version control.
Tokens are stored locally in
config/.Communication happens directly between your machine and Google API.
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-qualityDmaintenanceAn MCP server that provides AI applications with a toolset for an Artificial Virtual Assistant (AVA) integrated with the Gmail API. It enables users to automate email management and personal tasks through secure Google OAuth authentication.Last updated1Apache 2.0
- Alicense-qualityDmaintenanceAn MCP server enabling AI assistants to manage Gmail through natural language, including sending, reading, searching, labeling, and handling attachments with auto authentication.Last updated1MIT
- Alicense-qualityCmaintenanceA Model Context Protocol server for Gmail that lets AI assistants read, send, search, label, and filter Gmail through natural language, with OAuth2 auto-authentication and full attachment support.Last updated2023MIT
- Alicense-qualityCmaintenanceStreamable HTTP MCP server for Gmail that enables AI agents to search threads, read messages, manage drafts, and organize the inbox via OAuth authentication.Last updated63610MIT
Related MCP Connectors
Shipmail MCP server for AI agent custom-domain email inboxes with REST API and webhooks.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Read, search, send, organize, draft and schedule email across your inboxes from any MCP client.
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/Uncommontayo/MLI-MCP-Server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server