Google Calendar MCP Server
Integrates Google Calendar with the Model Context Protocol to manage events, search agendas, and check availability. It features Home Assistant integration and SSE support for remote access through Claude Desktop.
README
Google Calendar MCP Server
A Model Context Protocol (MCP) server for Google Calendar integration, designed for personal calendar management with Home Assistant support.
Features
- MCP Tools: Search events, list upcoming events, create/update/delete events
- Daily Agenda: Get formatted daily agenda summaries
- Calendar Categories: Organize calendars by type (work, personal, family, etc.)
- REST API: Endpoints for Home Assistant integration
- SSE Transport: Connect from Claude Desktop via mcp-remote
- Docker Support: Easy deployment with Docker Compose
Quick Start
1. Google Cloud Setup
- Go to Google Cloud Console
- Create a new project or select existing
- Enable the Google Calendar API
- Create OAuth 2.0 credentials (Desktop App type)
- Download the credentials
2. Configuration
# Copy example environment file
cp .env.example .env
# Edit with your credentials
# GOOGLE_CLIENT_ID=your-client-id
# GOOGLE_CLIENT_SECRET=your-client-secret
3. Initial OAuth Setup
# Run OAuth setup (opens browser for consent)
docker compose --profile setup run --rm calendar-auth
4. Start the Server
docker compose up -d
5. Claude Desktop Configuration
Add to your claude_desktop_config.json:
{
"mcpServers": {
"calendar": {
"command": "npx",
"args": ["-y", "mcp-remote", "http://YOUR_SERVER_IP:8002/mcp/sse", "--allow-http"]
}
}
}
Home Assistant MCP Integration
The server exposes SSE endpoints for MCP connections:
/mcp/sse- Primary MCP SSE endpoint/sse- Alias endpoint for Home Assistant compatibility
Each connection gets a fresh server instance for proper session isolation.
MCP Tools
| Tool | Description |
|---|---|
calendar_get_current_time |
Get current date/time with reference dates for queries |
calendar_list_events |
List upcoming events with optional filters |
calendar_search |
Search events by text query |
calendar_get_event |
Get details of a specific event |
calendar_create_event |
Create a new calendar event |
calendar_update_event |
Update an existing event |
calendar_delete_event |
Delete an event |
calendar_daily_agenda |
Get agenda for a specific day |
calendar_weekly_summary |
Get 7-day overview |
calendar_list_calendars |
List all available calendars |
calendar_free_busy |
Check availability for a time range |
Tool Schema Notes
All tools use Gemini-compatible schemas with explicit types:
- Array parameters use comma-separated strings (e.g.,
attendees: "user1@example.com,user2@example.com") - Calendar IDs use comma-separated strings (e.g.,
calendar_ids: "primary,work@group.calendar.google.com") - Dates use ISO 8601 format (
YYYY-MM-DDorYYYY-MM-DDTHH:MM:SS)
REST API Endpoints
| Endpoint | Description |
|---|---|
GET /health |
Health check with auth status |
GET /calendars |
List all calendars |
GET /events/today |
Today's events |
GET /events/upcoming |
Upcoming events |
GET /events/search?q=query |
Search events |
GET /summary/daily |
Daily summary |
GET /summary/weekly |
Weekly summary |
GET /free-time |
Find free time slots |
Home Assistant Integration
REST Sensor Example
sensor:
- platform: rest
name: "Next Calendar Event"
resource: http://YOUR_SERVER_IP:8002/events/upcoming?days=1
value_template: "{{ value_json[0].summary if value_json else 'No events' }}"
scan_interval: 300
- platform: rest
name: "Today's Events Count"
resource: http://YOUR_SERVER_IP:8002/events/today
value_template: "{{ value_json | length }}"
scan_interval: 300
MCP Integration
Home Assistant can connect via the MCP SSE endpoints:
http://YOUR_SERVER_IP:8002/mcp/ssehttp://YOUR_SERVER_IP:8002/sse(alias)
Project Structure
mcp_google_calendar/
├── src/mcp_google_calendar/
│ ├── __init__.py
│ ├── auth.py # OAuth2 authentication
│ ├── calendar_client.py # Google Calendar API wrapper
│ ├── config.py # Settings and configuration
│ ├── models.py # Pydantic models
│ ├── server.py # MCP stdio server
│ ├── sse_server.py # MCP SSE server
│ ├── combined_server.py # REST + SSE combined server
│ └── api.py # REST API for Home Assistant
├── config/
│ └── calendars.yaml # Calendar categorization
├── credentials/
│ ├── client_secrets.json # OAuth credentials
│ └── token.json # Stored tokens
├── docker-compose.yml
├── Dockerfile
└── README.md
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。