Skip to main content

caldav-blade-mcp

A precision CalDAV MCP server that gives AI agents structured access to calendar data. Built for the Model Context Protocol with token efficiency as a first-class design goal.

Why another calendar MCP?

Most calendar integrations dump entire iCalendar blobs into the context window. A single week view can burn 3,000+ tokens before the model even starts reasoning. caldav-blade-mcp takes a different approach:

  • Compact output — pipe-delimited, one line per event, null fields omitted. A day's events in ~200 tokens.
  • Batch operationscal_events_batch fetches N calendars in one tool call. One call instead of eleven for a family digest.
  • Purpose-built viewscal_today, cal_week, cal_freebusy give you exactly what you need with zero configuration.
  • Write-gated — read by default, writes require explicit opt-in. cal_delete has an additional confirm=true safety gate.

Quick start

# Install
uv pip install -e .

# Configure (single provider)
export CALDAV_URL="https://caldav.fastmail.com/dav/calendars/user/you@fastmail.com"
export CALDAV_USERNAME="you@fastmail.com"
export CALDAV_PASSWORD="app-specific-password"

# Run
caldav-blade-mcp

13 tools, 3 categories

Read (9 tools)

Tool Purpose Token cost
cal_info Health check — providers, connection, write gate ~50
cal_calendars List all calendars (name, UID, provider) ~20/cal
cal_events Events from one calendar in date range ~30/event
cal_events_batch Events from N calendars in one call ~30/event
cal_event Full detail by UID (attendees, recurrence) ~100
cal_search Search by text, attendee, location ~30/event
cal_today Today's events across all calendars ~30/event
cal_week This week's events across all calendars ~30/event
cal_freebusy Busy periods only — cheapest availability check ~15/period

Write (4 tools, gated)

Tool Purpose
cal_create Create event with all fields (description, location, recurrence, attendees, alarm)
cal_update Partial update — only changed fields, auto-increments SEQUENCE
cal_delete Delete by UID — requires confirm=true
cal_move Move event between calendars

Output format

── Work ──
08:30-09:30 | Standup | uid=abc123
14:00-15:00 | Design review @ Level 3 | loc=Level 3 | uid=def456

── Personal ──
All day | School holidays | uid=ghi789
18:30-19:30 | Swim squad | uid=jkl012

Multi-provider support

Run against multiple CalDAV servers simultaneously — useful when calendars span Fastmail, iCloud, Google, or self-hosted (Radicale, Baïkal, Nextcloud).

export CALDAV_PROVIDERS="fastmail,icloud"
export CALDAV_FASTMAIL_URL="https://caldav.fastmail.com/dav/calendars/user/..."
export CALDAV_FASTMAIL_USERNAME="you@fastmail.com"
export CALDAV_FASTMAIL_PASSWORD="fm-app-password"
export CALDAV_ICLOUD_URL="https://caldav.icloud.com/"
export CALDAV_ICLOUD_USERNAME="you@icloud.com"
export CALDAV_ICLOUD_PASSWORD="app-specific-password"

Single-provider mode (the CALDAV_URL / CALDAV_USERNAME / CALDAV_PASSWORD env vars) remains fully supported for simple setups.

Security model

Layer Mechanism
Write gate CALDAV_WRITE_ENABLED=true required for any mutation
Delete safety cal_delete additionally requires confirm=true
Credential scrubbing Passwords and server URLs stripped from all error output
Bearer auth Optional CALDAV_MCP_API_TOKEN for HTTP transport
No caching Credentials read from env at startup, never persisted

Claude Code integration

Add to your MCP config (e.g. claude.nix or settings.json):

{
  "mcpServers": {
    "calendar-piers": {
      "type": "stdio",
      "command": "uv",
      "args": ["--directory", "~/src/caldav-blade-mcp", "run", "caldav-blade-mcp"],
      "env": {
        "CALDAV_URL": "...",
        "CALDAV_USERNAME": "...",
        "CALDAV_PASSWORD": "...",
        "CALDAV_WRITE_ENABLED": "false"
      }
    }
  }
}

A bundled SKILL.md teaches Claude the optimal tool-calling patterns — batch over individual, freebusy over full event scans, convenience views for common queries.

Development

make install-dev    # Install with dev + test dependencies
make test           # Unit tests (mocked caldav, no server needed)
make check          # Lint + format + type-check
make run            # Start MCP server (stdio)

Architecture

src/caldav_blade_mcp/
├── server.py       — FastMCP 2.0 server, 13 @mcp.tool decorators
├── client.py       — CalDAVClient with multi-provider, typed exceptions
├── formatters.py   — Token-efficient output (pipe-delimited, null omission)
├── models.py       — Provider config, write-gate, constants
└── auth.py         — Bearer token middleware for HTTP transport

Built with FastMCP 2.0, caldav, and python-dateutil.

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

caldav_blade_mcp-0.4.0.tar.gz (142.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

caldav_blade_mcp-0.4.0-py3-none-any.whl (22.8 kB view details)

Uploaded Python 3

File details

Details for the file caldav_blade_mcp-0.4.0.tar.gz.

File metadata

  • Download URL: caldav_blade_mcp-0.4.0.tar.gz
  • Upload date:
  • Size: 142.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for caldav_blade_mcp-0.4.0.tar.gz
Algorithm Hash digest
SHA256 4055b35730f79b0be7710881fd01962bd32e22c8fd7ab14f3bc90c0a8f225212
MD5 e6a24327735314a4b019ccd2e28c194b
BLAKE2b-256 c925c22b2852f0efe05bc80d94cede9f12dc4a0a438018209019d8b434f757a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for caldav_blade_mcp-0.4.0.tar.gz:

Publisher: publish.yml on Groupthink-dev/caldav-blade-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file caldav_blade_mcp-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for caldav_blade_mcp-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2694e3c7dc7ff54964b63f0e979e4e65c43b43640d15485af313980604d0eecc
MD5 9d1ee866456c096c35140594a501d720
BLAKE2b-256 d93d7f2d6324960445c808dc3ee6d81948ff76d6a35dbfd40521fd81588be8d1

See more details on using hashes here.

Provenance

The following attestation bundles were made for caldav_blade_mcp-0.4.0-py3-none-any.whl:

Publisher: publish.yml on Groupthink-dev/caldav-blade-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 files

0.1.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page