mcpField
A
apple-contacts

apple-contacts

github.com/sundial-orgProductivity67074 installsUpdated 34w ago
Repository

About apple-contacts

apple-contacts provides AppleScript patterns for querying Contacts.app. It supports name and phone lookups and can return matching contacts' names, phone numbers, and email addresses.

Key features

  1. 01Search contacts by name
  2. 02Search by exact phone string
  3. 03Retrieve phone and email details

Use cases

  1. 01Find a contact by partial name
  2. 02Look up a contact using a stored phone number

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/sundial-org/awesome-openclaw-skills --skill apple-contacts

After installing, type/apple-contactsin Claude Code to confirm it loaded.

Details

From the project README

Apple Contacts

Query Contacts.app via AppleScript.

Quick Lookups

# By phone (name only)
osascript -e 'tell application "Contacts" to get name of every person whose value of phones contains "+1XXXXXXXXXX"'

# By name
osascript -e 'tell application "Contacts" to get name of every person whose name contains "John"'

# List all
osascript -e 'tell application "Contacts" to get name of every person'

Full Contact Info

⚠️ Don't use first person whose — buggy. Use this pattern:

# By phone
osascript -e 'tell application "Contacts"
  set matches to every person whose value of phones contains "+1XXXXXXXXXX"
  if length of matches > 0 then
    set p to item 1 of matches
    return {name of p, value of phones of p, value of emails of p}
  end if
end tell'

# By name
osascript -e 'tell application "Contacts"
  set matches to every person whose name contains "John"
  if length of matches > 0 then
    set p to item 1 of matches
    return {name of p, value of phones of p, value of emails of p}
  end if
end tell'

Phone Lookup

⚠️ Exact string match required — must match stored format exactly.

StoredSearchWorks?
+1XXXXXXXXXX+1XXXXXXXXXX✅
+1XXXXXXXXXXXXXXXXXXXX❌

Try with +1 prefix first. If fails, search by name instead.

Name Search

  • Case-insensitive
  • Partial match with contains
  • Exact match: use is instead of contains

Output

Returns comma-separated: name, phone1, [phone2...], email1, [email2...]

No match = empty output (not an error).

Comments

Markdown supported