G

Google日历管理器

Cursor IDE中的Google日历集成。此服务器使人工智能助手能够通过自然语言交互来管理Google日历事件。

calendar-management

641 查看 · 2026-07-07 更新

简介

Cursor IDE中的Google日历集成。此服务器使人工智能助手能够通过自然语言交互来管理Google日历事件。

简介

Cursor IDE中的Google日历集成。此服务器使人工智能助手能够通过自然语言交互来管理Google日历事件。

Calendar MCP 服务器

Claude 桌面版的 Google 日历集成 Model Context Protocol (MCP) 服务器。该服务器使 AI 助手能够通过自然语言交互来管理 Google 日历事件。

smithery 徽章 npm 版本 许可证: ISC

功能

  • 创建带有标题、时间、描述和地点的日历事件
  • 通过事件 ID 获取事件详情
  • 更新现有事件(标题、时间、描述、地点)
  • 删除事件
  • 列出指定时间范围内的事件
  • 完全集成 Google 日历 API
  • 安全的 OAuth2 认证

安装

通过 Smithery 安装

要通过 Smithery 自动安装 Claude 桌面版的 Google 日历集成:

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

手动安装

npm install @gongrzhe/server-calendar-mcp

设置

  1. 创建 Google Cloud 项目并获取凭证:

    a. 创建一个 Google Cloud 项目:

    • 前往 Google Cloud 控制台
    • 创建一个新项目或选择一个现有项目
    • 为您的项目启用 Google 日历 API

    b. 创建 OAuth 2.0 凭证:

    • 前往 "APIs & Services" > "Credentials"
    • 点击 "Create Credentials" > "OAuth client ID"
    • 选择 "Desktop app" 作为应用程序类型
    • 给它命名并点击 "Create"
    • 您将获得 GOOGLE_CLIENT_IDGOOGLE_CLIENT_SECRET

    c. 获取刷新令牌:

    • 前往 OAuth 2.0 Playground
    • 点击右上角的齿轮图标(设置)
    • 选中 "Use your own OAuth credentials"
    • 输入您的 OAuth Client ID 和 Client Secret
    • 在左侧面板中,找到 "Calendar API v3" 并选择 "https://www.googleapis.com/auth/calendar"
    • 点击 "Authorize APIs" 并完成 OAuth 流程
    • 点击 "Exchange authorization code for tokens"
    • 复制 "Refresh token" - 这是您的 GOOGLE_REFRESH_TOKEN
  2. 在 Claude 桌面版中配置:

{ "calendar": { "command": "npx", "args": [ "@gongrzhe/server-calendar-mcp" ], "env": { "GOOGLE_CLIENT_ID": "your_client_id_here", "GOOGLE_CLIENT_SECRET": "your_client_secret_here", "GOOGLE_REFRESH_TOKEN": "your_refresh_token_here" } } }

使用示例

服务器提供了几个可以通过 Claude 桌面版使用的工具:

创建事件

{ "summary": "Team Meeting", "start": { "dateTime": "2024-01-20T10:00:00Z" }, "end": { "dateTime": "2024-01-20T11:00:00Z" }, "description": "Weekly team sync", "location": "Conference Room A" }

列出事件

{ "timeMin": "2024-01-01T00:00:00Z", "timeMax": "2024-12-31T23:59:59Z", "maxResults": 10, "orderBy": "startTime" }

更新事件

{ "eventId": "event123", "summary": "Updated Meeting Title", "start": { "dateTime": "2024-01-20T11:00:00Z" }, "end": { "dateTime": "2024-01-20T12:00:00Z" } }

删除事件

{ "eventId": "event123" }

安全注意事项

  • 保护好您的 Google API 凭证
  • 定期更换您的刷新令牌
  • 将敏感信息存储在 Claude 桌面版配置中
  • 不要共享或提交您的凭证到版本控制系统
  • 刷新令牌可以访问您的 Google 日历,请像对待密码一样对待它

贡献

欢迎贡献!请随时提交 Pull Request。

许可证

该项目根据 ISC 许可证发布。

作者

gongrzhe

支持

如果您有任何问题或需要帮助,请联系支持团队。

如果您遇到任何问题或有疑问,请在GitHub仓库中提交一个问题。

工具列表

  • create_event: Creates a new event in Google Calendar

  • get_event: Retrieves details of a specific event

  • update_event: Updates an existing event

  • delete_event: Deletes an event from the calendar

  • list_events: Lists events within a specified time range

来源