Caldav Mcp
🗓️ A CalDAV Model Context Protocol (MCP) server to expose calendar operations as tools for AI assistants.
🗓️ A CalDAV Model Context Protocol (MCP) server to expose calendar operations as tools for AI assistants.
✨ Features
- Connect to CalDAV servers
- List calendars
- List calendar events within a specific timeframe
- Create calendar events
- Update calendar events
- Delete calendar events by UID
Setup
{
"mcpServers": {
...,
"calendar": {
"command": "npx",
"args": [
"caldav-mcp"
],
"env": {
"CALDAV_BASE_URL": "<CalDAV server URL>",
"CALDAV_USERNAME": "<CalDAV username>",
"CALDAV_PASSWORD": "<CalDAV password>"
}
}
}
}
Development
Quick Start
Run the MCP server in development mode with auto-reload:
npm run dev
This will run the TypeScript code directly with watch mode and automatically load environment variables from .env.
Manual Build
Alternatively, you can compile TypeScript to JavaScript and run it:
- Compile:
npx tsc
- Run:
node dist/index.js
Available Tools
list-calendars
List all calendars returning both name and absolute URL. Pass a calendar's url unchanged as calendarUrl to the other tools.
Parameters: none
Returns:
- List of all available calendars
list-events
List all events between start and end date in the calendar specified by its URL
Parameters:
calendarUrl: stringend: string — End date (ISO 8601)start: string — Start date (ISO 8601)
Returns:
- A list of events that fall within the given timeframe, each containing
uid,summary,start,end, and optionallydescriptionandlocation
create-event
Creates an event in the calendar specified by its URL. For all-day events, set wholeDay to true. For a single-day all-day event, use start and end datetimes on the same calendar date; they do not need to be identical timestamps.
Parameters:
calendarUrl: stringdescription: string (optional)end: string — End datetime (ISO 8601)location: string (optional)recurrenceRule: object (optional)byday: array of string (optional)bymonth: array of number (optional)bymonthday: array of number (optional)count: number (optional)freq: enum (DAILY|WEEKLY|MONTHLY|YEARLY) (optional)interval: number (optional)until: string (optional)
start: string — Start datetime (ISO 8601)summary: stringwholeDay: boolean (optional) — Create as a whole-day event
Returns:
- The unique ID of the created event
update-event
Updates an existing event in the calendar specified by its URL. Only provided fields are changed. For a one-day full-day event, set wholeDay to true and set start and end to the same calendar day.
From the project's README.