Apple Calendar · mgcrea — Claude Code MCP server: read and write events
Lets an agent work with the macOS calendar: search events, find free slots, create and edit entries. Writes stay off until you turn them on.
claude mcp add --env APPLE_CALENDAR_ALLOW_WRITES=<APPLE_CALENDAR_ALLOW_WRITES> --env APPLE_CALENDAR_CALENDARS=<APPLE_CALENDAR_CALENDARS> --env APPLE_CALENDAR_ACCOUNTS=<APPLE_CALENDAR_ACCOUNTS> --transport stdio calendar -- npx -y @mgcrea/mcp-apple-calendarWhat Apple Calendar does
The server reads the calendar store already present on your Mac and exposes accounts, calendars and events to the model. Queries run over a date range, and a separate tool answers free-time questions. Mutating tools appear only when APPLE_CALENDAR_ALLOW_WRITES=1 is set — with the flag off the model never sees them.
Reads and writes travel different paths. Every read goes through SQLite opened read-only; writes go through Apple Events. The process that launches the server — Terminal, iTerm, VS Code — needs Full Disk Access, because there is no fallback for reads. Automation → Calendar matters only for writes, so a read-only setup triggers no Automation prompt.
A few details trip people up. The store sits at ~/Library/Group Containers/group.com.apple.calendar/Calendar.sqlitedb, not under ~/Library/Calendars. Recurring events live in a cache table, so a plain range query misses expanded repeats. Timestamps count seconds from 2001, not 1970. The default range is 7 days and a caller-supplied range is capped at 366.
What it helps with
- find a free two-hour slot this week
- pull every meeting from last month
- add an event to a specific calendar
- check what moved after a reschedule
- clear out cancelled meetings in bulk
Example prompts for the agent
- Show my meetings for tomorrow
- Find two free hours on Thursday afternoon
- Create an event called Standup in the Work calendar at 15:00
How to install Apple Calendar
Platform CLI
claude mcp add --env APPLE_CALENDAR_ALLOW_WRITES=<APPLE_CALENDAR_ALLOW_WRITES> --env APPLE_CALENDAR_CALENDARS=<APPLE_CALENDAR_CALENDARS> --env APPLE_CALENDAR_ACCOUNTS=<APPLE_CALENDAR_ACCOUNTS> --transport stdio calendar -- npx -y @mgcrea/mcp-apple-calendarReplace <…> with your own values
Platform CLI
codex mcp add calendar --env APPLE_CALENDAR_ALLOW_WRITES=<APPLE_CALENDAR_ALLOW_WRITES> --env APPLE_CALENDAR_CALENDARS=<APPLE_CALENDAR_CALENDARS> --env APPLE_CALENDAR_ACCOUNTS=<APPLE_CALENDAR_ACCOUNTS> -- npx -y @mgcrea/mcp-apple-calendarReplace <…> with your own values
Config file
{
"mcpServers": {
"calendar": {
"command": "npx",
"args": [
"-y",
"@mgcrea/mcp-apple-calendar"
],
"env": {
"APPLE_CALENDAR_ALLOW_WRITES": "<APPLE_CALENDAR_ALLOW_WRITES>",
"APPLE_CALENDAR_CALENDARS": "<APPLE_CALENDAR_CALENDARS>",
"APPLE_CALENDAR_ACCOUNTS": "<APPLE_CALENDAR_ACCOUNTS>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"calendar": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@mgcrea/mcp-apple-calendar"
],
"env": {
"APPLE_CALENDAR_ALLOW_WRITES": "<APPLE_CALENDAR_ALLOW_WRITES>",
"APPLE_CALENDAR_CALENDARS": "<APPLE_CALENDAR_CALENDARS>",
"APPLE_CALENDAR_ACCOUNTS": "<APPLE_CALENDAR_ACCOUNTS>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e APPLE_CALENDAR_ALLOW_WRITES=<APPLE_CALENDAR_ALLOW_WRITES> -e APPLE_CALENDAR_CALENDARS=<APPLE_CALENDAR_CALENDARS> -e APPLE_CALENDAR_ACCOUNTS=<APPLE_CALENDAR_ACCOUNTS> calendar npx -y @mgcrea/mcp-apple-calendarReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Apple Calendar
How do I install Apple Calendar in Claude Code?
Run claude mcp add mcp-apple-calendar -- npx -y @mgcrea/mcp-apple-calendar. To pass environment variables, use the longer form: `claude mcp add --env APPLE_CALENDAR_ALLOW_WRITES=<APPLE_CALENDAR_ALLOW_WRITES> --env APPLE_CALENDAR_CALENDARS=<APPLE_CALENDAR_CALENDARS> --env APPLE_CALENDAR_ACCOUNTS=<APPLE_CALENDAR_ACCOUNTS> --transport stdio calendar -- npx -y @mgcrea/mcp-apple-calendar`.
What does Apple Calendar do?
It reads the macOS calendar and hands the agent accounts, calendars and events, with range search and free-time lookup. Turn writes on and it can also create, update and delete events.
Which permissions does it need?
Full Disk Access for whatever process starts the server, otherwise reads fail. Automation → Calendar is required for writes only.
Similar MCP servers
All MCP servers for Notes, tasks and projects →Apple Calendar by other authors comes first.