Google Calendar MCP Server

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.

Category
Visit Server

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

  1. Go to Google Cloud Console
  2. Create a new project or select existing
  3. Enable the Google Calendar API
  4. Create OAuth 2.0 credentials (Desktop App type)
  5. 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-DD or YYYY-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/sse
  • http://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

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured