cal-scheduler

io.github.limey由 GitHub 账号 limey 发布v1.1.3更新于 Oct 24, 2026

Timezone-correct CalDAV scheduling MCP server with validated recurrence and single-occurrence edits.

已验证STDIO仅桌面效率与工作流沟通与协作

概览

AI 生成的概览

一个本地 MCP 服务器,让助手以正确的时区和重复规则读写任意 CalDAV 日历中的事件。

可以做什么
提供一组小而严格的日历工具:列出、创建、更新和删除事件,列出、创建和删除日历,排除或移动重复系列中的单个实例,以及将事件标记为完成。事件以配置的 IANA 时区存储,带 TZID/VTIMEZONE,并校验重复规则、按 RFC 5545 将 UNTIL 规范化为 UTC。另有一个辅助工具可在不写入任何内容的情况下预览日期时间将如何被解释。
适用场景
当助手需要针对 CalDAV 日历安排日程且时区正确性很重要时使用,例如跨夏令时切换仍保持本地钟表时间的重复会议,或修改重复系列中的某一次。它是校验与持久化层,不是自然语言解析层,请求由智能体来表述。
运行要求
作为 stdio 子进程在本地运行;需要 Python 3.11 或更高版本以及 PyPI 包 cal-scheduler-mcp,通常用 uv tool install 安装或用 uvx 运行。通过环境变量配置:CALDAV_BASE_URL 为必填,CALDAV_USERNAME、CALDAV_PASSWORD 和 CAL_DEFAULT_TZ 可选。需要能访问 CalDAV 服务器的网络,且宿主需在其每服务器 env 块中传入这些变量。
安装前请注意
该服务器需要 CalDAV 账户凭据(CALDAV_USERNAME、CALDAV_PASSWORD),并且可以创建、更新、删除和移动日历事件与日历,因此改动会写入真实日历。README 指出许多 MCP 宿主会剥离 stdio 服务器继承的环境变量,因此凭据必须设置在宿主的每服务器 env 块中。测试时请指向一个临时 CalDAV 账户。

安装

在 SourceWeft 中

  1. 打开 控制台中的 cal-scheduler,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

If you are an agent installing this MCP, read AGENTS.md first.

cal-scheduler

[cal-scheduler-mcp MCP server]

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 RRULE whose anchor contradicts it (e.g. a series starting on the 30th but set to repeat on the 1st), and normalises UNTIL to UTC under a zoned DTSTART as 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:

ModuleRole
config.pyenvironment config (CALDAV_*, CAL_DEFAULT_TZ)
timezones.pyparse datetimes; naive → assume default-zone wall time, offset → normalise into the zone; report what was assumed
ical.pybuild/parse VEVENTs (icalendar), expand ranges (recurring-ical-events), recurrence validation, EXDATE/RECURRENCE-ID ops
store.pyCalDAV transport (caldav) — list/create/delete calendars, get/put/delete events, read-modify-write with etag
server.pythe 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 on PyPI as cal-scheduler-mcp:

bash
uv tool install cal-scheduler-mcp

(or pip install cal-scheduler-mcp, uvx --from cal-scheduler-mcp cal-scheduler, etc.)

For editable dev work, install from a clone:

bash
# run straight from the repo with uv (no global install)uv run --directory /path/to/cal-scheduler-mcp cal-scheduler
# or install the console script into a tool environmentgh repo clone limey/cal-scheduler-mcpuv tool install --editable /path/to/cal-scheduler-mcp# or, with SSH GitHub access, in one step:uv tool install git+ssh://[email protected]/limey/cal-scheduler-mcp

Don't uv add cal-scheduler-mcp for the MCP — uv add writes into whatever project you're sitting in, not into the tool environment. For an MCP server (spawned as a subprocess), uv tool install is the right shape.

Configure

All configuration is via environment variables:

VariableRequiredDefaultMeaning
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_TZPacific/AucklandIANA 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:

json
{  "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).

If you installed from PyPI with uv tool install cal-scheduler-mcp, use the installed shim directly:

json
{  "mcpServers": {    "cal-scheduler": {      "command": "/path/to/cal-scheduler",      "env": {        "CALDAV_BASE_URL": "http://127.0.0.1:5232",        "CALDAV_USERNAME": "me",        "CALDAV_PASSWORD": "secret",        "CAL_DEFAULT_TZ": "Pacific/Auckland"      }    }  }}

Find the shim path with which cal-scheduler or uv tool list --show-paths.

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]), mark_done(uid, [calendar]) — tag an event done and record the timestamp.

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

bash
uv sync                 # install deps + dev toolsuv run ruff check       # lintuv 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

来源:README.md,提交 0373f85

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.1.3最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分