本项目是一个用于 Gmail 集成的 Claude 桌面版的 Model Context Protocol (MCP) 服务器,支持自动身份验证功能。借助此服务器,AI 助手能够通过自然语言交互管理 Gmail,为用户提供便捷的邮件管理体验。
本服务器可助力 AI 助手通过自然语言交互管理 Gmail。下面将为您详细介绍如何快速开启使用之旅。
smith install @gongrzhe/server-gmail-autoauth-mcp
克隆此仓库:
git clone https://github.com/yourusername/gmail-autoauth-mcp.git
cd gmail-autoauth-mcp
安装依赖项:
npm install
启动服务器:
node index.js
{
"to": ["recipient@example.com"],
"subject": "Meeting Tomorrow",
"body": "Hi,\n\nJust a reminder about our meeting tomorrow at 10 AM.\n\nBest regards",
"cc": ["cc@example.com"],
"bcc": ["bcc@example.com"]
}
{
"query": "from:sender@example.com after:2024/01/01",
"maxResults": 10
}
{
"messageId": "message123"
}
{
"messageId": "message123",
"labelIds": ["INBOX", "IMPORTANT"]
}
在 config.json 文件中添加以下内容:
{
"gmail": {
"clientId": "your_client_id",
"clientSecret": "your_client_secret",
"redirectUri": "http://localhost:3000"
}
}
运行以下命令以授权您的 Gmail 帐户:
node authorize.js
按照提示完成 OAuth 流程。
~/.gmail-mcp)。OAuth Keys 未找到
gcp-oauth.keys.json 在当前目录或 ~/.gmail-mcp/ 中。无效凭据格式
web 或 installed 凭据。端口已被占用
本项目根据 ISC 许可证发布。
欢迎贡献!请随时提交 Pull Request。
如果您遇到任何问题或有任何疑问,请在 GitHub 仓库中提交问题。