Skip to main content
Glama

Google Calendar MCP Server

by amornpan
README.md3.08 kB
# Google Calendar MCP Server - Python Installation Guide 📘 **Overview** A Model Context Protocol server that provides access to Google Calendar API with support for asynchronous operations. This implementation enables efficient calendar management through a standardized interface. 🔑 **Key Components** ### API Tools - list: Query calendar events (past 2 years to 1 year future) - create-event: Create new calendar entries - delete-duplicates: Remove duplicate events - delete-event: Delete specific calendar events ### Core Resources - Token Management System (credentials/*.json) - OAuth 2.0 authentication flow - Automatic token refresh handling - Runtime token discovery - Logging System (logs/*.log) - Operation logging with timestamps - Error tracking and debugging - Performance metrics collection 💡 **Implementation Steps** ### Prerequisites ```bash # Install required Python packages pip install -r requirements.txt ``` Dependencies: ```python google-auth-oauthlib==1.0.0 google-auth-httplib2==0.1.0 google-api-python-client==2.108.0 aiohttp==3.8.5 asyncio==3.4.3 ``` ### Initial Setup ```bash # Clone repository git clone https://github.com/yourusername/GCalendar.git cd GCalendar # Create required directories mkdir -p credentials logs ``` ### Authentication Setup 1. Create Google Cloud Console project 2. Enable Google Calendar API 3. Download credentials.json to credentials/ 4. Run create_token.py: ```bash python src/create_token.py ``` ⚙️ **Technical Configuration** ### Server Configuration Add to `claude_desktop_config.json`: ```json { "mcpServers": { "gcalendar": { "command": "YOUR_CONDA_PATH/envs/mcp-gcalendar/bin/python", "args": [ "YOUR_PATH/GCalendar/src/mcp_server.py" ] } } } ``` ### Path Configuration Replace placeholders: • YOUR_CONDA_PATH options: - M1/M2 Mac: `/opt/homebrew/Caskroom/miniforge/base` - Miniconda: `~/miniconda3` or `/opt/miniconda3` • YOUR_PATH: Full repository clone path ### Error Handling - Automatic token refresh on expiry - 60-second operation timeout - Comprehensive error logging - Auto-retry on transient errors ### Project Structure ``` GCalendar/ ├── credentials/ │ ├── credentials.json # From Google Cloud Console │ └── token.json # Generated by create_token.py ├── logs/ │ └── calendar_service.log ├── src/ │ ├── calendar_service.py # Core calendar operations │ ├── create_token.py # Token generation │ ├── list_past_events.py # Event listing utility │ ├── mcp_client.py # MCP client implementation │ ├── mcp_server.py # Main server implementation │ └── renew_token.py # Token renewal utility ├── requirements.txt └── README.md ``` ### System Requirements - Python 3.9 or higher - Google Calendar API enabled - Valid OAuth 2.0 credentials - Internet connectivity - Asia/Bangkok timezone ## License This project is licensed under the MIT License. See LICENSE file for details.

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/amornpan/py-mcp-gcalendar'

If you have feedback or need assistance with the MCP directory API, please join our Discord server