Skip to main content
Glama

日历 MCP 服务器

用于在 Claude Desktop 中集成 Google 日历的模型上下文协议 (MCP) 服务器。该服务器使 AI 助手能够通过自然语言交互来管理 Google 日历事件。

铁匠徽章 npm 版本 许可证:ISC

特征

  • 创建带有标题、时间、描述和位置的日历事件

  • 通过事件 ID 检索事件详细信息

  • 更新现有事件(标题、时间、描述、地点)

  • 删除事件

  • 列出指定时间范围内的事件

  • 与 Google 日历 API 完全集成

  • 安全 OAuth2 身份验证

Related MCP server: Google Calendar MCP Server

安装

通过 Smithery 安装

要通过Smithery自动为 Claude Desktop 安装 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 Console

    • 创建新项目或选择现有项目

    • 为您的项目启用 Google 日历 API

    b.创建 OAuth 2.0 凭证:

    • 前往“API 和服务”>“凭证”

    • 点击“创建凭证”>“OAuth 客户端 ID”

    • 选择“桌面应用”作为应用程序类型

    • 命名并点击“创建”

    • 您将获得您的GOOGLE_CLIENT_IDGOOGLE_CLIENT_SECRET

    c.获取刷新令牌:

    • 前往OAuth 2.0 游乐场

    • 点击右上角的齿轮图标(设置)

    • 勾选“使用您自己的 OAuth 凭证”

    • 输入您的 OAuth 客户端 ID 和客户端密钥

    • 在左侧面板中,找到“Calendar API v3”并选择“ https://www.googleapis.com/auth/calendar

    • 点击“授权 API”并完成 OAuth 流程

    • 点击“将授权码兑换为令牌”

    • 复制“刷新令牌” - 这是您的GOOGLE_REFRESH_TOKEN

  2. 在 Claude Desktop 中配置:

{ "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 Desktop 使用的工具:

创建活动

{ "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 Desktop 配置中存储敏感信息

  • 切勿共享或提交您的凭据以进行版本控制

  • 刷新令牌可让您访问 Google 日历,请将其视为密码

贡献

欢迎贡献代码!欢迎提交 Pull 请求。

执照

该项目已获得 ISC 许可。

作者

共济者

支持

如果您遇到任何问题或有疑问,请在 GitHub 存储库上提交问题。

-
security - not tested
-
license - not tested
-
quality - not tested

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/GongRzhe/Calendar-MCP-Server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server