A timezone-correct CalDAV scheduling MCP server (zoned .ics, validated recurrence, single-occurrence edits).
Project description
If you are an agent installing this MCP, read AGENTS.md first.
cal-scheduler
A thin, timezone-correct MCP server for scheduling against any CalDAV calendar. It gives an LLM agent a small, strict set of calendar tools and does the deterministic, fiddly parts of iCalendar correctly so the model doesn't have to.
It is not an NLP layer: the agent phrases the request, the server validates
it, rejects bad input loudly, and persists clean zoned .ics.
Why it exists
Most calendar tooling an LLM reaches for gets three things subtly wrong. cal-scheduler fixes them by construction:
- Stores zoned, not bare UTC. Events are written with
TZID/VTIMEZONE, so a weekly 9am stays 9am across a daylight-saving boundary instead of drifting an hour. Storing bare UTC is the classic cause of that drift. - Validates recurrence. It rejects an
RRULEwhose anchor contradicts it (e.g. a series starting on the 30th but set to repeat on the 1st), and normalisesUNTILto UTC under a zonedDTSTARTas RFC 5545 requires. - Does real single-occurrence edits. Exclude one instance (
EXDATE) or move one instance (RECURRENCE-ID) without disturbing the rest of the series — the operations naive wrappers tend to lack.
How it works
A small uv Python package that composes mature libraries rather than
implementing a calendar engine:
| Module | Role |
|---|---|
config.py |
environment config (CALDAV_*, CAL_DEFAULT_TZ) |
timezones.py |
parse datetimes; naive → assume default-zone wall time, offset → normalise into the zone; report what was assumed |
ical.py |
build/parse VEVENTs (icalendar), expand ranges (recurring-ical-events), recurrence validation, EXDATE/RECURRENCE-ID ops |
store.py |
CalDAV transport (caldav) — list/create/delete calendars, get/put/delete events, read-modify-write with etag |
server.py |
the FastMCP stdio server and the tool surface |
It runs as a stdio MCP server that an MCP host (Claude, an agent harness, etc.) spawns as a subprocess.
Install
Requires Python ≥ 3.11. The package is not yet on PyPI; install from a clone of this repo.
# run straight from the repo with uv (no global install)
uv run cal-scheduler
# or install the console script into a tool environment
gh repo clone limey/cal-scheduler-mcp
uv tool install /path/to/cal-scheduler-mcp
# or, with SSH GitHub access, in one step:
uv tool install git+ssh://git@github.com/limey/cal-scheduler-mcp
Don't
uv add cal-schedulerfor the MCP —uv addwrites into whatever project you're sitting in, not into the tool environment. For an MCP server (spawned as a subprocess),uv tool installis the right shape.
Configure
All configuration is via environment variables:
| Variable | Required | Default | Meaning |
|---|---|---|---|
CALDAV_BASE_URL |
✅ | — | CalDAV server URL, e.g. http://127.0.0.1:5232 |
CALDAV_USERNAME |
— | CalDAV account user | |
CALDAV_PASSWORD |
— | CalDAV account password | |
CAL_DEFAULT_TZ |
Pacific/Auckland |
IANA zone every event is stored in |
Many MCP hosts strip inherited environment from stdio servers, so set these in the
host's per-server env block rather than relying on the ambient shell.
Example MCP host config
The MCP runs as a stdio subprocess that the host spawns. Many hosts strip
inherited PATH from that subprocess, so wire the uv run --directory
form rather than relying on the cal-scheduler shim being on the spawn
host's PATH:
{
"mcpServers": {
"cal-scheduler": {
"command": "uv",
"args": ["run", "--directory", "/abs/path/to/cal-scheduler-mcp", "cal-scheduler"],
"env": {
"CALDAV_BASE_URL": "http://127.0.0.1:5232",
"CALDAV_USERNAME": "me",
"CALDAV_PASSWORD": "secret",
"CAL_DEFAULT_TZ": "Pacific/Auckland"
}
}
}
}
/abs/path/to/cal-scheduler-mcp is the absolute path to a local clone of
this repo (see Install above).
Pair it with any CalDAV server. A simple self-hosted option is
Radicale (plain http://, no TLS needed for local use).
Tool surface
Events — list_events(start, end, [calendar]), create_event(summary, start, [end, calendar, description, location, rrule]), update_event(uid, …),
delete_event(uid, [calendar]), exclude_occurrence(uid, occurrence, [calendar]),
move_occurrence(uid, occurrence, new_start, [new_end, calendar]).
Calendars — list_calendars, create_calendar(name), delete_calendar(name).
Helper — resolve_datetime(value) — preview how a datetime will be interpreted,
without writing anything.
The timezone rule (the whole point)
Every event is stored zoned to CAL_DEFAULT_TZ.
- A naive datetime (
2026-06-30T21:00) is assumed to be wall time in that zone, and the tool response says so ("assumed Pacific/Auckland wall time"). - An offset-qualified datetime (
…+12:00) is honoured as an instant and re-expressed in the zone — same wall clock when the offset matches, a correct conversion otherwise. - A date-only value (
2026-06-30) is an all-day event.
Develop
uv sync # install deps + dev tools
uv run ruff check # lint
uv run pytest # unit tests (no server required)
The unit tests cover the pure layers (timezone resolution, recurrence validation,
EXDATE/RECURRENCE-ID construction) and need no running CalDAV server. To exercise
the full stack end to end, point CALDAV_BASE_URL at a throwaway CalDAV account.
License
MIT © 2026 Robert Clark
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cal_scheduler_mcp-1.0.0a1.tar.gz.
File metadata
- Download URL: cal_scheduler_mcp-1.0.0a1.tar.gz
- Upload date:
- Size: 17.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
081ad6ea8187059417d83b2f888100cfe37cba22e2391de50a126ec7dcece8c3
|
|
| MD5 |
95dd39407e296bb363e9923671e939b3
|
|
| BLAKE2b-256 |
2321ed51c0c01edbce1e124f917697f323ec11bca382c8ab53848bfcf5cc6947
|
Provenance
The following attestation bundles were made for cal_scheduler_mcp-1.0.0a1.tar.gz:
Publisher:
publish.yml on limey/cal-scheduler-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cal_scheduler_mcp-1.0.0a1.tar.gz -
Subject digest:
081ad6ea8187059417d83b2f888100cfe37cba22e2391de50a126ec7dcece8c3 - Sigstore transparency entry: 1879859157
- Sigstore integration time:
-
Permalink:
limey/cal-scheduler-mcp@9457328561a2b8b50a162cdbb5a5e42dcd56d380 -
Branch / Tag:
refs/tags/v1.0.0a1 - Owner: https://github.com/limey
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9457328561a2b8b50a162cdbb5a5e42dcd56d380 -
Trigger Event:
push
-
Statement type:
File details
Details for the file cal_scheduler_mcp-1.0.0a1-py3-none-any.whl.
File metadata
- Download URL: cal_scheduler_mcp-1.0.0a1-py3-none-any.whl
- Upload date:
- Size: 21.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f08def1355c41c8ddfdab8efd8248a9836c0f89560d6056c1bc2d88a82d48fe
|
|
| MD5 |
a57e180cad431370aa08129c2a5f0ae9
|
|
| BLAKE2b-256 |
938bfff41a8433f8244e91ff5e3895482705c2b75c7e488b6abc88eb7bd10407
|
Provenance
The following attestation bundles were made for cal_scheduler_mcp-1.0.0a1-py3-none-any.whl:
Publisher:
publish.yml on limey/cal-scheduler-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cal_scheduler_mcp-1.0.0a1-py3-none-any.whl -
Subject digest:
9f08def1355c41c8ddfdab8efd8248a9836c0f89560d6056c1bc2d88a82d48fe - Sigstore transparency entry: 1879859222
- Sigstore integration time:
-
Permalink:
limey/cal-scheduler-mcp@9457328561a2b8b50a162cdbb5a5e42dcd56d380 -
Branch / Tag:
refs/tags/v1.0.0a1 - Owner: https://github.com/limey
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9457328561a2b8b50a162cdbb5a5e42dcd56d380 -
Trigger Event:
push
-
Statement type: