# Google Calendar MCP Server A Model Context Protocol (MCP) server that provides access to Google Calendar data. ## Features - List available Google Calendars - Find available time slots in a calendar - Get upcoming events from a calendar ## Prerequisites - Python 3.9+ - Google Cloud project with Calendar API enabled - OAuth2 credentials ## Setup 1. Install dependencies: ``` pip install -r requirements.txt ``` 2. Set up Google Calendar API credentials: ``` python setup_credentials.py ``` Follow the prompts to authenticate with Google. 3. Run the server: ``` python google_calendar_server.py ``` ## Using with Claude Desktop Configure Claude Desktop to use this server by editing the configuration file: ```json { "mcpServers": { "google-calendar": { "command": "python", "args": ["/full/path/to/google_calendar_server.py"], "env": { "GOOGLE_TOKEN_FILE": "/path/to/token/file.json" } } } } ``` ## Available Tools ### list_calendars Lists all available Google Calendars. ### get_available_slots Finds available time slots in a calendar. Parameters: - `calendar_id`: The ID of the calendar to check - `days_ahead`: Number of days ahead to check (default: 7) - `slot_duration_minutes`: Duration of each slot in minutes (default: 30) - `start_hour`: Start hour of the day in 24-hour format (default: 9) - `end_hour`: End hour of the day in 24-hour format (default: 17) ### get_upcoming_events Gets upcoming events from a calendar. Parameters: - `calendar_id`: The ID of the calendar to check - `days_ahead`: Number of days ahead to check (default: 7) - `max_events`: Maximum number of events to return (default: 10)