Apple PIM: Calendar, Reminders, Contacts, Mail
PIM = Personal Information Manager.

GitHub: github.com/omarshahine/apple-pim
Native macOS integration for Calendar, Reminders, Contacts, and Mail using EventKit, Contacts, SQLite, and JXA frameworks. Works with Claude Code (via MCP) and OpenClaw (via native tool registration).
Features
- Calendar Management: List calendars, create/read/update/delete events, search by date/title, attendee support (add/replace attendees via CalDAV invitation emails), event availability including subscribed calendars. See Calendar store read path
- Reminder Management: List reminder lists, create/complete/update/delete reminders, search. Reads include sections, subtasks, tags, flags, rich links and attachments from the Reminders database; flags, subtasks, sections and tags can be written through opt-in, verified ReminderKit calls. See Reminders metadata
- Contact Management: List groups, create/read/update/delete contacts, search by name/email/phone, birthday support (with or without year)
- Mail Integration: List accounts/mailboxes, read/search/send/reply/move/delete messages, update flags, attachment support (metadata, save-to-disk, send/reply with attachments), verify sender authentication
- Fast Local Mail Reads: Read commands query Apple Mail's local Envelope Index (SQLite) directly — 10–200× faster than AppleScript automation, and they work even when Mail.app is closed. Automatic fallback to JXA when Full Disk Access isn't granted. See Direct SQLite read path
- Recurrence Rules: Create recurring events and reminders (daily, weekly, monthly, yearly)
- Batch Operations: Create multiple events or reminders in a single efficient transaction
- Per-Domain Control: Enable or disable entire domains (calendars, reminders, contacts, mail) independently
- Multi-Agent Isolation: Per-call config/profile overrides for workspace isolation
- Works with Claude Code and OpenClaw: Same Swift CLIs, different integration layers
Prerequisites
- macOS 13.0 or later
- Swift 5.9 or later (comes with Xcode 15+)
- Node.js 18+ for the MCP server; Node.js 22.13+ for the OpenClaw plugin (your OpenClaw host may require a newer version)
- Mail.app must be running for mail mutations, sends, and content search (it is not launched automatically). Mail reads use the local SQLite index and work with Mail.app closed.
Installation
Swift CLI Tools (Required for both platforms)
# Build the Swift CLIs
./setup.sh
# Optional: install to PATH for system-wide access
./setup.sh --install
# Add to your shell profile (if not already there)
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
The --install flag copies the binaries into ~/.local/bin/, so the
install keeps working even if you later move, rename, or clean this
checkout. After a rebuild, re-run ./setup.sh --install to refresh them.
Developing the CLIs themselves? ./setup.sh --install --link symlinks
instead, so every swift build -c release updates the installed commands
in place — at the cost that moving or renaming the repo breaks the links.
Verify any install with:
scripts/doctor.sh # add --fix to reap a stuck helper process
Claude Code Plugin
Inside Claude Code, run:
/plugin marketplace add omarshahine/apple-pim
/plugin install apple-pim@apple-pim
Then build the Swift CLIs (once, from a shell — the glob tolerates any
marketplace name and version):
bash ~/.claude/plugins/cache/*/apple-pim/*/setup.sh --install
Restart Claude Code to load the MCP server. The pim-assistant agent triggers automatically when you mention scheduling, reminders, contacts, or email.
OpenClaw Plugin
# Install from ClawHub
openclaw plugins install apple-pim-cli
# Or install from npm
npm install -g apple-pim-cli
Under the hood, the plugin spawns native macOS Swift binaries (calendar-cli, reminder-cli, contacts-cli, mail-cli) that interact with EventKit, Contacts, and Mail.app via Apple's frameworks.
Prerequisites: Swift CLIs must be on PATH (run ./setup.sh --install first).
Optionally, configure the binary location if the CLIs are not on PATH:
# In your OpenClaw config:
# plugins.entries.apple-pim-cli.config.binDir = "/path/to/swift/.build/release"
Post-Installation (both platforms)