
Apple Contacts
io.github.mgcrea由 GitHub 账号 mgcrea 发布v1.37.1更新于 Nov 8, 2026
Search and read Apple Contacts — resolves numbers and emails to names, writes off by default
概览
读取 macOS 通讯录,让助手把电话号码和邮箱解析成姓名,并可搜索、列出联系人;写入默认关闭。
- 可以做什么
- 批量把最多 500 个电话号码和邮箱解析为姓名,歧义以状态返回而非猜测
- 搜索、列出并获取单个联系人
- 对通讯录存储和查找索引运行诊断
- 仅在显式开启写入时创建和更新联系人
- 适用场景
- 适合需要根据用户本机通讯录把电话号码或邮箱对应到姓名,或在本地查询、编辑联系人记录的场景。仅支持 macOS,读取的是机器上已有的通讯录。
- 运行要求
- 在 macOS 上通过 npx 以 npm 包形式本地运行。需要授予通讯录权限,首次使用会弹出授权对话框;写入还需授予对通讯录的自动化权限。可选环境变量用于配置写入开关、电话后缀长度、索引模式、存储路径和脚本超时。
安装
在 SourceWeft 中
- 打开 控制台中的 Apple Contacts,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
@mgcrea/mcp-apple-contacts
Model Context Protocol server for the macOS Apple Contacts address book.
Unofficial. Not affiliated with Apple. It reads the address book already on your Mac.
Why it exists: resolving handles
apple_contacts_resolve_handles turns phone numbers and email addresses into names, in batches of up
to 500. Everything else here is in service of that.
This is the surface where the file-lane rule is about capability, not speed. Contacts' scripting dictionary answers in ~65 ms — comfortably fast, and still useless for this: resolving a phone number means a suffix-keyed index over every stored number, and no quantity of Apple Events round trips produces one. So reads go through read-only SQLite, and there is no Apple Events read lane.
The lookup builds in 3 ms over 947 phone keys and 295 email keys, then is kept for the life of the process.
Permissions — this one is different
Contacts fails differently from every other surface in this family: it sits behind its own TCC service rather than behind Full Disk Access, and unlike Full Disk Access that permission prompts. So the fix is usually "answer the dialog", not "go to System Settings" — and nothing here asks you to hand over whole-disk access for an address book.
Tools
Read: diagnostics, resolve_handles, search_contacts, list_contacts, get_contact.
Write, registered only when APPLE_CONTACTS_ALLOW_WRITES=1 — with the flag off they are
invisible to the model, not merely refused: create_contact, update_contact.
resolveHandles() is also exported from the package root, for callers already inside Node that
would rather not go through MCP to reach it.
Configuration
Notes that will bite you
- The store is plural.
locate.tsreturns a list and every query fans out — on a real machine,stores=2/2, contacts=421, matching Apple Events exactly. A server reading only the first store silently loses an account. - Nine-digit suffix keys, and the length travels inside the lookup object so the index and the query cannot diverge. A self-join over a real address book at 7, 9 and 10 digits settles it: 7 and 9 collide identically (10 of 947 keys, 1.1%), and 10 drops a key while losing the national-to-E.164 join.
- Ambiguity is a status, never a guess —
resolved/unknown/ambiguous/shortcode.unknownis documented in the tool description as expected, not as an error. Z_ENTfilters toABCDContact. Without it, a list tool returns your groups as people.- A write can succeed and still not persist. Contacts holds changes in an unsaved buffer, so a mutation can read back correctly inside the same script and never reach the store. Every write script saves and then re-reads.
Licence
MIT.
来源:packages/contacts/README.md,提交 2398a54
工具
0版本历史
18- v1.37.0Nov 7, 2026
- v1.36.2Nov 4, 2026
- v1.36.1Nov 3, 2026
- v1.36.0Oct 30, 2026
- v1.35.0Oct 30, 2026
- v1.34.0Oct 29, 2026
- v1.31.0Oct 26, 2026
- v1.30.0Oct 22, 2026
- v1.29.1Oct 21, 2026
- v1.28.0Oct 13, 2026
- v1.27.0Oct 13, 2026
- v1.26.0Oct 6, 2026
- v1.25.0Oct 3, 2026
- v1.24.1Sep 29, 2026
- v1.24.0Sep 27, 2026
- v1.23.0Sep 19, 2026
- v1.22.1Sep 16, 2026
- v1.21.1Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分