calendar-mcp-server

calendar-mcp-server

A thin, privacy-respecting CalDAV toolkit that lets an LLM read and manage your calendars safely, with dry-run writes and role gating.

Category
访问服务器

README

calendar-mcp-server (calmcp)

By Erik Bitzek e.bitzek@mpi-susmat.de — licensed under PolyForm Noncommercial 1.0.0

A thin, privacy-respecting CalDAV toolkit that lets an LLM read and manage your calendars — safely. The intelligence lives in the LLM and a small set of skill prompts; the tool itself is a compact set of well-guarded primitives with dry-run writes, role gating, and an audit log.

Works with any CalDAV server (Kerio Connect, Apple iCloud, Nextcloud, Radicale, Fastmail, …). Exposes everything over the Model Context Protocol (MCP) so it plugs straight into Claude Desktop, Claude Code, and Cowork.

Status. Read commands (list_calendars, query_events, find_events, get_free_busy, export_ics) and write commands (create_event, update_event, move_event, delete_event — dry-run by default) are implemented, plus the MCP adapter and LLM skills. Google (via its own API) is deferred; see DESIGN.md.

Why this design

  • No secrets in the repo. Passwords never live in the code, in calendars.yaml, or in environment variables — they're stored in your OS keyring (macOS Keychain, Windows Credential Manager, Linux Secret Service).
  • Writes are safe by default. Every write is a --confirm-gated dry-run that prints a before/after diff first. Writing to a calendar you don't own needs a second --confirm-foreign gate. Every real write is appended to an audit log.
  • Least privilege. A small YAML registry maps friendly calendar ids to accounts and a safety role (owner / writable / read-only).
  • LLM-friendly. Ships with skill prompts (skills/) so an assistant can turn free-text dates into events, do bulk edits, and check overlaps.

Install

python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[mcp]"      # add ,dev for the test/lint tools: ".[mcp,dev]"

Configure

cp calendars.example.yaml calendars.yaml   # git-ignored; NO secrets go in it
$EDITOR calendars.yaml

calendars.yaml only maps calendar ids → accounts → roles. Store each account's password in the OS keyring (with the keyring CLI, installed alongside calmcp):

keyring set calmcp/kerio_personal jdoe          # prompts for the password (hidden)

If no keyring backend is available (e.g. a headless box), calmcp prompts once at runtime and keeps the secret in memory only.

Example calendars.yaml

accounts:
  kerio_personal:
    type: caldav
    url: "https://caldav.example.de/caldav/users/example.de/jdoe"
    username: jdoe
    keyring_service: "calmcp/kerio_personal"
    verify_ssl: true

  icloud:
    type: caldav
    url: "https://caldav.icloud.com"
    username: "your-apple-id@example.com"
    keyring_service: "calmcp/icloud"      # Apple APP-SPECIFIC password

calendars:
  - id: me_personal            # you own this one
    account: kerio_personal
    role: owner

  - id: family                 # shared to you, read-only
    account: icloud
    name: "Family"
    role: read-only

defaults:
  write_calendar: me_personal
  timezone: Europe/Berlin

iCloud

iCloud is just another CalDAV account. Use the endpoint https://caldav.icloud.com and an app-specific password (generate one at appleid.apple.com; your Apple ID has 2FA):

keyring set calmcp/icloud your-apple-id@example.com   # paste the app-specific password

Command-line usage

calmcp is fully usable from the terminal — handy for testing before you wire it into an assistant.

# List configured calendars (with a reachability probe):
calmcp list_calendars
calmcp list_calendars --offline           # just print the registry, no network

# Query events in an (inclusive) date range:
calmcp query_events --from 2026-06-01 --to 2026-06-30
calmcp query_events --from 2026-06-01 --to 2026-06-30 --expand --json
calmcp query_events --from 2026-06-01 --to 2026-06-30 --calendars me_personal

# Search text, check free/busy, export to an .ics file:
calmcp find_events   --from 2026-06-01 --to 2026-12-31 --q "DFG"
calmcp get_free_busy --from 2026-06-14 --to 2026-06-21 --json
calmcp export_ics    --from 2026-06-01 --to 2026-06-30 --out june.ics

Writing events (safe by default)

Write commands print a dry-run diff and do nothing until you add --confirm:

# Preview (dry-run) — shows before/after, writes nothing:
calmcp create_event --calendar me_personal --summary "Dentist" \
    --start "2026-07-01 09:00" --end "2026-07-01 09:30"

# Actually create it:
calmcp create_event --calendar me_personal --summary "Dentist" \
    --start "2026-07-01 09:00" --end "2026-07-01 09:30" --confirm

calmcp update_event --calendar me_personal --uid <uid> --set location="Room 2" --confirm
calmcp move_event   --calendar me_personal --uid <uid> \
    --start "2026-07-01 10:00" --end "2026-07-01 10:30" --confirm
calmcp delete_event --calendar me_personal --uid <uid> --confirm

Writing to a calendar whose role isn't owner adds a warning and requires a second --confirm-foreign gate. Recurring writes take --scope this|all|thisAndFuture. Every real write is appended to an audit log (~/.local/state/calmcp/audit.jsonl on Linux/macOS).

Point calmcp at a non-default registry with --registry path/to/calendars.yaml or the CALMCP_REGISTRY environment variable.

Connect to Claude (MCP)

calmcp exposes these tools over MCP (stdio):

Tool What it does
list_calendars List configured calendars, roles, and reachability
query_events List events in a date range (optionally expand recurrences)
find_events Full-text search across calendars in a range
get_free_busy Free/busy blocks for a range
export_ics Export a range to iCalendar (.ics)
create_event Create an event (dry-run unless confirmed)
update_event Change fields on an event
move_event Reschedule an event
delete_event Delete an event

The MCP server finds its registry from $CALMCP_REGISTRY, falling back to ./calendars.yaml. Because your client launches the server from an arbitrary working directory, always set CALMCP_REGISTRY to an absolute path.

Claude Desktop

Edit your config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Add a calmcp server (use the absolute path to the calmcp-mcp binary inside your virtualenv):

{
  "mcpServers": {
    "calmcp": {
      "command": "/path/to/calendar-mcp-server/.venv/bin/calmcp-mcp",
      "env": {
        "CALMCP_REGISTRY": "/path/to/calendar-mcp-server/calendars.yaml"
      }
    }
  }
}

Restart Claude Desktop. You should see the calmcp tools available in a new chat.

Claude Code

claude mcp add calmcp \
  --env CALMCP_REGISTRY=/path/to/calendar-mcp-server/calendars.yaml \
  -- /path/to/calendar-mcp-server/.venv/bin/calmcp-mcp

Then check it with claude mcp list.

Skills

The prompts in skills/ (dates-to-events, bulk-edit, overlap-check) teach an assistant common calendar workflows on top of these tools. Point your assistant at that folder, or paste a skill into the conversation.

Develop

pip install -e ".[mcp,dev]"
ruff check .
mypy calmcp
pytest

Tests run against a local Radicale CalDAV fixture — no real credentials, and no network calls to any real provider.

License

Copyright © 2026 Erik Bitzek e.bitzek@mpi-susmat.de.

Released under the PolyForm Noncommercial License 1.0.0 — you're free to use, modify, and share it for any noncommercial purpose (personal projects, research, education, and other noncommercial organizations). Commercial use requires a separate license from the author. See LICENSE.md for the full terms.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选