# Calendar MCP Server - by Rezel, for Rezel
A Model Context Protocol (MCP) server that provides access to Google Calendar events via a public ICS feed.
## Features
- **List Events**: Fetch events within a specific date range, handling recurring events automatically.
- **Search Events**: Search for events by text (summary or description) within a 6-month window.
- **Caching**: Implements a 5-minute memory cache to respect rate limits.
## Setup
### 1. Prerequisites
- Python 3.11+
- `uv` package manager (recommended)
### 2. Installation
Install dependencies using `uv`:
```bash
uv sync
```
### 3. Configuration
Open `main.py` and set the `ICS_URL` constant to your public Google Calendar ICS URL:
```python
ICS_URL = "https://calendar.google.com/calendar/ical/YOUR_CALENDAR_ID/public/basic.ics"
```
## Usage
Run the server using `uv`:
```bash
uv run main.py
```
## Tools
### `list_events`
Lists events between two dates.
- **Arguments**:
- `start_date` (string, ISO 8601, e.g., "2023-01-01")
- `end_date` (string, ISO 8601, e.g., "2023-01-31")
- **Returns**: A list of event objects with `summary`, `start`, `end`, `description`, and `location`.
### `search_events`
Searches for events matching a text query.
- **Arguments**:
- `query` (string)
- **Returns**: A list of matching event objects found in the range of [30 days ago, 180 days future].