Apple Mail, Calendar, Contacts, Reminders, Notes, Messages and Safari via AppleScript or iCloud
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
icloud-mcp covers seven Apple services with two interchangeable backends, and as far as we know it is the only MCP server that does. In local mode it drives the native macOS apps through AppleScript: no credentials, no network, and it reaches the services the iCloud protocols do not expose (Reminders, Notes, Messages, Safari). In cloud mode it speaks IMAP/SMTP, CalDAV and CardDAV instead, so it runs on any machine, not just a Mac. The set-mode tool switches between the two at runtime, without a restart.
The server exposes 41 tools across Email, Calendar, Contacts, Reminders, Notes, Messages and Safari. Each tool carries a typed schema, a human title and behavioural annotations, and every list-* tool returns machine-readable structuredContent alongside its text output. Local mode needs no passwords at all; macOS Automation permissions take their place.
The server speaks JSON-RPC over stdin/stdout only. It opens no ports and listens on no socket.
Credentials are never logged. ICLOUD_APP_PASSWORD is read once at startup and handed only to the IMAP/SMTP/CalDAV/CardDAV clients; diagnostics print a fixed mask, never the value. Where you keep the password is up to you: a .env file beside the module for a manual install, or the .mcpb bundle's sensitive field, which the host stores in the macOS Keychain. Local mode has no password anywhere, since macOS gates access per app through its own Automation prompts, and you can revoke those at any time.
Every tool argument is validated against a zod schema before the handler runs. Arguments are also coerced at each AppleScript interpolation site, so a value that is not a number cannot reach a script template.
The server collects nothing and keeps nothing: no telemetry, no analytics, no state on disk. The full policy is in PRIVACY.md.
Tools marked local only return an error in cloud mode, because the iCloud protocols do not expose those services.
mode (string, local or cloud)folder (string, optional), count (number, optional, max 50)uid (string), folder (string, optional)to, subject, body (strings); cc, bcc (strings, optional); isHtml (boolean, optional, cloud mode only)query, from, subject, folder (strings, optional), unreadOnly (boolean, optional), count (number, optional)uid (string), folder (string, optional), isRead (boolean, optional)count (number, optional, max 50), daysAhead (number, optional)summary, start, end (strings, ISO 8601); description, location (optional); calendarUrl (cloud) or calendarName (local)eventUrl (string); any of summary, start, end, description, location. Only the fields you pass changeeventUrl (string)count (number, optional, max 50)query (string), count (number, optional). Matches name, organisation, email and phone; phone matching ignores formattingcontactUrl (string)displayName, firstName, lastName, email, phone, organization, title, notes (all optional)contactUrl (string)accountId (string, optional) (local only)listName (string, optional), includeCompleted (boolean, optional), count (number, optional)name (string); body, dueDate, listName (optional); priority (number 0-9, optional)reminderId (string); any of name, body, dueDate, priorityreminderId (string), completed (boolean, optional)reminderId (string)query (string), count (number, optional)folderName (string, optional), count (number, optional)noteId (string)title (string), body (string, optional), folderName (string, optional)query (string), count (number, optional)Reading requires the imsg CLI and Full Disk Access.
limit (number, optional)chatId (number); limit (number, optional); start, end (ISO 8601, optional); attachments (boolean, optional)to (string), body (string), file (string, optional)chatId (number), type (love, like, dislike, laugh, emphasis, question)url (string), inNewWindow (boolean, optional)windowIndex (number, optional), tabIndex (number, optional)Every tool declares its behaviour explicitly instead of relying on the spec defaults, which are deliberately pessimistic. All list-*, read-*, search-* and get-* tools, plus about and check-auth-status, are marked read-only. The four destructive tools (delete-event, delete-contact, delete-reminder, close-safari-tab) carry destructiveHint. Tools that reach the network or another person carry openWorldHint: all Email and Calendar tools, send-message, react-message and open-safari-url. The read-only tools plus mark-as-read, complete-reminder, update-reminder, update-event and set-mode are marked idempotent.
Requires Node.js 20 or newer.
Add to claude_desktop_config.json:
For cloud mode, add credentials:
Use the badge at the top of this README, or add the same command/args pair to your MCP settings.
Download the .mcpb from Releases and open it to sideload. The bundle prompts for the mode and, for cloud mode, stores the app-specific password in the macOS Keychain rather than a file.
The first time a tool touches an app, macOS asks whether the calling program may control it. This happens once per app, not once per tool. Approve the prompt, or grant it later under System Settings β Privacy & Security β Automation.
If you dismissed a prompt, calls to that app fail with an authorisation error (osascript error -1743, "not authorized to send Apple events"). macOS will not ask again on its own. Re-enable the checkbox under Automation, or reset the decisions:
That clears Automation permissions for every app, so expect the prompts to return on next use.
list-chats and read-messages read the Messages database through the imsg CLI, which is gated by Full Disk Access, not Automation. Grant it to the program that launches the server (Claude Desktop, your terminal, or your editor) under System Settings β Privacy & Security β Full Disk Access. Without it, those tools report that Full Disk Access is required.
If imsg is installed somewhere unusual, point at it explicitly:
The server otherwise looks in ICLOUD_MCP_IMSG_PATH, IMSG_PATH, both Homebrew prefixes, and finally PATH.
Mail.app tools iterate messages through AppleScript, which is slow on very large mailboxes and can exceed the Apple Event timeout before returning. Narrow the request with folder and a smaller count, or use cloud mode, where IMAP does the filtering server-side. This is a property of the AppleScript bridge, not something the server can work around.
list-events in local mode suffers the same AppleScript wall. The date window is already filtered inside Calendar.app with a whose query, but on accounts with many calendars, especially subscribed ones carrying years of events (holidays, sports fixtures, travel feeds), the query can still exceed any reasonable timeout. list-calendars and the event write tools are not affected. Until the planned EventKit backend lands (see #10), use cloud mode for reading events: CalDAV filters server-side and is fast at any scale.
Cloud mode needs an app-specific password. Your normal Apple ID password will not work, and Apple only issues app-specific passwords on accounts with two-factor authentication turned on.
ICLOUD_APP_PASSWORD, together with ICLOUD_EMAIL.Revoke it from the same page if it is ever exposed.
Call about for the active mode and service list, and check-auth-status to confirm credentials are usable in the current mode.
imsg and Full Disk Access if you want to read messages| Variable | Default | Purpose |
|---|---|---|
USE_LOCAL_MODE | true | false selects cloud mode |
ICLOUD_EMAIL | (unset) | iCloud address, cloud mode only |
ICLOUD_APP_PASSWORD | (unset) | App-specific password, cloud mode only |
ICLOUD_MCP_IMSG_PATH | (unset) | Explicit path to the imsg binary |
Read from the environment, or from a .env file beside the module. See .env.example.
pnpm is the supported package manager; pnpm-lock.yaml is the committed lockfile.
The test suites stub osascript and the imsg CLI, so they touch no real mail, calendar or message data and run on any OS.
MIT. See LICENSE.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/icloud-mcp)<a href="https://allmcps.com/mcp/icloud-mcp"><img src="https://allmcps.com/api/badge/icloud-mcp?style=directory" alt="Icloud Mcp on AllMCPs" /></a>