Calendar AutoAuth MCP Server

Calendar AutoAuth MCP Server

的镜像

简介

这是一个 MCP 服务器,允许 Claude Desktop 通过自然语言交互管理 Google 日历。支持自动认证并提供完整的日历管理功能。

smithery徽章 npm版本

快速安装

通过 Smithery 为 Claude Desktop 安装:

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

设置步骤

1. 获取 Google Cloud 凭据

  • Google Cloud Console 创建项目
  • 启用 Google Calendar API
  • 创建 OAuth 2.0 凭据 (选择"Desktop app"或"Web application")
  • 对于 Web 应用程序,添加 http://localhost:3000/oauth2callback 到重定向 URI
  • 下载凭据并重命名为 gcp-oauth.keys.json

2. 认证

# 全局认证(推荐)
mkdir -p ~/.calendar-mcp
mv gcp-oauth.keys.json ~/.calendar-mcp/
npx @gongrzhe/server-calendar-autoauth-mcp auth

# 或使用本地目录中的凭据
npx @gongrzhe/server-calendar-autoauth-mcp auth

3. 配置 Claude Desktop

在 Claude Desktop 的配置中添加:

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

使用示例

创建事件

{
  "summary": "团队会议",
  "start": {
    "dateTime": "2024-01-20T10:00:00Z"
  },
  "end": {
    "dateTime": "2024-01-20T11:00:00Z"
  },
  "description": "每周团队同步",
  "location": "会议室A"
}

列出事件

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

更新事件

{
  "eventId": "event123",
  "summary": "更新后的会议标题",
  "start": {
    "dateTime": "2024-01-20T11:00:00Z"
  },
  "end": {
    "dateTime": "2024-01-20T12:00:00Z"
  }
}

删除事件

{
  "eventId": "event123"
}

故障排除

  • 找不到 OAuth 密钥: 确保 gcp-oauth.keys.json 在正确位置
  • 凭据格式问题: 验证 OAuth 密钥文件内容正确
  • 端口冲突: 确保端口 3000 未被占用

更多信息

  • 凭据安全存储在 ~/.calendar-mcp/
  • 支持 Docker 部署
  • 完整文档请访问 Smithery