Calendar AutoAuth MCP Server

Calendar AutoAuth MCP Server

site icon
2025.02.17 0
JavaScriptGoogle Calendar集成日程管理日程管理
Calendar AutoAuth MCP Server 是一个用于Google Calendar集成的模型上下文协议(MCP)服务器,支持自动认证功能。该服务器使AI助手能够通过自然语言交互管理Google Calendar事件。
View on GitHub

Overview

产品定位

Calendar AutoAuth MCP Server 是一个专门为Google Calendar设计的MCP服务器,旨在通过自然语言交互简化日历事件的管理。

核心功能

  • 创建日历事件(包括标题、时间、描述和位置)
  • 通过事件ID检索事件详情
  • 更新现有事件(标题、时间、描述、位置)
  • 删除事件
  • 列出指定时间范围内的事件
  • 完全集成Google Calendar API
  • 简单的OAuth2认证流程,支持自动浏览器启动
  • 支持桌面和Web应用程序凭证
  • 全局凭证存储,方便使用

适用场景

  • AI助手管理个人或团队日程
  • 自动化会议安排
  • 集成到其他应用程序中进行日历管理

工具列表

  1. 创建事件工具:用于创建新的日历事件
  2. 列出事件工具:用于检索指定时间范围内的事件
  3. 更新事件工具:用于修改现有事件
  4. 删除事件工具:用于删除日历事件

常见问题解答

  1. OAuth密钥未找到
  2. 确保gcp-oauth.keys.json位于当前目录或~/.calendar-mcp/
  3. 检查文件权限

  4. 无效的凭证格式

  5. 确保OAuth密钥文件包含webinstalled凭证
  6. 对于Web应用程序,验证重定向URI是否正确配置

  7. 端口已被占用

  8. 如果端口3000已被占用,请在使用前释放它
  9. 可以找到并停止使用该端口的进程

使用教程

使用依赖

  1. 创建Google Cloud项目并获取凭证:
  2. 访问Google Cloud Console
  3. 创建新项目或选择现有项目
  4. 为项目启用Google Calendar API

  5. 创建OAuth 2.0凭证:

  6. 转到"APIs & Services" > "Credentials"
  7. 点击"Create Credentials" > "OAuth client ID"
  8. 选择"Desktop app"或"Web application"作为应用程序类型
  9. 命名并点击"Create"
  10. 对于Web应用程序,添加http://localhost:3000/oauth2callback到授权重定向URI
  11. 下载客户端OAuth密钥的JSON文件
  12. 将密钥文件重命名为gcp-oauth.keys.json

安装教程

通过Smithery安装:

npx -y @smithery/cli install @gongrzhe/server-calendar-autoauth-mcp --client claude

Docker安装:

docker run -i --rm \
  --mount type=bind,source=/path/to/gcp-oauth.keys.json,target=/gcp-oauth.keys.json \
  -v mcp-calendar:/calendar-server \
  -e CALENDAR_OAUTH_PATH=/gcp-oauth.keys.json \
  -e "CALENDAR_CREDENTIALS_PATH=/calendar-server/credentials.json" \
  -p 3000:3000 \
  mcp/calendar auth

调试方式

运行认证:

npx @gongrzhe/server-calendar-autoauth-mcp auth

配置Claude Desktop:

{
  "mcpServers": {
    "calendar": {
      "command": "npx",
      "args": [
        "@gongrzhe/server-calendar-autoauth-mcp"
      ]
    }
  }
}

许可证

该项目遵循 ISC 开源许可条款。