- Gmail
Gmail
Content
Gmail MCP
⚠️ WARNING: This server is experimental and functionality is not guaranteed. Please use at your own risk.
A Model Context Protocol (MCP) implementation for the Gmail API, providing a standardized interface for email management, sending, and retrieval.
Features
- Complete Gmail API coverage including messages, threads, labels, drafts, and settings
- Support for sending, drafting, and managing emails
- Label management with customizable colors and visibility settings
- Thread operations for conversation management
- Settings management including vacation responder, IMAP/POP, and language settings
- History tracking for mailbox changes
- Secure OAuth2 authentication using your Google Cloud credentials
Installation
To use this MCP, you'll need to set up authentication with Gmail:
- Go to the Google Cloud Console
- Create a new project or select an existing one
- Enable the Gmail API for your project
- Go to Credentials and create an OAuth 2.0 Client ID
- Choose "Desktop app" as the application type (Warning: if you don't choose this type the server will not be able to parse the keys from your JSON file)
- Download the client credentials JSON file
- Save the downloaded credentials file to
~/.gmail-mcp/gcp-oauth.keys.json
NPX (Recommended)
Add the following to your claude_desktop_config.json:
{
"mcpServers": {
"gmail": {
"command": "npx",
"args": [
"@shinzolabs/gmail-mcp"
]
}
}
}
Manual Download
- Download the repo:
git clone https://github.com/shinzo-labs/gmail-mcp.git
- Install packages (inside cloned repo):
pnpm i
- Add the following to your
claude_desktop_config.json:
{
"mcpServers": {
"gmail": {
"command": "node",
"args": [
"/path/to/gmail-mcp/dist/index.js"
]
}
}
}
Smithery
To install for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @shinzo-labs/gmail-mcp --client claude
Authentication Flow
The MCP provides an automated authentication flow:
-
First, ensure you have your OAuth credentials:
- Place the downloaded
credentials.jsonin~/.gmail-mcp/gcp-oauth.keys.json - Or set
GMAIL_OAUTH_PATHto point to your credentials file
- Place the downloaded
-
Run the authentication command:
# If using npx
npx @shinzolabs/gmail-mcp auth
# If in the project directory
pnpm run auth
- A browser window will automatically open to the Google OAuth consent screen
- After granting access, you can close the browser window
- The tokens will be automatically saved to
~/.gmail-mcp/credentials.json
The MCP will automatically:
- Manage token refresh
- Save credentials to disk
- Handle the OAuth callback
- Open the authentication URL in your default browser
You can customize the credential file locations using environment variables:
GMAIL_OAUTH_PATH=/custom/path/to/gcp-oauth.keys.json
GMAIL_CREDENTIALS_PATH=/custom/path/to/credentials.json
Supported Endpoints
User Management
get_profile: Get the current user's Gmail profilestop_mail_watch: Stop receiving push notificationswatch_mailbox: Set up push notifications for mailbox changes
Message Management
Sending and Creating Messages
draft_email: Creates a draft email messagesend_email: Sends an email messageimport_message: Import a message into the mailboxinsert_message: Insert a message into the mailbox
Managing Messages
list_messages: List messages with optional filteringget_message: Get a specific messageget_attachment: Get a message attachmentmodify_message: Modify message labelsdelete_message: Permanently delete a messagetrash_message: Move message to trashuntrash_message: Remove message from trashbatch_modify_messages: Modify multiple messagesbatch_delete_messages: Delete multiple messages
Label Management
list_labels: List all labelsget_label: Get a specific labelcreate_label: Create a new labelupdate_label: Update a labelpatch_label: Partial update of a labeldelete_label: Delete a label
Thread Management
list_threads: List email threadsget_thread: Get a specific threadmodify_thread: Modify thread labelstrash_thread: Move thread to trashuntrash_thread: Remove thread from trashdelete_thread: Delete a thread
Draft Management
list_drafts: List all draftsget_draft: Get a specific draftupdate_draft: Update draft contentdelete_draft: Delete a draftsend_draft: Send an existing draft
Settings Management
Auto-Forwarding
get_auto_forwarding: Get auto-forwarding settingsupdate_auto_forwarding: Update auto-forwarding settings
IMAP Settings
get_imap: Get IMAP settingsupdate_imap: Update IMAP settings
POP Settings
get_pop: Get POP settingsupdate_pop: Update POP settings
Vacation Responder
get_vacation: Get vacation responder settingsupdate_vacation: Update vacation responder
Language Settings
get_language: Get language settingsupdate_language: Update language settings
Delegates
list_delegates: List account delegatesget_delegate: Get a specific delegateadd_delegate: Add a delegateremove_delegate: Remove a delegate
Filters
list_filters: List email filtersget_filter: Get a specific filtercreate_filter: Create a new filterdelete_filter: Delete a filter
Forwarding Addresses
list_forwarding_addresses: List forwarding addressesget_forwarding_address: Get a specific forwarding addresscreate_forwarding_address: Create a forwarding addressdelete_forwarding_address: Delete a forwarding address
Send-As Settings
list_send_as: List send-as aliasesget_send_as: Get a specific send-as aliascreate_send_as: Create a send-as aliasupdate_send_as: Update a send-as aliaspatch_send_as: Partial update of a send-as aliasverify_send_as: Send verification emaildelete_send_as: Delete a send-as alias
S/MIME Settings
list_smime_info: List S/MIME configurationsget_smime_info: Get a specific S/MIME configinsert_smime_info: Upload a new S/MIME configset_default_smime_info: Set default S/MIME configdelete_smime_info: Delete an S/MIME config
History
list_history: Track changes to the mailbox
Contributing
Contributions are welcomed and encouraged. Contact austin@shinzolabs.com with any questions, comments or concerns.
Server Config
{
"mcpServers": {
"gmail": {
"command": "npx",
"args": [
"@shinzolabs/gmail-mcp"
]
}
}
}Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
WindsurfThe new purpose-built IDE to harness magic
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
ChatWiseThe second fastest AI chatbot™
Amap Maps高德地图官方 MCP Server
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
DeepChatYour AI Partner on Desktop
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Tavily Mcp
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Playwright McpPlaywright MCP server
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Serper MCP ServerA Serper MCP Server
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题;
Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
CursorThe AI Code Editor
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.