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
# 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.