Apple Calendar

io.github.mgcrea由 GitHub 账号 mgcrea 发布v1.37.1更新于 Nov 8, 2026

Search, read and act on Apple Calendar — ranges, free-time lookup, writes off by default

已验证STDIO仅桌面效率与工作流文件与存储

概览

AI 生成的概览

本地 macOS MCP 服务器,让助手搜索和读取 Apple 日历事件,创建、修改和删除默认关闭。

可以做什么
  • 列出账户与日历,并对本地日历数据库运行诊断
  • 按日期范围列出和搜索事件,并获取单个事件详情
  • 仅在显式开启写入后创建、修改和删除事件
  • 将读写限制在指定账户和日历,并设置默认日历、范围与时区
适用场景
适合让助手基于 Mac 上用户自己的 Apple 日历回答日程问题,例如查找空闲时间或汇总近期事件;若有意开启写入,也可管理事件。
运行要求
在 macOS 上通过 npx(Node.js)本地运行,读取日历应用的 SQLite 数据库,因此必须为启动服务器的程序(终端、IDE、助手应用)授予完全磁盘访问权限并重启。写入还需日历的自动化权限。通过环境变量配置,如 APPLE_CALENDAR_ALLOW_WRITES、APPLE_CALENDAR_ACCOUNTS 和 APPLE_CALENDAR_CALENDARS。
安装前请注意
写入默认关闭;用 APPLE_CALENDAR_ALLOW_WRITES 开启后会暴露通过 Apple Events 创建、修改和删除事件的工具,改动会写入真实日历并同步到账户。完全磁盘访问权限范围很广。账户与日历白名单同时约束读写,建议设置以缩小暴露面。该项目为非官方项目,与 Apple 无关联。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Apple Calendar,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

@mgcrea/mcp-apple-calendar

Model Context Protocol server for the macOS Apple Calendar app.

Unofficial. Not affiliated with Apple. It reads the Calendar store already on your Mac.

One lane for reads, one for writes

  • Index lane — read-only SQLite over Calendar.sqlitedb. Every read goes through it.
  • Apple Events lane — writes only. There is no jxa/read.ts in this package, and a test asserts there never will be.

This is the inverse of Notes. Notes shipped on Apple Events because search took 97 ms. Calendar cannot: a ±90-day range query over 1,349 events takes 3,355 ms over Apple Events, whose is worse and unstable, and every per-property bulk fetch costs ~1.8 s whichever property it is — so the cost cannot be amortised the way Notes amortises a bulk fetch. The store opens read-only in 1 ms. Calendar needs the file lane for speed, not capability.

It does not need EventKit, which is why the companion app stays a pure broker rather than linking a framework that would drag its own TCC prompt in.

PermissionNeeded forWithout it
Full Disk Accessall readsnothing works — there is no read fallback
Automation → Calendarwrites onlyreads are unaffected

Neither is granted to Calendar.app — it is the reader that needs permission. Grant Full Disk Access to whatever launches the server (Terminal, iTerm, VS Code, Claude), then restart it.

With writes off — the default — no Automation prompt appears at all. A read-only Calendar server needs exactly one permission.

Tools

Read: diagnostics, list_accounts, list_calendars, list_events, search_events, get_event.

Write, registered only when APPLE_CALENDAR_ALLOW_WRITES=1 — with the flag off they are invisible to the model, not merely refused: create_event, update_event, delete_events.

Configuration

VariableDefault
APPLE_CALENDAR_ALLOW_WRITESoffRegister the mutating tools.
APPLE_CALENDAR_ACCOUNTSallRead-side allowlist, comma-separated.
APPLE_CALENDAR_CALENDARSallRead-side allowlist, comma-separated.
APPLE_CALENDAR_DEFAULT_CALENDARCalendar'sCalendar a new event goes to when none named.
APPLE_CALENDAR_DEFAULT_RANGE_DAYS7An unbounded default would scan a decade.
APPLE_CALENDAR_MAX_RANGE_DAYS366Ceiling on a caller-supplied range.
APPLE_CALENDAR_DEFAULT_EVENT_DURATION_MINUTES60Used when a write names no end.
APPLE_CALENDAR_INCLUDE_DECLINEDoffInclude declined events in reads.
APPLE_CALENDAR_INCLUDE_CANCELLEDoffInclude cancelled events in reads.
APPLE_CALENDAR_TIMEZONEsystemOverride the zone ranges are resolved in.
APPLE_CALENDAR_INDEX_MODEautoauto | ro | immutable | off.
APPLE_CALENDAR_STOREautoExplicit Calendar.sqlitedb path.
APPLE_CALENDAR_OSASCRIPT_TIMEOUT_MS30000Sized for the first-run permission prompt.

Notes that will bite you

  • ~/Library/Calendars does not exist. The store is ~/Library/Group Containers/group.com.apple.calendar/Calendar.sqlitedb.
  • Recurrence lives in a cache table. A naive SELECT ... FROM CalendarItem over a date range misses expanded repeats; the range query unions items carrying no recurrence rule with everything in the cache. 456 of 489 cached parents carry no rule of their own.
  • Dates are seconds since 2001, not 1970 — CalendarItem.last_modified and orig_date both.
  • A floating time zone is not the system one. Anything matching GMT±HHMM is a real zone; treating the rest as floating is what stops a two-hour silent shift.
  • Writes always go through Apple Events, never the store, which the app holds open and syncs.

Licence

MIT.

来源:packages/calendar/README.md,提交 2398a54

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

17
  1. v1.37.0Nov 7, 2026
  2. v1.36.2Nov 4, 2026
  3. v1.36.1Nov 3, 2026
  4. v1.35.0Oct 30, 2026
  5. v1.34.0Oct 29, 2026
  6. v1.31.0Oct 26, 2026
  7. v1.30.0Oct 22, 2026
  8. v1.29.1Oct 21, 2026
  9. v1.28.0Oct 13, 2026
  10. v1.27.0Oct 13, 2026
  11. v1.26.0Oct 6, 2026
  12. v1.25.0Oct 3, 2026
  13. v1.24.1Sep 29, 2026
  14. v1.24.0Sep 27, 2026
  15. v1.23.0Sep 19, 2026
  16. v1.22.1Sep 16, 2026
  17. v1.21.1Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分