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

已驗證STDIO僅桌面效率與工作流溝通與協作

概覽

AI 產生的概覽

讀取 macOS 通訊錄,讓助理把電話號碼和電子郵件解析成姓名,並可搜尋、列出聯絡人;寫入預設關閉。

可以做什麼
  • 批次把最多 500 個電話號碼和電子郵件解析為姓名,歧義以狀態回報而非猜測
  • 搜尋、列出並取得單一聯絡人
  • 對通訊錄儲存區和查詢索引執行診斷
  • 僅在明確開啟寫入時建立和更新聯絡人
適用情境
適合需要依使用者本機通訊錄把電話號碼或電子郵件對應到姓名,或在本機查詢、編輯聯絡人資料的情境。僅支援 macOS,讀取的是機器上既有的通訊錄。
執行需求
在 macOS 上透過 npx 以 npm 套件形式在本機執行。需要授予「聯絡人」權限,首次使用會跳出授權對話框;寫入另需授予對「聯絡人」的自動化權限。選用環境變數可設定寫入開關、電話後綴長度、索引模式、儲存路徑和腳本逾時。
安裝前請注意
寫入工具會建立和更新聯絡人,僅在開啟寫入開關時才會註冊;關閉時模型看不到這些工具。寫入可能看似成功卻未實際保存,應重新核對結果。此伺服器為非官方專案,與 Apple 無關。它會讀取使用者的個人通訊錄資料。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Apple Contacts,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

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

PermissionNeeded forNotes
Contacts (its own)readsprompts — answer the dialog, and that's it
Automation → Contactswrites onlyreads are unaffected

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

VariableDefault
APPLE_CONTACTS_ALLOW_WRITESoffRegister the mutating tools.
APPLE_CONTACTS_PHONE_SUFFIX_DIGITS9Suffix key length; 6–15.
APPLE_CONTACTS_INDEX_MODEautoauto | ro | immutable | off.
APPLE_CONTACTS_STOREautoExplicit store path.
APPLE_CONTACTS_OSASCRIPT_TIMEOUT_MS30000Sized for the first-run permission prompt.

Notes that will bite you

  • The store is plural. locate.ts returns 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. unknown is documented in the tool description as expected, not as an error.
  • Z_ENT filters to ABCDContact. 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
SourceWeft 曾在隔離沙箱中以無憑證方式啟動該軟體包一次,以列出其工具,但未能完成:軟體包安裝失敗。

版本歷史

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

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分