Gmail MCP Server
A powerful, feature-rich Model Context Protocol (MCP) server for Gmail. Enables AI assistants like Claude and Cursor to search, read, send, organize, and manage emails using natural language with full Gmail API integration.
Overview
Gmail MCP Server is a community-developed Model Context Protocol (MCP) server that integrates Gmail with AI coding and productivity assistants. It allows LLMs like Claude Desktop, Cursor, and other MCP-compatible clients to interact directly with your Gmail account through natural language commands.
Multiple implementations exist, with theposch/gmail-mcp being one of the most feature-rich Python-based versions. Other popular forks offer variations in authentication (OAuth, IMAP/SMTP, AutoAuth, or headless), tool count, and additional capabilities like style analysis or batch operations.
Key Features
- Email Operations: Search inbox/threads, read messages, list recent emails, and retrieve full content with attachments.
- Sending & Drafting: Compose and send new emails or replies, create drafts, and maintain conversation threads.
- Organization Tools: Manage labels, apply filters, archive, delete, or mark as read/unread.
- Advanced Capabilities: Analyze email writing style, perform batch actions, export to CSV, and handle multi-account setups.
- Secure Authentication: Supports Google OAuth2 (recommended), app passwords via IMAP/SMTP, or auto-auth methods.
- LLM-Friendly Responses: Structured, token-efficient output with context-aware summaries.
- Client Compatibility: Works with Claude Desktop, Cursor, VS Code extensions, Gemini CLI, and any MCP-compliant tool.
Use Cases
- Smart Inbox Management: "Summarize my unread emails from work and flag urgent ones."
- Automated Replies: "Reply to the latest thread from client X with a professional follow-up."
- Email Triage & Productivity: "Find all emails about Project Y from last week and draft a status update."
- Style Matching: Analyze your past emails and generate replies that match your tone.
- Workflow Automation: Combine with other MCP servers (calendar, tasks, CRM) for complete AI-orchestrated productivity pipelines.
Installation & Setup (Common Method)
Most implementations follow similar steps:
- Google API Setup (for OAuth versions): Create a project in Google Cloud Console, enable Gmail API, and configure OAuth consent + credentials (Desktop App type).
- Clone & Install:
git clone https://github.com/theposch/gmail-mcp.git cd gmail-mcp pip install -r requirements.txt - Configure Credentials: Set up
credentials.jsonor environment variables for your OAuth tokens. - Run the Server and add it to your MCP client (Claude Desktop config, Cursor settings, etc.).
Some variants offer simpler one-file setups, Docker images, or Chrome extension bridges that avoid full API key setup.
Note: Always review the specific repository's README for the latest authentication and security recommendations, as granting email access requires caution.
Popular Implementations
- theposch/gmail-mcp: Feature-rich Python version.
- PaulFidika/gmail-mcp-server: Lightweight single-file option focused on search, style analysis, and drafting.
- jeremyjordan/mcp-gmail: Clean implementation using the official MCP Python SDK.
- GongRzhe/Gmail-MCP-Server (AutoAuth): Simplified authentication (archived but influential).
- IMAP/SMTP-based or headless variants for different security preferences.
Many users combine Gmail MCP with Google Calendar MCP for unified productivity control.
Compatibility & Security
- Clients: Claude Desktop/Code, Cursor, and most MCP tools.
- Authentication: OAuth2 (most secure/recommended), IMAP with app passwords, or custom methods.
- License: Typically MIT or similar (check individual repo).
Gmail MCP servers significantly enhance AI productivity by turning your email into a conversational interface, but always use least-privilege scopes and review code before granting access.