# @gongrzhe/server-calendar-autoauth-mcp 中文文档

规范地址：https://npmcn.com/package/%40gongrzhe/server-calendar-autoauth-mcp/

版本：1\.0\.2
npm 元数据更新时间：2024-12-26T02:29:05.820Z
中文译文更新时间：2026-11-16T18:58:56.605Z
软件包许可：ISC

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40gongrzhe/server-calendar-autoauth-mcp
原文对照：https://npmcn.com/package/%40gongrzhe/server-calendar-autoauth-mcp/?lang=original
项目主页：https://github.com/gongrzhe/server-calendar-autoauth-mcp#readme
源码仓库：https://github.com/gongrzhe/server-calendar-autoauth-mcp

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：18.8 kB，3 个文件
- 模块格式：ES Module
- TypeScript 类型：未声明
- Node.js 要求：\>=14\.0\.0
- 运行依赖：5 个
- 首次发布：2024-12-26T02:19:23.634Z
- 最新版本发布：2024-12-26T02:29:05.653Z
- 近 30 天下载量：5384（2026-10-17 至 2026-11-15，npm 官方下载统计）
- 已发布版本数：3（近 12 个月 0 个）

## 中文简介

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

## 安装

```sh
npm install @gongrzhe/server-calendar-autoauth-mcp
```

也可以使用：`pnpm add @gongrzhe/server-calendar-autoauth-mcp`、`yarn add @gongrzhe/server-calendar-autoauth-mcp`、`bun add @gongrzhe/server-calendar-autoauth-mcp`

## README

# 日历 MCP 服务器

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

[![npm version](https://badge.fury.io/js/%40gongrzhe%2Fserver-calendar-autoauth-mcp.svg)](https://www.npmjs.com/package/@gongrzhe/server-calendar-autoauth-mcp) [![License: ISC](https://img.shields.io/badge/License-ISC-blue.svg)](https://opensource.org/licenses/ISC)

## 特征

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

## 安装认证( A)

1.  创建 Google 云项目并获取证书 :
    
    a. 创建谷歌云项目:
    
    -   转到 [谷歌云控台](https://console.cloud.google.com/)
    -   创建新工程或选择现有工程
    -   为您的工程启用 Google 日历 API
    
    b. 创建 OAuth 2.0 全权证书:
    
    -   转到"AP Is & Services" > "证书"
    -   点击“ 创建证书” > “ OAuth 客户端 ID”
    -   选择“ Desktop 应用程序”为应用程序类型
    -   给出名字并点击"Create"
    -   下载客户端 OAuth 密钥的 JSON 文件
    -   将密钥文件重命名为 `gcp-oauth.keys.json`
2.  运行认证 :
    
    您可以通过两种方式认证:
    
    a. 全球认证(建议):
    
    ```bash
    # 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. 本地认证:
    
    ```bash
    # 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.  在光标桌面中配置 :
    

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

### 嵌入支持

如果您喜欢使用 Docker :

1.  认证 :

```bash
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
```

2.  用法 :

```json
{
  "mcpServers": {
    "calendar": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-v",
        "mcp-calendar:/calendar-server",
        "-e",
        "CALENDAR_CREDENTIALS_PATH=/calendar-server/credentials.json",
        "mcp/calendar"
      ]
    }
  }
}
```

## 用法实例

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

### 创建事件

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

### 列表事件

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

### 更新事件

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

### 删除事件

```json
{
  "eventId": "event123"
}
```

## 安全说明

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

## 捐款

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

## 许可证

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

## 作者

刚格日

## 支助

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

## 常见问题

### @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 和提交记录判断。

