MCP Gmail Server
@jeremyjordan
关于 MCP Gmail Server
A Model Context Protocol (MCP) server that provides Gmail access for LLMs, powered by the MCP Python SDK.
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"mcp-gmail": {
"command": "uv",
"args": [
"sync"
]
}
}
}工具
9Create a new email draft
Send an email
Search for emails with specific filters (from, to, subject, dates, etc.)
Search for emails using raw Gmail query syntax
Retrieve multiple email messages by their IDs
Get all available Gmail labels
Mark a message as read
Add a label to a message
Remove a label from a message
概览
What is MCP Gmail Server?
An MCP server that provides Gmail access for LLMs, powered by the MCP Python SDK. It exposes Gmail messages and threads as MCP resources and offers tools for composing, sending, and managing emails, using OAuth 2.0 authentication with Google’s Gmail API.
How to use MCP Gmail Server?
Requires Python 3.10+, a Gmail account, and recommended use of uv. Configure OAuth credentials via Google Cloud Console, then run uv run mcp dev mcp_gmail/server.py for development or install for Claude Desktop with uv run mcp install ... with environment variables MCP_GMAIL_CREDENTIALS_PATH and MCP_GMAIL_TOKEN_PATH.
Key features of MCP Gmail Server
- Exposes Gmail messages and threads as MCP resources
- Tools to compose, send, and manage emails
- OAuth 2.0 authentication with the Gmail API
- Search emails with filters (from, to, subject, dates)
- Raw Gmail query syntax support
- Manage labels: add, remove, list labels
- Mark messages as read
- Retrieve multiple emails by IDs
Use cases of MCP Gmail Server
- Let an LLM read and respond to emails via a client
- Automate email searching and labeling tasks
- Integrate email management into AI workflows
- Allow an AI assistant to compose and send drafts
FAQ from MCP Gmail Server
What are the prerequisites for MCP Gmail Server?
Python 3.10+, a Gmail account with API access, and uv for package management (recommended).
How do I set up OAuth credentials?
Follow the README steps: create a Google Cloud project, enable the Gmail API, configure the OAuth consent screen, create a Desktop app OAuth client ID, download credentials.json, and add the gmail.modify scope.
What environment variables can I configure?
MCP_GMAIL_CREDENTIALS_PATH (default credentials.json), MCP_GMAIL_TOKEN_PATH (default token.json), and MCP_GMAIL_MAX_RESULTS (default 10).
How do I fix the “Error: spawn uv ENOENT” when using Claude Desktop?
Update your claude_desktop_config.json to provide the absolute path to uv, e.g., "~/.local/bin/uv".
What tools does MCP Gmail Server provide?
It provides nine tools: compose_email, send_email, search_emails, query_emails, get_emails, list_available_labels, mark_message_read, add_label_to_message, and remove_label_from_message.
沟通协作 分类下的更多 MCP 服务器
slack-mcp-server
ubie-ossA Slack MCP server
PhonePi MCP: Turn your phone into a toolbox for AI assistants using Model Context Protocol
priyankarkPhonePi MCP enables seamless integration between desktop AI tools and your smartphone, providing 23+ direct actions including SMS messaging, phone calls, contact management, snippet creation and search, clipboard sharing, notifications, battery status checks, and remote device co
mcp-email-server
ai-zerolabIMAP and SMTP via MCP Server
Telegram MCP Server
chigwellTelegram MCP server powered by Telethon to let MCP clients read chats, manage groups, and send/modify messages, media, contacts, and settings.
Teams Mcp
floriscornelMCP server providing comprehensive Microsoft Teams and Graph API access for AI assistants including messaging, search, and user management.
评论