Calendar AutoAuth MCP Server

Calendar AutoAuth MCP Server

site icon
2025.03.11 7
JavaScriptGoogle Calendar 集成自动认证日程管理日程管理
Calendar AutoAuth MCP Server 是一个用于 Google Calendar 集成的 Model Context Protocol (MCP) 服务器,支持自动认证功能。该服务器使 AI 助手能够通过自然语言交互管理 Google Calendar 事件。
View on GitHub

Overview

基本能力

产品定位

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

核心功能

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

适用场景

  • AI 助手管理个人或团队日程
  • 自动化日历事件创建和更新
  • 集成到 Claude Desktop 中提供日历管理功能

工具列表

  1. 创建事件工具:允许创建新的日历事件
  2. 列出事件工具:查询指定时间范围内的事件
  3. 更新事件工具:修改现有事件的详细信息
  4. 删除事件工具:从日历中移除事件

常见问题解答

  1. OAuth 密钥未找到:确保 gcp-oauth.keys.json 位于当前目录或 ~/.calendar-mcp/
  2. 无效的凭证格式:确保 OAuth 密钥文件包含 webinstalled 凭证
  3. 端口已被占用:如果端口 3000 已被使用,请释放该端口

使用教程

使用依赖

  1. 创建 Google Cloud 项目并获取凭证
  2. 启用 Google Calendar API
  3. 创建 OAuth 2.0 凭证

安装教程

通过 Smithery 安装

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

Docker 安装

  1. 认证:
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
  1. 使用:
{
  "mcpServers": {
    "calendar": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-v",
        "mcp-calendar:/calendar-server",
        "-e",
        "CALENDAR_CREDENTIALS_PATH=/calendar-server/credentials.json",
        "mcp/calendar"
      ]
    }
  }
}

调试方式

  1. 全局认证:
mkdir -p ~/.calendar-mcp
mv gcp-oauth.keys.json ~/.calendar-mcp/
npx @gongrzhe/server-calendar-autoauth-mcp auth
  1. 本地认证:
npx @gongrzhe/server-calendar-autoauth-mcp auth

许可证

该项目遵循 MIT 开源许可条款,请参阅 MIT 了解完整条款。