Google 日历 MCP 服务器
使用模型上下文协议 (MCP) 通过 Claude Desktop 与您的 Google 日历进行交互。
这是一个基于 TypeScript 的 MCP 服务器,实现了 Google 日历集成。它演示了 MCP 的核心概念,同时提供:
通过 MCP URI 管理日历事件
用于创建和修改事件的工具
生成日历洞察的提示
特征
资源
通过 MCP URI 访问日历事件
每个活动都有标题、时间、描述和参加者
具有适当 MIME 类型的结构化事件数据
工具
create_event
- 创建新的日历事件以标题、时间和其他事件详细信息作为参数
直接与 Google 日历 API 接口
list_events
- 查看即将发生的日历事件[添加您已实现的其他工具]
提示
analyze_schedule
- 生成有关日历的见解包括即将举行的活动作为嵌入式资源
返回 LLM 分析的结构化提示
[添加您已实施的其他提示]
先决条件
Node.js(v14 或更高版本)
启用了日历 API 的 Google Cloud 项目
OAuth 2.0 客户端凭据
发展
按照devbox.sh上的说明安装 devbox
在项目目录中初始化devbox:
启动 devbox shell:
安装依赖项:
构建服务器:
对于使用自动重建的开发:
安装
要与 Claude Desktop 一起使用,请添加服务器配置:
在 MacOS 上: ~/Library/Application Support/Claude/claude_desktop_config.json
在 Windows 上: %APPDATA%/Claude/claude_desktop_config.json
首次设置
设置 Google Cloud 凭据:
创建新项目或选择现有项目
启用 Google 日历 API
创建 OAuth 2.0 凭据(桌面应用程序类型)
下载客户端机密 JSON 文件
将其重命名为
.client_secret.json
并将其放在项目根目录中
初始身份验证:
首次运行服务器时,它将提供一个身份验证 URL
在浏览器中访问 URL
授予请求的权限
复制提供的授权码
将代码粘贴回 CLI 提示符
调试
由于 MCP 服务器通过 stdio 进行通信,调试起来可能比较困难。我们推荐使用MCP Inspector ,它以包脚本的形式提供:
检查器将提供一个 URL 来访问浏览器中的调试工具。
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
允许使用模型上下文协议通过 Claude Desktop 与 Google 日历进行交互,从而实现日历事件管理和日程分析。
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityModel Context Protocol server for Gmail integration. This allows Claude Desktop (or any MCP client) to interact with your Gmail account through Google Apps Script.Last updated -2612MIT License
- -securityAlicense-qualityEnables comprehensive calendar management with capabilities to create, list, update, and delete events through a Model Context Protocol server integrated with Google Calendar.Last updated -143MIT License
- AsecurityAlicenseAqualityA Model Context Protocol server that bridges Claude with Google Tasks, allowing users to manage task lists and tasks directly through Claude interface.Last updated -1523MIT License
- -securityAlicense-qualityA Model Context Protocol server that integrates Google Calendar with Claude Desktop, enabling users to manage calendar events (view, create, update, delete) through natural language.Last updated -2453MIT License