Gmail MCP 实现
为 Gmail 服务实现的模型上下文协议(MCP),提供标准化邮件管理接口。
快速入门
- 安装前准备:
- 在 Google Cloud Console 创建项目并启用 Gmail API。
- 下载 OAuth 2.0 凭据文件,保存到
~/.gmail-mcp/gcp-oauth.keys.json
。
-
使用 NPX(推荐): 在
config.json
中配置:{ "mcpServers": { "gmail": { "command": "npx", "args": [ "@shinzolabs/gmail-mcp" ] } } }
-
手动安装: 克隆仓库: git clone https://github.com/shinzo-labs/gmail-mcp.git 安装依赖并构建: pnpm i && pnpm run build 配置
config.json
:{ "mcpServers": { "gmail": { "command": "node", "args": [ "/path/to/gmail-mcp/dist/index.js" ] } } }
-
运行认证命令: npx @shinzolabs/gmail-mcp auth
-
启动后即可使用支持的邮箱管理功能。