Calendar AutoAuth MCP Server
一个用于在Cluade Desktop中与Google日历集成的模型上下文协议(MCP)服务器,支持自动认证。此服务器使AI助手能够通过自然语言交互来管理Google日历事件。
使 Claude 能够通过自然语言交互管理您的 Google 日历事件。
安装步骤
1. 通过 Smithery 快速安装
npx -y @smithery/cli install @gongrzhe/server-calendar-autoauth-mcp --client claude
2. 获取 Google 日历凭证
- 在 Google Cloud 控制台 创建项目并启用 Google 日历 API
- 创建 OAuth 客户端 ID (选择"桌面应用程序"或"Web 应用程序")
- 对于 Web 应用,添加
http://localhost:3000/oauth2callback
到授权重定向 URI - 下载 OAuth 密钥并重命名为
gcp-oauth.keys.json
3. 运行认证
# 全局认证 (推荐)
mkdir -p ~/.calendar-mcp
mv gcp-oauth.keys.json ~/.calendar-mcp/
npx @gongrzhe/server-calendar-autoauth-mcp auth
认证过程会自动打开浏览器完成 Google 授权流程。
4. 配置 Claude 桌面版
在 Claude 桌面版的配置文件中添加:
{
"mcpServers": {
"calendar": {
"command": "npx",
"args": ["@gongrzhe/server-calendar-autoauth-mcp"]
}
}
}
使用示例
创建日历事件
{
"summary": "团队会议",
"start": {"dateTime": "2024-01-20T10:00:00Z"},
"end": {"dateTime": "2024-01-20T11:00:00Z"},
"description": "每周团队同步",
"location": "会议室 A"
}
列出事件
{
"timeMin": "2024-01-01T00:00:00Z",
"timeMax": "2024-12-31T23:59:59Z",
"maxResults": 10
}
更新/删除事件
{"eventId": "event123", "summary": "更新后的标题"}
{"eventId": "event123"}
故障排除
- 找不到 OAuth 密钥: 确保
gcp-oauth.keys.json
在当前目录或~/.calendar-mcp/
中 - 端口冲突: 确保端口 3000 未被占用
- Web 应用凭证问题: 验证重定向 URI 配置正确
凭证安全地存储在 ~/.calendar-mcp/
中,可以从任何目录使用。
详细文档: Smithery 页面