本项目借助 Claude Desktop,通过模型上下文协议(MCP)实现与 Google Calendar 的交互。这是一个基于 TypeScript 的 MCP 服务器,专注于 Google 日历集成。它不仅能演示核心 MCP 概念,还具备以下功能:
create_event
- 用于创建新的日历事件:
list_events
- 用于查看即将进行的日历事件。analyze_schedule
- 用于生成日历洞察:
curl -fsSL https://get.jetpack.io/devbox | bash
devbox init
devbox shell
npm install
npm run build
npm run watch
与 Claude Desktop 一起使用时,需添加服务器配置:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"Google Calendar": {
"command": "/path/to/Google Calendar/build/index.js"
}
}
}
.client_secret.json
并放在项目根目录中。由于 MCP 服务器通过 stdio 通信,调试可能具有挑战性。我们推荐使用 MCP Inspector,它作为包脚本可用:
npm run inspector
Inspector 会提供一个访问调试工具的浏览器 URL。