A native macOS MCP server that reads and writes Apple Calendar through EventKit, locally or over an authenticated network connection.
SwiftMCPEventKitmacOSHTTPXCTest
Apple Calendar MCP is a native macOS tool that gives AI assistants real read and write access to Apple Calendar — as an ical terminal command and as an MCP server, from the same small Swift binary. It talks to the macOS calendar database directly through EventKit, so queries return in roughly 100 milliseconds and Calendar.app never has to be open.
Why it exists
Most calendar integrations either scrape a web calendar or poll a remote API. This one sits on the machine that actually owns the data and exposes it two ways:
- Local (stdio) — for an AI app running on the same Mac: zero network, zero auth, one JSON config block.
- Networked (HTTP) — for another machine on the network, like a laptop or a remote Claude Code session, to reach the same calendar over a token-authenticated HTTP server.
Architecture
EventKitStorewraps Apple's EventKit framework for the actual calendar reads and writes.MCPServerimplements the Model Context Protocol tool surface —list_calendars,get_today,create_event,update_event,delete_event, and more — on top of that store.HTTPTransportandServerun the networked mode: a LaunchAgent-managed daemon, request routing, and process lifecycle.AuthandTokenStoreimplement the security model: every client gets its own revocable token, checked with a constant-time comparison, unioned across an environment variable, a default token file, and any number of per-host token files.
Engineering details worth noting
- Fail-closed auth. The HTTP server refuses to start with no resolvable token at all, and revoking a token takes effect on a running server within about five seconds, no restart required.
- Stable code signing. The binary is signed with a fixed identifier so the macOS "Allow Full Access" calendar grant survives rebuilds and upgrades.
- Input sanitization. A fix in the renderer sanitizes calendar names before they reach terminal output or event confirmations, closing an escaping edge case found during review.
- Real test coverage. An XCTest suite exercises auth, the token store, date parsing, rendering, and the serve command's HTTP surface, and runs in CI on every push.
It ships through a Homebrew tap that builds, code-signs, and can auto-start the tool in one command.