article
README
🚀 Google Calendar MCP 服务器
Google Calendar MCP 服务器是一个用于 Google 日历集成的 Claude 桌面 Model Context Protocol (MCP) 服务器。它能让 AI 助手通过自然语言交互来管理 Google 日历事件,为用户提供便捷的日历管理体验。
✨ 主要特性
- 可创建带有标题、时间、描述和位置的日历事件。
- 能通过事件 ID 查取详细信息。
- 支持更新现有事件(标题、时间、描述、位置)。
- 可以删除事件。
- 能在指定时间段内列出事件。
- 完全集成 Google 日历 API。
- 采用安全的 OAuth2 认证。
📦 安装指南
使用 Smithery 自动安装
通过 Smithery 可自动安装 Google 日历对 Claude 桌面的集成:
npx -y @smithery/cli install @gongrzhe/server-calendar-mcp --client claude
手动安装
npm install @gongrzhe/server-calendar-mcp
📚 详细文档
配置
- 创建 Google Cloud 项目并获取凭证:
- 创建 Google Cloud 项目:
- 访问 Google Cloud Console。
- 创建新项目或选择现有项目。
- 启用项目的 Google 日历 API。
- 创建 OAuth 2.0 凭证:
- 转到 "APIs & Services" > "Credentials"。
- 点击 "Create Credentials" > "OAuth client ID"。
- 选择应用类型为 "Desktop app"。
- 输入名称并点击 "Create"。
- 获取客户端 ID 和密钥。
- 使用 OAuth2 获取访问令牌:
- 访问 Google API Console。
- 创建项目并启用日历 API。
- 添加 OAuth 客户端 ID。
- 生成 OAuth 2.0 令牌。
- 创建 Google Cloud 项目:
- 在 Claude 桌面配置中添加以下内容:
{
"calendar": {
"enable": true,
"apiKey": "你的 Google 日历 API 密钥",
"clientId": "你的客户端 ID",
"clientSecret": "你的客户端密钥"
}
}
💻 使用示例
基础用法
创建日历事件
{
"summary": "会议提醒",
"start.dateTime": "2024-03-15T10:00:00+08:00",
"end.dateTime": "2024-03-15T11:00:00+08:00"
}
获取事件列表
{
"timeMin": "2024-03-15T00:00:00+08:00",
"maxResults": 10
}
⚠️ 重要提示
- 安装完成后重启 Claude 桌面以应用配置。
- 确保 API 密钥和客户端凭证安全,避免泄露。
- 定期更新访问令牌以增强安全性。
🤝 贡献
欢迎贡献!请随时提交 Pull Request。
📄 许可证
本项目采用 ISC 许可证。
👨💻 作者
gongrzhe
Scan to contact