
shinzo-labs/gmail-mcp 是从 https://github.com/shinzo-labs/gmail-mcp. 导入的 MCP 服务器候选
概览
shinzo-labs/gmail-mcp 是从 https://github.com/shinzo-labs/gmail-mcp. 导入的 MCP 服务器候选
概述(AI 翻译)
Gmail MCP 服务器
Gmail API 的模型上下文协议(MCP)服务器实现,提供标准化的邮件管理、发送和检索接口。
特色
- 完整的 Gmail API 覆盖,包括消息、线程、标签、草稿和设置
- 支持发送、起草和管理电子邮件
- 标签管理,可自定义颜色和可见性设置
- 用于对话管理的线程操作
- 设置管理,包括假期响应器、IMAP/POP和语言设置
- 邮箱变更的历史跟踪
- 使用Google Cloud凭证实现安全OAuth2认证
先修条件
依赖关系
最简单的安装方式是安装Node.js 18+。如果你想本地构建,还需要安装pnpm。
谷歌工作区设置
要运行这个MCP服务器,你需要为你的组织搭建一个Google API客户端,每个用户运行脚本来获取自己的OAuth刷新令牌。
Google API 客户端设置(每个组织一次)
- 进入谷歌云控制台。
- 创建一个新项目或选择已有的项目。
- 启用你的项目的Gmail API。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
A Model Context Protocol (MCP) server 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 Google Cloud credentials
Prerequisites
Dependencies
For simplest installation, install Node.js 18+. If you would like to build locally, you will also need to install pnpm.
Google Workspace Setup
To run this MCP server, you will need to set up a Google API Client for your organization, with each user running a script to retrieve their own OAuth refresh token.
Google API Client Setup (once per organization)
- 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” for the client type.
- Download and save the OAuth keys JSON as
~/.gmail-mcp/gcp-oauth.keys.json. ⚠️ NOTE: to create~/.gmail-mcp/through MacOS’s Finder app you need to enable hidden files first. - (Optional) For remote server installation (ex. using Smithery CLI), note the
CLIENT_IDandCLIENT_SECRETfrom this file.
安装
npx @shinzolabs/gmail-mcp配置
{
"mcpServers": {
"gmail": {
"command": "npx",
"args": [
"@shinzolabs/gmail-mcp"
]
}
}
}