@gongrzhe/server-calendar-autoauth-mcp

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

A Model Context Protocol server for Google Calendar integration with auto authentication

原始使用文档
文档目录13 节
  1. Features
  2. Installation & Authentication
  3. Docker Support
  4. Usage Examples
  5. Create Event
  6. List Events
  7. Update Event
  8. Delete Event
  9. Security Notes
  10. Contributing
  11. License
  12. Author
  13. Support

Calendar MCP Server

A Model Context Protocol (MCP) server for Google Calendar integration in Cursor IDE with auto authentication support. This server enables AI assistants to manage Google Calendar events through natural language interactions.

npm version License: ISC

Features

  • Create calendar events with title, time, description, and location
  • Retrieve event details by event ID
  • Update existing events (title, time, description, location)
  • Delete events
  • List events within a specified time range
  • Full integration with Google Calendar API
  • Simple OAuth2 authentication flow with auto browser launch

Installation & Authentication

  1. Create a Google Cloud Project and obtain credentials:

    a. Create a Google Cloud Project:

    • Go to Google Cloud Console
    • Create a new project or select an existing one
    • Enable the Google Calendar API for your project

    b. Create OAuth 2.0 Credentials:

    • Go to "APIs & Services" > "Credentials"
    • Click "Create Credentials" > "OAuth client ID"
    • Choose "Desktop app" as application type
    • Give it a name and click "Create"
    • Download the JSON file of your client's OAuth keys
    • Rename the key file to gcp-oauth.keys.json
  2. Run Authentication:

    You can authenticate in two ways:

    a. Global Authentication (Recommended):

    # 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. Local Authentication:

    # 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
    

    The authentication process will:

    • Look for gcp-oauth.keys.json in the current directory or ~/.calendar-mcp/
    • If found in current directory, copy it to ~/.calendar-mcp/
    • Open your default browser for Google authentication
    • Save credentials as ~/.calendar-mcp/credentials.json

    Note: After successful authentication, credentials are stored globally in ~/.calendar-mcp/ and can be used from any directory.

  3. Configure in Cursor Desktop:

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

Docker Support

If you prefer using Docker:

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

Usage Examples

The server provides several tools that can be used through the Cursor IDE:

Create Event

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

List Events

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

Update Event

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

Delete Event

{
  "eventId": "event123"
}

Security Notes

  • OAuth credentials are stored securely in your local environment
  • The server uses offline access to maintain persistent authentication
  • Never share or commit your credentials to version control
  • Regularly review and revoke unused access in your Google Account settings

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the ISC License.

Author

gongrzhe

Support

If you encounter any issues or have questions, please file an issue on the GitHub repository.

版本与发布记录

@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 是什么?

A Model Context Protocol server for Google Calendar integration with auto authentication

如何安装 @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 和提交记录判断。