mcp-apple-calendar
A lightweight MCP server for Apple Calendar on macOS that uses a Swift helper to access EventKit directly, enabling event queries without AppleScript or Calendar.app dependency.
README
mcp-apple-calendar
A lightweight MCP server for Apple Calendar on macOS. Uses a compiled Swift helper (cal-helper) that talks directly to the system's EventKit framework -- no AppleScript, no Calendar.app dependency, no timeout issues with Exchange/iCloud accounts.
Works with any MCP client: Claude Desktop, OpenCode, Cursor, Zed, or anything else that supports the MCP stdio transport.
Requirements
- macOS 13+
- Node.js 18+
- Swift (for building
cal-helper-- included with Xcode orxcode-select --install) - Calendar access granted to
cal-helperin System Settings > Privacy & Security > Calendars
Install
git clone https://github.com/barrettclark/mcp-apple-calendar
cd mcp-apple-calendar
npm install
swiftc -O -o cal-helper cal-helper.swift
Then run cal-helper once from Terminal to trigger the macOS Calendar access prompt:
./cal-helper list-calendars
Grant access in the system dialog (or in System Settings > Privacy & Security > Calendars). Restart any app (VS Code, Claude Desktop, etc.) that will host the MCP server after granting access.
Configure your MCP client
Add this to your MCP client config (e.g. ~/.config/opencode/opencode.json or Claude Desktop's claude_desktop_config.json):
{
"mcp": {
"apple-calendar": {
"type": "local",
"command": ["node", "/absolute/path/to/mcp-apple-calendar/index.js"]
}
}
}
Tools
| Tool | Description |
|---|---|
check_calendar_access |
Verify EventKit can access Calendar. Run this if other tools fail. |
list_calendars |
List all calendars grouped by account (iCloud, Exchange, Google, etc.) with selection state. |
get_config |
Show configured default calendars and source labels. |
set_calendars |
Choose which calendars to query by default (full list, or add/remove). |
set_calendar_source |
Add a custom label to a calendar (e.g. "Work" → "iCloud"). |
get_today |
Return today's events sorted by start time. |
get_events |
Return events for a date range (YYYY-MM-DD). |
First-time setup
- Run
list_calendars-- calendars are grouped by account automatically (iCloud, Exchange, Google, etc.). - Run
set_calendarswith the names you want as defaults:
set_calendars(["Calendar", "Barrett"])
Your selection is saved to ~/.config/mcp-apple-calendar/config.json.
Troubleshooting
Calendar access denied error
Run ./cal-helper list-calendars from Terminal to trigger the macOS permission prompt. Grant access, then restart any app hosting the MCP server.
Events missing
Make sure the relevant calendar is checked in Calendar.app's sidebar (unchecking a calendar unloads its data from the local store). Also confirm the calendar name is in your configured defaults (get_config).
cal-helper not found
Compile it first: swiftc -O -o cal-helper cal-helper.swift from the project directory.
Files
| File | Purpose |
|---|---|
index.js |
MCP server entry point, tool definitions and handlers |
calendar.js |
EventKit helpers via cal-helper subprocess |
cal-helper.swift |
Swift CLI using EventKit -- compile to cal-helper binary |
cal-helper |
Compiled binary (not committed -- build locally) |
config.js |
Config read/write to ~/.config/mcp-apple-calendar/config.json |
test.js |
Smoke test -- run with node test.js |
License
MIT
A lightweight MCP server for Apple Calendar on macOS. Reads events from Calendar.app using osascript -- no extra permissions, no cloud APIs, no heavy dependencies.
Works with any MCP client: Claude Desktop, OpenCode, Cursor, Zed, or anything else that supports the MCP stdio transport.
Requirements
- macOS (tested on macOS 14+)
- Node.js 18+
- Calendar.app configured with your accounts
Install
git clone https://github.com/barrettclark/mcp-apple-calendar
cd mcp-apple-calendar
npm install
Configure your MCP client
Add this to your MCP client config (e.g. ~/.config/opencode/config.json or Claude Desktop's claude_desktop_config.json):
{
"mcp": {
"apple-calendar": {
"type": "local",
"command": "node",
"args": ["/absolute/path/to/mcp-apple-calendar/index.js"]
}
}
}
Tools
| Tool | Description |
|---|---|
check_calendar_access |
Verify Calendar.app is reachable and accounts are authenticated. Run this if other tools time out. |
list_calendars |
List all calendar names. Shows which ones are currently selected as defaults. |
get_config |
Show your currently configured default calendars. |
set_calendars |
Choose which calendars to query by default. Pass [] to reset. |
get_today |
Return today's events, sorted by start time. |
get_events |
Return events for a date range (YYYY-MM-DD). |
First-time setup
- Run
list_calendarsto see all available calendars. - Run
set_calendarswith the names you want:
set_calendars(["Calendar", "Work"])
Your selection is saved to ~/.config/mcp-apple-calendar/config.json. After that, get_today and get_events will use those calendars automatically.
To query a different calendar for a single call, pass calendars as an argument -- it overrides the default for that call only.
To reset to querying all calendars, run set_calendars([]).
Troubleshooting
Events not showing up / timeouts
Calendar.app may need to re-authenticate an account (common with Exchange accounts after a token rotation). Run check_calendar_access -- if it reports an error, open Calendar.app, go to Settings > Accounts, and re-authenticate the affected account.
Some calendars are slow
Exchange and iCloud calendars can take several seconds to respond. Configure set_calendars to include only the calendars you actually use -- this eliminates unnecessary queries to slow accounts.
Calendar source / account not shown
Apple Calendar's AppleScript API doesn't expose which account (iCloud, Exchange, Google) a calendar belongs to. If you have multiple calendars with the same name (e.g. three Birthdays calendars -- one per account), they're indistinguishable in list_calendars. A future enhancement would use a Swift/EventKit helper to expose account info; for now, use trial and error with get_today to figure out which same-named calendar holds the events you care about.
AppleScript can return stale recurring event instances for events outside the requested date range. This server filters them out in JavaScript after the AppleScript query. If you see events from the wrong date, file an issue.
Files
| File | Purpose |
|---|---|
index.js |
MCP server entry point, tool definitions and handlers |
calendar.js |
osascript helpers (checkAccess, listCalendars, getEvents, getEventsMulti) |
config.js |
Config read/write to ~/.config/mcp-apple-calendar/config.json |
test.js |
Smoke test -- run with node test.js |
License
MIT
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。