该项目提供了与 Google 日历 API 的集成,以便通过编程方式管理和交互日历事件。
要通过 Smithery 自动安装 Google 日历集成项目到 Claude Desktop:
npx -y smithery install @Avik-creator/googlecalendarMCP --client claude
克隆仓库
git clone https://github.com/Avik-creator/googlecalendarMCP
cd googlecalendarMCP
设置虚拟环境
python -m venv venv
source venv/bin/activate # 在 Windows 上使用 `venv\Scripts\activate`
安装依赖项
pip install -r requirements.txt
Google Cloud Platform 设置
a. 访问 Google Cloud 控制台 b. 创建新项目或选择现有项目 c. 启用 Google 日历 API d. 创建 OAuth 2.0 凭据:
credentials.json 并放置在项目根目录中环境变量
在项目根目录中创建一个 .env 文件,包含以下变量:
GOOGLE_APPLICATION_CREDENTIALS=path/to/credentials.json
CALENDAR_ID=your_calendar_id@group.calendar.google.com
首次认证
python auth.py
这将打开浏览器窗口进行 OAuth 认证。按照提示授权应用程序。
运行应用程序
python main.py
googlecalendarMCP/
├── auth.py # 认证处理
├── main.py # 主应用程序入口点
├── requirements.txt # 项目依赖项
├── .env # 环境变量
├── credentials.json # Google OAuth 凭据
└── token.json # 生成的 OAuth 令牌
该项目使用以下主要依赖项:
{
"mcpServers": {
"google_calendar_mcp": {
"command": "npx",
"args": [
"mcp-remote",
"https://mcp-google-calendar.avikm744.workers.dev/sse"
]
}
}
}
credentials.json、token.json 或 .env 文件提交到版本控制本项目采用 MIT 许可证 - 详情见 LICENSE 文件。