Bug Description
contacts_update consistently fails with a CoreData merge conflict error when updating any existing contact:
Error Domain=NSCocoaErrorDomain Code=134092 "(null)"
UserInfo={NSUnderlyingException=Unhandled error (NSCocoaErrorDomain, 134092)
occurred during faulting and was thrown}
This affects every contacts_update call, regardless of which fields are being updated (even updating just organizationName fails). contacts_create works fine for new contacts.
Root Cause
Error code 134092 is triggered when Apple's Contacts framework attempts to access a contact's notes field without the required entitlement. Since macOS Ventura, Apple requires apps to have:
com.apple.developer.contacts.notes
in their entitlements to read or write contacts that have a notes field (even a blank/nil one).
Looking at iMCP's entitlements files (App/App.entitlements and App/App.Debug.entitlements), this entitlement is not included.
When contacts_update fetches an existing contact to modify it, the framework faults in the notes property, triggering the error. New contacts created via contacts_create don't have notes, so they succeed.
Steps to Reproduce
- Have an existing contact in Apple Contacts (one that has ever had a notes field, or one synced via iCloud — most contacts qualify)
- Use
contacts_search to find the contact — works fine
- Use
contacts_update with the contact's identifier and any field change (e.g., organizationName)
- Error 134092 is thrown
Expected Behavior
contacts_update should successfully update the contact's fields.
Additional Issue: No Serialization for Rapid Operations
ContactsService executes each CNSaveRequest immediately with no queue serialization. When multiple contacts_create or contacts_update calls arrive in quick succession, concurrent CNContactStore.execute() calls also trigger error 134092.
Adding a serial dispatch queue or similar throttling mechanism would prevent this.
Environment
- macOS 15 (Sequoia)
- iMCP latest version (installed via App Store)
- Used via Claude Code MCP integration
References
Bug Description
contacts_updateconsistently fails with a CoreData merge conflict error when updating any existing contact:This affects every
contacts_updatecall, regardless of which fields are being updated (even updating justorganizationNamefails).contacts_createworks fine for new contacts.Root Cause
Error code 134092 is triggered when Apple's Contacts framework attempts to access a contact's notes field without the required entitlement. Since macOS Ventura, Apple requires apps to have:
in their entitlements to read or write contacts that have a notes field (even a blank/nil one).
Looking at iMCP's entitlements files (
App/App.entitlementsandApp/App.Debug.entitlements), this entitlement is not included.When
contacts_updatefetches an existing contact to modify it, the framework faults in the notes property, triggering the error. New contacts created viacontacts_createdon't have notes, so they succeed.Steps to Reproduce
contacts_searchto find the contact — works finecontacts_updatewith the contact's identifier and any field change (e.g.,organizationName)Expected Behavior
contacts_updateshould successfully update the contact's fields.Additional Issue: No Serialization for Rapid Operations
ContactsServiceexecutes eachCNSaveRequestimmediately with no queue serialization. When multiplecontacts_createorcontacts_updatecalls arrive in quick succession, concurrentCNContactStore.execute()calls also trigger error 134092.Adding a serial dispatch queue or similar throttling mechanism would prevent this.
Environment
References