@gongrzhe/server-calendar-autoauth-mcp

中文文档
1.0.2发布于 2024/12/26ISCES Module近 30 天下载 5384

用于 Google 日历与自动认证集成的模型背景协议服务器

中文使用文档
文档目录13 节
  1. 特征
  2. 安装认证( A)
  3. 嵌入支持
  4. 用法实例
  5. 创建事件
  6. 列表事件
  7. 更新事件
  8. 删除事件
  9. 安全说明
  10. 捐款
  11. 许可证
  12. 作者
  13. 支助

日历 MCP 服务器

一个用于Cursor IDE中Google日历集成的模型上下文协议(MCP)服务器,拥有自动认证支持. 这个服务器使AI助手能够通过自然语言互动来管理Google日历事件.

npm version License: ISC

特征

  • 创建带有标题、时间、描述和位置的日历事件
  • 按事件标识检索事件细节
  • 更新现有事件(标题、时间、描述、位置)
  • 删除事件
  • 列出指定时间范围内的事件
  • 与 Google Calendar API 完全整合
  • 启用自动浏览器的简单 OAuth2 认证流程

安装认证( A)

  1. 创建 Google 云项目并获取证书 :

    a. 创建谷歌云项目:

    • 转到 谷歌云控台
    • 创建新工程或选择现有工程
    • 为您的工程启用 Google 日历 API

    b. 创建 OAuth 2.0 全权证书:

    • 转到"AP Is & Services" > "证书"
    • 点击“ 创建证书” > “ OAuth 客户端 ID”
    • 选择“ Desktop 应用程序”为应用程序类型
    • 给出名字并点击"Create"
    • 下载客户端 OAuth 密钥的 JSON 文件
    • 将密钥文件重命名为 gcp-oauth.keys.json
  2. 运行认证 :

    您可以通过两种方式认证:

    a. 全球认证(建议):

    # First time: Place gcp-oauth.keys.json in your home directory's .calendar-mcp folder
    mkdir -p ~/.calendar-mcp
    mv gcp-oauth.keys.json ~/.calendar-mcp/
    
    # Run authentication from anywhere
    npx @gongrzhe/server-calendar-autoauth-mcp auth
    

    b. 本地认证:

    # Place gcp-oauth.keys.json in your current directory
    # The file will be automatically copied to global config
    npx @gongrzhe/server-calendar-autoauth-mcp auth
    

    认证程序将:

    • 寻找 gcp-oauth.keys.json 当前目录中或 ~/.calendar-mcp/
    • 如果在当前目录中找到, 请复制到 ~/.calendar-mcp/
    • 打开您的默认浏览器进行 Google 认证
    • 证书另存为 ~/.calendar-mcp/credentials.json

    说明: 认证成功后, 证书被存储在全球 ~/.calendar-mcp/ ,并且可以从任意目录中使用.

  3. 在光标桌面中配置 :

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

嵌入支持

如果您喜欢使用 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"
      ]
    }
  }
}

用法实例

服务器提供了几种工具,可以通过光标 IDE 使用:

创建事件

{
  "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"
}

安全说明

  • OAuth 证书在本地环境中安全存储
  • 服务器使用离线访问来维护持续认证
  • 永远不要共享或承诺您的证书用于版本控制
  • 在您的 Google 账户设置中定期审查并取消未使用的访问

捐款

欢迎捐款! 请随意提交拉力请求.

许可证

这个项目根据ICC许可证颁发许可证.

作者

刚格日

支助

如果您遇到任何问题或有问题,请在 GitHub 寄存器上存档 .

版本与发布记录

@gongrzhe/server-calendar-autoauth-mcp 共发布 3 个版本,首次发布于 2024/12/26;过去 12 个月发布了 0 个版本。

版本发布日期距今
1.0.2latest2024/12/261.9 年前
1.0.12024/12/261.9 年前
1.0.02024/12/261.9 年前

关于 @gongrzhe/server-calendar-autoauth-mcp 的常见问题

@gongrzhe/server-calendar-autoauth-mcp 是什么?

用于 Google 日历与自动认证集成的模型背景协议服务器

如何安装 @gongrzhe/server-calendar-autoauth-mcp?

在项目目录运行 npm install @gongrzhe/server-calendar-autoauth-mcp,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 server-calendar-autoauth-mcp,可以用 npx server-calendar-autoauth-mcp 直接运行。

@gongrzhe/server-calendar-autoauth-mcp 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/gongrzhe__server-calendar-autoauth-mcp 是否存在。

@gongrzhe/server-calendar-autoauth-mcp 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@gongrzhe/server-calendar-autoauth-mcp 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=14.0.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@gongrzhe/server-calendar-autoauth-mcp 可以商用吗?

@gongrzhe/server-calendar-autoauth-mcp 使用 ISC 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@gongrzhe/server-calendar-autoauth-mcp 的下载量有多少?

根据 npm 官方下载统计,@gongrzhe/server-calendar-autoauth-mcp 在 2026/10/17 – 2026/11/15 这 30 天内被下载 5,384 次,日均约 179 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@gongrzhe/server-calendar-autoauth-mcp 还在维护吗?

最新版本 1.0.2 发布于 2024/12/26(1.9 年前);至今共发布 3 个版本,其中过去 12 个月发布了 0 个;首次发布于 2024/12/26。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。