What are the prerequisites?
Python 3.10 or higher and Google API credentials (client ID, client secret, access token, and refresh token).
@baryhuang
基本信息
A MCP (Model Context Protocol) server that provides get, send Gmails without local credential or token setup.
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"mcp-headless-gmail": {
"command": "docker",
"args": [
"build",
"-t",
"mcp-headless-gmail",
"."
]
}
}
}工具列表暂未提供
当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。
工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。
A Model Context Protocol (MCP) server that provides get, send, and refresh Gmail functionality without requiring local credential or token setup. It is designed for headless, remote environments and decouples credential storage from server implementation.
Install via pip install -e . or use the Docker image buryhuang/mcp-headless-gmail:latest. Configure an MCP client like Claude Desktop with either the Docker or npx command shown in the README. Provide your Google API credentials (client ID, client secret, access token, refresh token) via tool calls. Start by refreshing the token with gmail_refresh_token, then use tools such as get_recent_emails, get_email_body, and send_email.
Python 3.10 or higher and Google API credentials (client ID, client secret, access token, and refresh token).
Create a project in the Google Cloud Console, enable the Gmail API, configure the OAuth consent screen, create an OAuth client ID (Desktop app type), and use OAuth 2.0 to obtain tokens with scopes `gmail.readonly` and `gmail.send`.
The server provides a `gmail_refresh_token` tool that accepts either full credentials or just a refresh token with client ID/secret. It returns a new access token. Automatic refresh is also handled by the underlying Google API client when the access token expires.
Yes. The Docker image can be built with `docker build -t mcp-headless-gmail .` and run with a `docker run` command. Configuration for Claude Desktop using Docker is provided in the README.
The server requires `https://www.googleapis.com/auth/gmail.readonly` for reading emails and `https://www.googleapis.com/auth/gmail.send` for sending emails.

HelpWell connects AI assistants to your help desk, knowledge base, live chat support and email marketing automation for SaaS. Triage support tickets, draft help docs and replies, manage contacts, and prepare newsletters
Let your agents read, send and react to email autonomously, without human involvement
Business email on your own domain for AI agents. Read, search and send mail, manage mailboxes and aliases, and set up DNS automatically, with unlimited mailboxes on one flat plan.
LinkedIn MCP server for Claude, ChatGPT, Cursor & Codex. Read LinkedIn DMs, search your network, enrich profiles and draft messages you review before sending.
Local MCP server for Thunderbird. Gives Claude Desktop, Cursor, or any MCP client read/write access to multiple mailboxes, calendars, contacts, notes & tasks (Gmail, Outlook, IMAP) — all on your machine.
评论