Apple Calendar MCP
A local-first MCP server for macOS that enables AI assistants to read and manage Apple Calendar events via EventKit, with configurable permissions, audit logging, and a native setup app.
README
Apple Calendar MCP
Apple Calendar MCP is a local-first Model Context Protocol server for safely connecting AI assistants to Apple Calendar on macOS.
It uses a TypeScript MCP server, a Swift EventKit helper, SQLite local state, and a native macOS setup app. Calendar data stays on the Mac, users choose which calendars are visible, and writes are guarded by permission modes, confirmation gates, duplicate checks, idempotency, rollback records, audit logs, and change feeds.
Key Features
- Read Apple Calendar calendars, events, availability, and permissions through MCP tools.
- Create, update, reschedule, and delete events with preview-confirm safety by default.
- Enforce calendar allowlists server-side so blocked calendars remain hidden from agents.
- Track rollback records, audit records, compact snapshots, and token-efficient change feeds.
- Generate client configs for Claude Desktop, Codex, Cursor, OpenClaw, and generic MCP clients.
- Provide a native macOS setup wizard for Calendar permission, allowlists, permission mode, config generation, and verification.
Architecture
flowchart TD
A["MCP Client<br/>Claude, Codex, Cursor, OpenClaw"] --> B["TypeScript MCP Server"]
B --> C["Calendar Service Layer"]
C --> D["Swift EventKit Helper"]
D --> E["Apple Calendar / EventKit"]
C --> F["SQLite Local State"]
F --> G["Config, Audit, Rollback,<br/>Snapshots, Change Feed,<br/>Idempotency"]
H["Native macOS Setup App"] --> D
H --> F
The MCP server communicates over stdio. Logs are written to stderr or an optional local log file, never stdout, so MCP protocol traffic remains clean.
Requirements
- macOS with Apple Calendar and EventKit access.
- Node.js
>=22.5. - Swift toolchain through Xcode Command Line Tools or Xcode.
- An MCP client such as Claude Desktop, Codex, Cursor, OpenClaw, or another stdio-compatible client.
Install From Source
git clone <repo-url>
cd apple-calendar-mcp
npm install
npm run build
npm run helper:bundle
npm run helper:setup
The setup app walks through:
- Calendar permission explanation and request.
- Calendar allowlist selection.
- Permission mode selection.
- MCP client config generation.
- Verification checks and test connection.
Generated local config is stored under:
~/Library/Application Support/AppleCalendarMCP/
MCP Client Setup
Generate validated client configs:
npm run client-configs:generate
Copy or merge the generated file from .generated/client-configs/ into your client:
- Claude Desktop:
claude_desktop_config.json - Codex: append
codex.config.tomlto~/.codex/config.toml - Cursor: copy or merge
cursor.mcp.jsoninto~/.cursor/mcp.jsonor a project.cursor/mcp.json - OpenClaw: merge
openclaw.openclaw.jsoninto~/.openclaw/openclaw.json - Generic MCP clients: use
generic-mcp-client.json
Validate after copying:
npm run client-configs:validate
npm run client-configs:diagnose
The generated configs use an absolute Node executable, an absolute MCP server entrypoint, and an env block. Command and args are never combined into a shell string, which avoids failures with paths containing spaces.
npx Startup Path
The publishable server package exposes this binary:
npx apple-calendar-mcp
For local development and release candidates, prefer:
npm run start:mcp
Before publishing to npm, publish the internal workspace packages in dependency order or use the release artifacts generated by npm run release:package.
Security Model
Apple Calendar MCP is designed around defense in depth:
- macOS Calendar permission is required before EventKit access.
- Calendar allowlists restrict which calendars agents can see.
- Read-only, ask-before-write, trusted-write, and full-write modes control write risk.
- MVP writes require explicit confirmation or preview-confirm flow.
- Destructive and ambiguous operations return semantic errors instead of guessing.
- Recurring event writes require explicit scope.
- Calendar content is treated as untrusted input.
- Audit records, rollback records, idempotency keys, and change feeds are written locally.
See docs/Security Specification.md for the full security model.
Screenshots
Release screenshot placeholders:
- Setup wizard welcome and Calendar permission step.
- Calendar allowlist and permission mode step.
- Client configuration and verification step.
- Settings and diagnostics screen.
Capture signed-release screenshots before public distribution.
Troubleshooting
- Calendar access denied: open System Settings > Privacy & Security > Calendars and enable the helper app.
- MCP server startup red in setup: run
npm run buildand verifypackages/mcp-server/dist/index.jsexists. - Cursor or Codex cannot connect: regenerate configs with
npm run client-configs:generateand ensure the copied config uses absolute paths. - Client sees the server but no tools: restart the MCP client after config changes, then run
npm run client-configs:diagnose. - stdout/stderr separation fails: remove any stdout logging from the MCP server path; logs must go to stderr.
- Large reads fail: use narrower date ranges. The read service chunks large windows internally, but very large EventKit requests may still need retry.
Development
npm install
npm run build
npm test
npm run helper:bundle
npm run helper:setup
Useful commands:
npm run typechecknpm run client-configs:generatenpm run client-configs:validatenpm run release:verifynpm run release:package
Read docs/Development Guide.md before making security-sensitive changes.
Repository Structure
apps/macos-helper/ Swift EventKit bridge and native setup app
packages/mcp-server/ MCP stdio server and tool registration
packages/calendar-service/Business logic for reads, writes, rollback, snapshots
packages/sqlite-store/ Local SQLite persistence and migrations
packages/shared/ Shared schemas and typed contracts
scripts/ Helper, config, diagnostics, and release scripts
tests/ Phase-based safety and behavior tests
docs/ Consolidated maintainer and release documentation
Release
Create reproducible local release artifacts:
npm run release:package
Artifacts and checksums are written to:
dist/release/
The GitHub release workflow runs the same package script on tag pushes matching v*.
Roadmap
- Signed and notarized macOS release packaging.
- Public npm publication workflow after package namespace confirmation.
- More end-to-end client smoke tests across supported MCP clients.
- Expanded snapshot/change-feed pagination benchmarks.
- Better in-app screenshot capture and public documentation assets.
Contributing
Security, reliability, user trust, MCP compliance, and maintainability come before convenience. Keep changes scoped, run the full test suite, and update docs when behavior changes. Do not bypass permission checks, allowlists, confirmation gates, rollback records, audit records, idempotency checks, or semantic errors.
Start with:
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。