icloud-mcp
One-line summary: icloud-mcp is an MCP server that gives AI clients read/write access to your iCloud Mail, Contacts, Calendar, and Reminders over stdio or authenticated HTTP.
Mail reading & search: list accounts/mailboxes, inbox and mailbox summaries, top/unread senders, read/paginate, search by keyword, sender, domain, subject, date, size, unread/flagged, attachments; fetch full emails, raw RFC 2822, threads, attachments, unsubscribe headers, and storage reports.
Mail writing: compose, reply (and reply-all), forward, and save drafts via SMTP.
Bulk mail operations (all with
dryRun): bulk move, delete, flag, mark read/unread, delete/move by sender, delete by subject, move by domain, archive/delete older than, empty trash, and safe copy-verify-delete moves with a resumable manifest (get_move_status,abandon_move).Mailbox management: create, rename, and delete folders; single-email flag, mark read, delete, and move.
Automation & state: saved rules (create/list/run/delete, run all) plus digest state and a session log for long cleanups.
Contacts (CardDAV): list, search, get, create, update, and delete contacts.
Calendar (CalDAV): list/create/delete calendars, list/get/create/update/delete/search events, bulk create/update/delete events, multi-calendar listing, conflict detection, and optional read-only subscribed ICS/webcal feeds.
Reminders: list/create/rename/delete reminder lists and list/get/create/update/complete/delete reminders.
Email-to-calendar: extract suggested event details from an email for confirmation before creating an event.
Remote/hosted use: Streamable HTTP transport on loopback behind Cloudflare Tunnel/Access (JWT or service tokens), with
remote-safetool profile, send modes (off/drafts/self-only/on), rate limiting, audit logging, and prompt-injection guardrails.
Connects to Apple services to manage iCloud Mail accounts, enabling email reading, searching, and automated inbox organization through the use of Apple app-specific passwords.
Provides comprehensive tools for managing iCloud Mail, including reading and searching emails, sending and replying to messages via SMTP, performing bulk operations like move and delete, and managing mailbox folders.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@icloud-mcp Find all emails from Sarah about the project and summarize them"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
icloud-mcp
An MCP server for iCloud Mail, Calendar, Contacts and Reminders. Works with Claude, Grok Bot, and any MCP client.
Version 2.8.0 (86 tools).
Works with: Claude Desktop, Claude Code, Claude custom connectors (including phone), Grok Bot, and other MCP clients over stdio or Streamable HTTP. "Works with" describes compatibility only; this is an independent project and is not endorsed by or affiliated with Anthropic or xAI.
Pick your client
Client | How it connects | Start here |
Claude Desktop | Local, stdio | Install, then Claude Desktop |
Claude Code | Local, stdio | |
Claude custom connector / phone | Remote, Cloudflare Access sign-in (Managed OAuth) | Remote access, then step 3 of the Grok Bot guide |
Grok Bot | Remote, Cloudflare Access service token headers | |
Other MCP clients | stdio, or Streamable HTTP |
Local stdio setups run on your own machine. Remote setups run the server on a Mac you control, behind a tunnel and an access policy, so that machine must be awake and online.
Remote mode is drafts-only. Run remote setups with
ICLOUD_MCP_SEND_MODE=draftsandICLOUD_MCP_TOOL_PROFILE=remote-safeso connected clients can read and draft but cannot send mail. See Send mode and Tool profiles.
Related MCP server: macos-mail-mcp
Features
Read, search, and paginate any mailbox, including threads, attachments, and unsubscribe links
Send, reply, forward, and save drafts over SMTP
Bulk move, delete, flag, and mark-read, with a safe copy-verify-delete pipeline for moves
Saved rules, digest state, and a session log for long cleanups
Contacts over CardDAV, calendars over CalDAV (including bulk create/update/delete and conflict checks), and Reminders
dryRunon every delete, every move that removes the original, and every bulk operation. A dry run reports achangeslist of exactly what would be affected and does not modify anything
Prerequisites
Node.js 20 or newer
An MCP client, such as Claude Desktop, Claude Code, Grok Bot, or any client that supports stdio or Streamable HTTP
An iCloud account with an app-specific password
Install
Install from npm:
npm install -g icloud-mcpOr skip the install and let npx fetch it on demand (the configs below use this).
Confirm the server can reach iCloud:
IMAP_USER="you@icloud.com" IMAP_PASSWORD="your-app-specific-password" npx -y icloud-mcp --doctorClaude Desktop
{
"mcpServers": {
"icloud-mail": {
"command": "npx",
"args": ["-y", "icloud-mcp"],
"env": {
"IMAP_USER": "you@icloud.com",
"IMAP_PASSWORD": "your-app-specific-password"
}
}
}
}If Claude Desktop cannot find npx, use its full path (which npx). With a global install, "command": "icloud-mcp" and no args also works. Quit Claude Desktop completely and reopen it.
Claude Code
claude mcp add icloud-mail \
--scope user \
-e IMAP_USER=you@icloud.com \
-e IMAP_PASSWORD=your-app-specific-password \
-- npx -y icloud-mcpFrom source
git clone https://github.com/adamzaidi/icloud-mcp.git
cd icloud-mcp
npm installPoint the configs above at node /absolute/path/to/icloud-mcp/index.js instead of npx -y icloud-mcp. To run from a checkout, copy .mcp.json.example to .mcp.json (that file is gitignored) and export ICLOUD_EMAIL and ICLOUD_APP_PASSWORD in your shell.
Additional IMAP accounts use IMAP_ACCOUNT_N_USER, IMAP_ACCOUNT_N_PASSWORD, IMAP_ACCOUNT_N_HOST, IMAP_ACCOUNT_N_SMTP_HOST, and IMAP_ACCOUNT_N_NAME.
If IMAP_USER or IMAP_PASSWORD is unset, the server fills the missing value from the macOS Keychain via security find-generic-password. The service name defaults to icloud-mcp and can be changed with ICLOUD_MCP_KEYCHAIN_SERVICE. When both variables are already set, Keychain is not read. IMAP_PASS is used only when IMAP_PASSWORD is unset. The password is not written to the log. node mcp-call.mjs loads a .env file in the checkout when one exists, and keeps working from the process environment when it does not.
ICLOUD_MCP_REMINDER_LIST is the Reminders list name mentioned by the digest tools. The default is claude.
Local data
Rules, the move manifest, digest state, the session log, and the audit log are written outside the repository, in your home directory:
~/.icloud-mcp-rules.json~/.icloud-mcp-move-manifest.json~/.icloud-mcp-digest.json~/.icloud-mcp-session.json~/.icloud-mcp/audit.log~/.icloud-mcp/subscribed-calendars.json(only whenICLOUD_MCP_SUBSCRIBED_CALENDARS=on)
The audit log is append-only. The default file lives in ~/.icloud-mcp/, which this server creates mode 0700 when that directory is missing. A directory that already exists is not changed. If that directory is group or world writable, the server warns once and leaves it. The log file, including rotated copies, is mode 0600. Each line is one JSON object with a fixed set of fields: tool name, timestamp, status (ok or error), duration, and one integer count. That count is an array length, or a number taken from a fixed list of result fields such as total or wouldDelete. Keys on the result are never copied, so a sender address used as a key is not written. Arguments, error text, message bodies, and subjects are not written either. When the file reaches 1 MiB it is rotated through .1, .2, and .3. ICLOUD_MCP_AUDIT_LOG_MAX_BYTES changes that size. Set ICLOUD_MCP_AUDIT_LOG to move the file. Set ICLOUD_MCP_DATA_DIR to store the other local files somewhere else; the audit log then defaults to $ICLOUD_MCP_DATA_DIR/.icloud-mcp/audit.log. Do not point it at the git checkout. Contact exports, CRM notes, .env, and digest output belong outside the repo; .gitignore already excludes the usual local folders.
Available tools (86)
dryRun: true returns { dryRun: true, changes: [...] } plus the existing count fields (wouldDelete, wouldMove, and so on). Omitted or false performs the change.
Tool profiles
ICLOUD_MCP_TOOL_PROFILE defaults to full, which is the list below. remote-safe is an allowlist: only the read, search, draft, and calendar or reminder create and edit tools named in that list are exposed, including flag_email and mark_as_read. A tool that is not on the list is hidden, including tools added later. bulk_create_events and bulk_update_events are on the list, and in remote-safe they run as a dry run unless that tool name is listed in ICLOUD_MCP_ALLOW_BULK (comma-separated). A hidden tool still throws if something calls it.
Tool | Description | dryRun |
| List all configured email accounts (names and IMAP hosts). Use the account name in any mail tool's account parameter. | |
| Get a summary of a mailbox including total, unread, and recent email counts | |
| Get total, unread, and recent email counts for any specific mailbox/folder | |
| Get the top senders by email count from a sample of the inbox | |
| Get top senders of unread emails | |
| Get all emails from a specific sender | |
| Read emails from an inbox with pagination. Supports multiple accounts. | |
| Get full content of a specific email by UID | |
| Search emails by keyword or targeted field queries, with optional filters for date, read status, domain, and more | |
| Count how many emails match a set of filters without moving or deleting them. Use this before bulk_move or bulk_delete to preview how many emails will be affected. | |
| Move emails matching any combination of filters from one mailbox to another. Uses safe copy-verify-delete with fingerprint verification and a persistent manifest. Use dryRun: true to preview without making changes. | yes |
| Delete emails matching any combination of filters. Processes in chunks of 500 with per-chunk timeouts for reliability. Use dryRun: true to preview without making changes. | yes |
| Flag or unflag emails matching any combination of filters in bulk | yes |
| Delete all emails from a specific sender | yes |
| Move all emails from a specific sender to a folder | yes |
| Delete all emails matching a subject pattern | yes |
| Mark all emails as read, optionally filtered by sender | yes |
| Mark all emails as unread, optionally filtered by sender | yes |
| Delete all emails older than a certain number of days | yes |
| Get emails between two dates | |
| Flag or unflag a single email | |
| Mark a single email as read or unread | |
| Delete a single email | yes |
| Move a single email to a different mailbox/folder | yes |
| List all mailboxes/folders in iCloud Mail | |
| Create a new mailbox/folder | |
| Rename an existing mailbox/folder | |
| Delete a mailbox/folder. The folder must be empty first. | yes |
| Permanently delete all emails in the trash (Deleted Messages or Trash folder). Use dryRun: true to preview first. | yes |
| Check the status of the current or most recent bulk move operation. Shows progress, chunk statuses, and any failures. Call this to monitor a long-running move or inspect a failed one. | |
| Abandon an in-progress move operation so a new one can start. Only use if you are certain the operation should not be resumed. Emails already moved will not be returned to source. | |
| Write a step to the session log. Use this to record your plan before starting, and after each completed step. Helps maintain progress across long operations. | |
| Read the current session log to see what has been done so far. | |
| Clear the session log and start fresh. Use this at the start of a new task. | |
| List all attachments in an email without downloading them. Returns filename, MIME type, size, and IMAP part ID for each attachment. | |
| Download a specific attachment from an email. Returns the file content as base64-encoded data. Use list_attachments first to get the partId. Maximum 20 MB per request; use offset+length for larger files. | |
| Get the List-Unsubscribe header from an email, parsed into email and URL components. Useful for AI-assisted inbox cleanup. | |
| Mark all unread emails older than N days as read. Useful for bulk triage of a cluttered inbox. | yes |
| Move all emails from a specific domain to a folder. Convenience wrapper around bulk_move with a domain filter. | yes |
| Get the raw RFC 2822 source of an email (full headers + MIME body) as base64-encoded data. Useful for debugging or export. Capped at 1 MB. | |
| Flag or unflag all emails from a specific sender | yes |
| Safely move emails older than N days from a source mailbox to an archive folder. Uses the same safe copy-verify-delete pipeline as bulk_move. Use dryRun: true to preview. | yes |
| Estimate storage usage by size bucket and identify top senders by email size. Uses SEARCH LARGER queries for bucketing and samples large emails for sender analysis. | |
| Find all emails in the same thread as a given email. Uses subject matching + References/In-Reply-To header filtering. Note: iCloud does not support server-side threading — results are approximate. | |
| Create a saved rule that applies a specific action to emails matching a set of filters. Rules are stored persistently and can be run on demand or all at once with run_all_rules. | |
| List all saved rules with their filters, actions, and run history. | |
| Run a specific saved rule by name. Use dryRun: true to preview what would be affected without making changes. | yes |
| Delete a saved rule by name. | yes |
| Run all saved rules in sequence. Use dryRun: true to preview all rules without making changes. | yes |
| Compose and send a new email via iCloud SMTP. The From address is always your iCloud account. Supports plain text, HTML, or both (multipart/alternative). | |
| Reply to an existing email. Automatically sets correct threading headers (In-Reply-To, References) and prefixes the subject with Re:. Supports plain text and/or HTML body. | |
| Forward an existing email to one or more recipients. Fetches the original email body and includes it as a forwarded message block. Supports plain text and/or HTML note. | |
| Save a draft email to your iCloud Drafts folder without sending it. Supports plain text, HTML, or both. The draft can be edited and sent later from Mail.app or iCloud.com. | |
| Get the current inbox digest state — last run timestamp, processed email UIDs (to skip on next run), pending actions, and per-sender skip counts for smart unsubscribe. | |
| Update the digest state after a run. Merges new processed UIDs into the existing list, updates lastRun, replaces pendingActions, and accumulates per-sender skip counts. |
Contacts
Tool | Description | dryRun |
| List contacts from iCloud Contacts. Returns names, phones, emails, and other fields. | |
| Search iCloud Contacts by name, email address, or phone number. | |
| Get full details for a specific contact by ID. Use list_contacts or search_contacts to find a contactId. | |
| Create a new contact in iCloud Contacts. | |
| Update an existing contact in iCloud Contacts. Only provided fields are changed; others are preserved. | |
| Delete a contact from iCloud Contacts permanently. | yes |
Calendar
Tool | Description | dryRun |
| List all calendars in iCloud Calendar (e.g. Personal, Work, School). Returns calendarId, name, and supported event types. When ICLOUD_MCP_SUBSCRIBED_CALENDARS=on, configured read-only subscribed (ICS/webcal) calendars are included with readOnly:true and subscribed:true, and subscribedCalendars reports that setting. | |
| Create a new event calendar in iCloud Calendar. Fails if a calendar with that name already exists. | |
| Delete an iCloud event calendar by exact name or calendarId. The calendar must have no events (past or future); delete them first with bulk_delete_events. Will not delete Reminders lists. | yes |
| List events in a specific iCloud calendar within a date range. Use list_calendars first to get a calendarId. | |
| Get full details of a specific calendar event by its ID. | |
| Create a new event in an iCloud calendar. For all-day events use allDay:true and YYYY-MM-DD for start/end. | |
| Update an existing calendar event. Only provided fields are changed; others are preserved. | |
| Delete a calendar event permanently from iCloud Calendar. | yes |
| Search for events by title/summary across all calendars within an optional date range. | |
| Update multiple calendar events in one call. Each update object must include eventId and only the fields to change. | yes |
| List events from multiple calendars in one call. Returns events grouped by calendar ID. | |
| Create multiple calendar events in one call. Much more efficient than calling create_event repeatedly. Each event in the array uses the same fields as create_event. | yes |
| Delete multiple calendar events in one call. Much more efficient than calling delete_event repeatedly. | yes |
| Detect scheduling conflicts and tight gaps between events across multiple calendars. Compares all non-all-day events on the same date from different calendars. |
list_events and search_events return only events that overlap the requested since/before range. A recurring event is kept when iCloud reports one of its occurrences in that range, even though its listed start is the first occurrence.
Subscribed calendars
iCloud lists a subscribed calendar (an ICS or webcal:// feed added in Calendar.app) over CalDAV but returns no events for it, so the tools above miss everything on it. Set ICLOUD_MCP_SUBSCRIBED_CALENDARS=on to read those feeds from their source URL instead. The default is off, and when off nothing is read from disk or the network; list_calendars only gains a subscribedCalendars: { enabled, count } field. Any other value refuses to start.
Feeds are listed in ~/.icloud-mcp/subscribed-calendars.json (or ICLOUD_MCP_SUBSCRIBED_CALENDARS_FILE; with ICLOUD_MCP_DATA_DIR set the default is $ICLOUD_MCP_DATA_DIR/.icloud-mcp/subscribed-calendars.json). The file maps a display name to a URL. When it is missing and the feature is on, the server creates it empty, mode 0600, in a directory it creates mode 0700. The example below uses placeholders:
{
"Team Holidays": "https://calendar.example.com/feeds/holidays.ics",
"School": "webcal://school.example.com/calendar/term.ics",
"Club": "keychain:club-calendar"
}webcal:// is rewritten to https://. keychain:<account> reads the URL from the macOS Keychain item with that account name under the icloud-mcp service (or ICLOUD_MCP_KEYCHAIN_SERVICE), using the same security find-generic-password lookup as the password. Only https:// targets on port 443 are allowed, with no credentials in the URL; ICLOUD_MCP_SUBSCRIBED_CALENDARS_PORTS (comma-separated) permits other ports. Each calendar gets a stable id of subscribed- plus a slug of its name (for example subscribed-team-holidays); two names that slug the same are refused.
Do not give a subscription the same display name as an existing iCloud calendar. iCloud still lists its own copy of a subscribed calendar (with no events), so the same name would appear twice in list_calendars; delete_calendar by name then refuses as ambiguous, and create_calendar refuses the name as taken. Pick a distinct name, or address calendars by calendarId.
When on, list_calendars includes each feed with readOnly: true and subscribed: true, and list_events, get_event, list_events_multi, search_events, and detect_conflicts accept those ids. Events use the same fields as iCloud events plus readOnly: true, source: "subscribed", untrusted: true, and, on an expanded occurrence, recurrenceId. An occurrence id is <uid>_<recurrence stamp>. Recurrence rules (RRULE with DAILY, WEEKLY, MONTHLY, YEARLY, INTERVAL, COUNT, UNTIL, BYDAY, BYMONTHDAY, BYMONTH, BYSETPOS, WKST), RDATE, EXDATE, DURATION, and RECURRENCE-ID overrides are expanded locally. A rule without COUNT is evaluated from the query window, not from its first occurrence, so a daily event that started decades ago still returns this month's instances. TZID values are resolved as IANA names, including vendor-prefixed ids and X-LIC-LOCATION; an unknown id falls back to the feed's VTIMEZONE standard offset, then to floating time. create_event, update_event, delete_event, the bulk event tools, and delete_calendar refuse a subscribed calendar with a read-only error, including as a dry run, before any request is made.
Security notes:
Feed URLs are secrets. They frequently carry a private token. The URL never appears in tool output, errors, stderr, or the audit log; errors name the calendar instead. Keep the file private and do not paste its contents into chats or issues. If the file is readable by other users, the server warns once on stderr (without the path) and keeps going; run
chmod 600on it.Fetches are
https://only, on port 443 unlessICLOUD_MCP_SUBSCRIBED_CALENDARS_PORTSsays otherwise. Redirects are followed by hand (at most three) and every hop is checked again for scheme, port, embedded credentials, and address. The host is resolved first and the fetch is refused when any address is loopback, private, carrier-grade NAT, link-local (including the cloud metadata address), multicast, reserved, unique-local, Teredo, or an IPv4-mapped, SIIT, NAT64, or 6to4 form of one of those. A literal IP in the URL is checked the same way.Each fetch times out after 15 seconds and stops at 2 MB. The body must start with
BEGIN:VCALENDAR; theContent-Typeheader is not trusted either way. A feed with more than 2000VEVENTs is refused. Expanding one request is bounded too: at most 5000 occurrences, a fixed number of rule steps, and two seconds of wall-clock time; past any of these the call fails with a generic error instead of stalling the server. A parsed feed is cached in memory for five minutes.Event text from a feed (title, notes, location) is untrusted data, like message bodies, and every subscribed event carries
untrusted: true. Read it as data, not as instructions.There is no tool that turns this feature on or off at runtime. Such a tool would let injected text start outbound fetches from inside the
remote-safeprofile, so the setting is environment-only. No tool was added and nothing was added to theremote-safeallowlist; the read tools above are already on it and stay read-only.Known limitation: the address check happens after DNS resolution, but the fetch still connects by hostname, so a DNS answer that changes between the lookup and the connection (DNS rebinding) is not pinned. Only subscribe to feeds from hosts you trust.
Reminders
Tool | Description | dryRun |
| List all Reminders lists in iCloud Reminders (e.g. "Reminders", "Work", "Shopping"). Returns name, id, and count per list. | |
| Create a new Reminders list in iCloud Reminders. Fails if a list with that name already exists. | |
| Rename a Reminders list. The old name must match exactly one list, and the new name must not already be in use. | yes |
| Delete a Reminders list. The list must be empty first, and the name must match exactly one list. | yes |
| List reminders from iCloud Reminders. Omit listName to fetch from all lists. | |
| Get full details of a specific reminder by ID. | |
| Create a new reminder in iCloud Reminders. | |
| Update an existing reminder. Only provided fields are changed; others are preserved. | |
| Mark a reminder as completed in iCloud Reminders. | |
| Delete a reminder from iCloud Reminders permanently. | yes |
Listing reminders reads each property for the whole list in one batch. A list of zero or one reminder is coerced to an array before it is indexed. If Reminders.app stalls, the tool says the script timed out after 90 seconds instead of reporting an iCloud network timeout. A timed-out create, update, or delete may still have been applied.
Email to calendar
Tool | Description | dryRun |
| Fetch an email and return its content formatted for calendar event extraction. After calling this tool, extract the event fields from the returned content (pay attention to _dateAnchor for resolving relative dates like "Tuesday"), present a summary to the user for confirmation, then call create_event. No API key required. |
Filters
bulk_move, bulk_delete, bulk_flag, search_emails, count_emails, and rules accept any combination of: sender, domain, subject, before, since, unread, flagged, larger, smaller, hasAttachment, and account.
A domain filter searches both the bare domain and @domain. iCloud's FROM search misses some senders when given only the bare domain. Subdomains are not matched: a filter of example.com does not find mail from someone@mail.example.com. When a keyword and a domain are both set, search_emails keeps both conditions.
Safe move
bulk_move, bulk_move_by_sender, bulk_move_by_domain, and archive_older_than copy, verify fingerprints in the destination, then remove the source. get_move_status and abandon_move inspect or clear the manifest.
Connections
An idle iCloud IMAP connection times out after 60 seconds of silence. The server logs the error and that tool call fails. The process stays up. Saving a draft uses its own IMAP connection and attaches the same handler.
HTTP transport
Stdio is still the default. icloud-mcp --http (or node index.js --http) also serves the same tools over MCP Streamable HTTP. The process listens on 127.0.0.1 only. ICLOUD_MCP_HTTP_PORT chooses the port (default 8787).
HTTP mode refuses to start unless both of these are true:
Authentication is configured. Either set
CF_ACCESS_TEAM_DOMAIN,CF_ACCESS_AUD, andICLOUD_MCP_ALLOWED_EMAILSfor a Cloudflare Access JWT (Cf-Access-Jwt-Assertion, checked against the team JWKS), or setICLOUD_MCP_BEARER_TOKENfor a static bearer token used in local tests. When both are set, either one is accepted.ICLOUD_MCP_SEND_MODEisoff,drafts, orself-only. The defaultonis refused.ICLOUD_MCP_TOOL_PROFILEisremote-safe.fullis refused.
Host and Origin are checked before a request is handled, which blocks DNS rebinding. Loopback names (localhost, 127.0.0.1, ::1) are always allowed. A tunnel hostname belongs in ICLOUD_MCP_ALLOWED_HOSTS (comma-separated). A browser Origin must be a loopback origin for this port, or a value in ICLOUD_MCP_ALLOWED_ORIGINS, or http/https on an allowed host. A missing Origin header is allowed so non-browser clients can connect. The Origin value null is rejected. Authenticated requests are limited per identity (ICLOUD_MCP_RATE_LIMIT_PER_MINUTE, default 60). Requests with no credentials, and requests that fail authentication, have a separate limit of 10. That limit is per socket address. When the socket is loopback and Cloudflare Access is configured, the key is Cf-Connecting-Ip if the header is an IP address, so callers behind the tunnel do not share one bucket. Otherwise the header is ignored. An unknown or expired mcp-session-id is rejected with 404. A request with no session id that is not initialize is rejected with 400. Each session is tied to the identity that created it, dropped after 30 minutes idle, and new sessions stop once 100 are open. Logs record a reason code, not tokens or message contents.
IMAP_USER and IMAP_PASSWORD are still required to start. The send-mode values themselves are enforced by the SMTP layer when that gate is installed; this transport only refuses to listen while the mode is on.
Tests
npm test runs the offline suite only. It mocks IMAP, CardDAV, CalDAV, Reminders, and subscribed calendar feeds (the fetcher and DNS lookup are injected), and it does not contact iCloud, fetch any feed, or send mail.
npm run test:live runs the dummy-data suite in tests/live-destructive.test.js. It stays skipped unless ICLOUD_MCP_LIVE=1, IMAP_USER, and IMAP_PASSWORD are all set. It creates dummy contacts, reminders, calendar events, and messages appended into a temp folder, then deletes those dummies. It does not send mail. Set LIVE_CALENDAR to the calendar that should receive the dummy events. Calendar tests are skipped when that variable is unset. Delete tools run as a dry run first and skip the real delete unless that preview names exactly the dummies from this run.
npm run test:send runs tests/test.js. It stays skipped unless ICLOUD_MCP_SEND=1, IMAP_USER, and IMAP_PASSWORD are all set. Every message it sends goes only to the account in IMAP_USER. Reply, reply-all, and forward act on a seed that account just sent to itself, never on other inbox mail. Before each send, a guard checks every To, Cc, and Bcc recipient (case and surrounding whitespace ignored) and aborts the run if any address is anyone else.
dryRun: true on a delete, a move that removes the original, or a bulk change returns { dryRun: true, changes: [...] } and does not write. Omit it, or pass false, to perform the change.
Remote access
Stdio stays the default and is the right transport for a local client. A phone, Grok Bot, or a Claude custom connector should use the loopback HTTP listener behind Cloudflare Tunnel and Cloudflare Access. Do not expose port 8787 on the LAN or the public internet.
Cloudflare Tunnel and Access
Start
icloud-mcp --http(ornode index.js --http). The process binds to127.0.0.1only.ICLOUD_MCP_HTTP_PORTdefaults to8787.Create a Cloudflare Tunnel that routes one hostname to
http://127.0.0.1:8787.Put a Cloudflare Access application on that hostname and use Managed OAuth, so the connector signs in with an identity provider instead of a shared Mac password.
Set
CF_ACCESS_TEAM_DOMAINto the team domain (no scheme),CF_ACCESS_AUDto the application's AUD tag, andICLOUD_MCP_ALLOWED_EMAILSto the comma-separated addresses that may call the server.The tunnel forwards
Cf-Access-Jwt-Assertion. The server checks that JWT against the team JWKS athttps://<team-domain>/cdn-cgi/access/certs, then requires the token email to be on the allow list.Put the public hostname in
ICLOUD_MCP_ALLOWED_HOSTS. Loopback names are already allowed. This is the DNS-rebinding check.
A non-interactive client such as Grok Bot cannot sign in with an identity provider. Create an Access service token for it, add a policy with the Service Auth action that includes the token, and put the token's Client ID in ICLOUD_MCP_ALLOWED_SERVICE_TOKENS (comma-separated). A service token JWT has no email claim; its common_name claim is the Client ID. A JWT with no email is accepted only when common_name exactly matches an entry on that list. When the list is unset or empty, a JWT with no email is rejected, which is the previous behavior. Every other check still applies: signature, RS256, issuer, audience, exp, nbf, key rotation, Host and Origin, the remote-safe profile, and the send-mode gate. Service-token requests are rate limited by common_name. The Client Secret stays with the client; the server never sees or stores it. CF_ACCESS_TEAM_DOMAIN, CF_ACCESS_AUD, and ICLOUD_MCP_ALLOWED_EMAILS are still required to start.
ICLOUD_MCP_BEARER_TOKEN is a static bearer token for a local test client. It is not the remote credential. When Access and the bearer token are both set, either one is accepted.
HTTP mode refuses to start unless authentication is configured, ICLOUD_MCP_SEND_MODE is off, drafts, or self-only, and ICLOUD_MCP_TOOL_PROFILE is remote-safe. The default send mode on and the full profile are refused. A missing Origin header is allowed. The Origin value null, and any other Origin that is not on the allow list, are rejected. Authenticated requests are limited per identity. Requests that have no credentials use a separate limit of 10 per address, so an unauthenticated flood does not consume the caller's budget.
macOS LaunchAgent
Reminders uses JavaScript for Automation and needs a logged-in GUI session. Run the server as a LaunchAgent in ~/Library/LaunchAgents, not as a LaunchDaemon. A daemon starts outside that session and cannot talk to Reminders.
Store the app-specific password in the macOS Keychain (service icloud-mcp, or ICLOUD_MCP_KEYCHAIN_SERVICE) instead of in the plist. IMAP_PASS is only a fallback when IMAP_PASSWORD is unset. node mcp-call.mjs loads a .env file when one exists and otherwise uses the process environment.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.example.icloud-mcp</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/node</string>
<string>/Users/you/icloud-mcp/index.js</string>
<string>--http</string>
</array>
<key>EnvironmentVariables</key>
<dict>
<key>IMAP_USER</key>
<string>you@icloud.com</string>
<key>ICLOUD_MCP_SEND_MODE</key>
<string>drafts</string>
<key>ICLOUD_MCP_TOOL_PROFILE</key>
<string>remote-safe</string>
<key>CF_ACCESS_TEAM_DOMAIN</key>
<string>team.cloudflareaccess.com</string>
<key>CF_ACCESS_AUD</key>
<string>access-aud-tag</string>
<key>ICLOUD_MCP_ALLOWED_EMAILS</key>
<string>you@example.com</string>
<key>ICLOUD_MCP_ALLOWED_HOSTS</key>
<string>mail.example.com</string>
</dict>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
</dict>
</plist>Using icloud-mcp with Grok Bot (Mac host and phone)
This walks through hosting the server on an always-on Mac and connecting Grok Bot (and Claude) to it. Everything below uses placeholders: example.com, <TEAM_DOMAIN>, <AUD_TAG>, <CLIENT_ID>, <APPLE_ID>. Substitute your own values locally and never commit them.
Prerequisites
A Mac that stays on and logged in to a GUI session (see the LaunchAgent note above).
Node (see Prerequisites) and this repo checked out, with
npm installdone.cloudflared:brew install cloudflared.A Cloudflare account with a domain and Zero Trust enabled.
1. Tunnel
Create a remotely managed tunnel in Zero Trust (Networks, Tunnels). Add a public hostname such as icloud-mcp.example.com routed to http://127.0.0.1:8787, and keep the catch-all rule as http_status:404. Create a proxied CNAME for the hostname pointing at <tunnel-id>.cfargotunnel.com. Copy the tunnel token and treat it as a password.
2. Access application
Create a self-hosted Access application on that hostname. Add an Allow policy that includes only your email address, use one-time PIN login, and set the session duration to 24 hours. Copy the application's AUD tag; it is CF_ACCESS_AUD (<AUD_TAG>). Your team domain (<TEAM_DOMAIN>.cloudflareaccess.com) is CF_ACCESS_TEAM_DOMAIN.
3. Interactive clients (Claude)
Enable Managed OAuth on the Access application and add the client's callback URL to the allowed redirect URIs. For Claude that is https://claude.ai/api/mcp/auth_callback. In Claude, add a custom connector with the URL https://icloud-mcp.example.com/mcp and sign in with the one-time PIN.
4. Non-interactive clients (Grok Bot)
Grok Bot's own OAuth callback is not known, so it cannot be added to the allowed redirect URIs. Use an Access service token instead:
In Zero Trust, create a service token (Access, Service Auth). The Client Secret is shown once. Store it like a password.
Add a policy to the Access application with the action Service Auth that includes that token. An Allow policy for your email does not cover service tokens.
Set
ICLOUD_MCP_ALLOWED_SERVICE_TOKENS=<CLIENT_ID>on the server (see Cloudflare Tunnel and Access above).In Grok Bot, add a custom MCP server with the URL
https://icloud-mcp.example.com/mcpand two headers:CF-Access-Client-Id: <CLIENT_ID>andCF-Access-Client-Secret: <the secret>.
To revoke, delete the token in Zero Trust (or remove it from the Service Auth policy); requests with it fail at Cloudflare immediately. To rotate, create a new token, add it to the policy, update ICLOUD_MCP_ALLOWED_SERVICE_TOKENS and the Grok Bot headers, restart the server, then delete the old token.
5. Mac setup
Store the app-specific password in the Keychain. The command prompts for it, so it never lands in shell history or a file:
security add-generic-password -s icloud-mcp -a <APPLE_ID> -wSave the tunnel token to a file only you can read, then run two LaunchAgents in ~/Library/LaunchAgents. Never put the app-specific password in a plist.
mkdir -p ~/.icloud-mcp && chmod 700 ~/.icloud-mcp
# paste the tunnel token into this file, then:
chmod 600 ~/.icloud-mcp/tunnel-tokencom.example.cloudflared.plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.example.cloudflared</string>
<key>ProgramArguments</key>
<array>
<string>/opt/homebrew/bin/cloudflared</string>
<string>tunnel</string>
<string>run</string>
<string>--token-file</string>
<string>/Users/you/.icloud-mcp/tunnel-token</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
</dict>
</plist>com.example.icloud-mcp.plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.example.icloud-mcp</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/node</string>
<string>index.js</string>
<string>--http</string>
</array>
<key>WorkingDirectory</key>
<string>/Users/you/icloud-mcp</string>
<key>EnvironmentVariables</key>
<dict>
<key>IMAP_USER</key>
<string><APPLE_ID></string>
<key>ICLOUD_MCP_SEND_MODE</key>
<string>drafts</string>
<key>ICLOUD_MCP_TOOL_PROFILE</key>
<string>remote-safe</string>
<key>CF_ACCESS_TEAM_DOMAIN</key>
<string><TEAM_DOMAIN>.cloudflareaccess.com</string>
<key>CF_ACCESS_AUD</key>
<string><AUD_TAG></string>
<key>ICLOUD_MCP_ALLOWED_EMAILS</key>
<string>you@example.com</string>
<key>ICLOUD_MCP_ALLOWED_HOSTS</key>
<string>icloud-mcp.example.com</string>
<key>ICLOUD_MCP_ALLOWED_SERVICE_TOKENS</key>
<string><CLIENT_ID></string>
</dict>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
</dict>
</plist>Load each agent with launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/<file>.plist. To restart after a change, run launchctl bootout gui/$(id -u) ~/Library/LaunchAgents/<file>.plist, wait a few seconds, then bootstrap again.
6. Optional: subscribed calendars
To make subscribed (ICS) calendars readable through the same server, see Subscribed calendars under Calendar and add ICLOUD_MCP_SUBSCRIBED_CALENDARS=on to the server's environment.
7. Verify
An unauthenticated request returns 401:
curl -s -o /dev/null -w '%{http_code}\n' -X POST https://icloud-mcp.example.com/mcpAn
initializerequest with the two service-token headers returns 200:
curl -s -o /dev/null -w '%{http_code}\n' -X POST https://icloud-mcp.example.com/mcp \
-H 'CF-Access-Client-Id: <CLIENT_ID>' \
-H 'CF-Access-Client-Secret: <CLIENT_SECRET>' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"check","version":"0"}}}'Then ask Grok Bot to run
list_calendars.
Phone
The Grok Bot connector is saved on your Grok Bot account, not in one conversation, so it also works from the phone. The server runs on the Mac, so the Mac must be awake, online, and logged in. When it sleeps, tool calls fail until it wakes.
Security notes
Keep
ICLOUD_MCP_SEND_MODE=draftsandICLOUD_MCP_TOOL_PROFILE=remote-safe. Do not enable send mode remotely.Never expose port 8787 on the LAN or the public internet; only the tunnel should reach it.
Keep the tunnel token, service token secret, app-specific password, and subscription URLs out of the repo, issues, and chats.
This repo is public. Never commit plists,
.envfiles, or other config with real values.
Recommended environment
Use ICLOUD_MCP_SEND_MODE=off or drafts for a remote connector. off blocks compose_email, reply_to_email, and forward_email. drafts saves a draft instead of sending. self-only sends only when every To, Cc, and Bcc is the authenticated account. Unset means on, which is the local stdio default and is refused in HTTP mode.
Use ICLOUD_MCP_TOOL_PROFILE=remote-safe. That profile is an allowlist of read, search, draft, and calendar or reminder create and edit tools. A tool that is not on the list is hidden, including tools added later. Leave ICLOUD_MCP_ALLOW_BULK unset so any bulk tool that is on the list runs as a dry run.
Prompt injection
Message bodies, subjects, and addresses are untrusted data. A sender can put instructions in a message that a model may follow. Read tool output as data, not as a new task. Send mode off or drafts, plus the remote-safe profile, limits what those instructions can cause. They do not make the text trustworthy.
Environment variables
Variable | Default | Role |
|
|
|
|
|
|
| unset | Comma-separated tool names that may mutate in |
|
| Loopback port for |
| unset | Cloudflare Access team domain. Required for JWT auth. |
| unset | Access application AUD tag. |
| unset | Comma-separated emails allowed to present an Access JWT. |
| unset | Comma-separated Access service token Client IDs. An Access JWT with no email is accepted only when its |
| unset | Static bearer token for local HTTP tests. |
| loopback | Extra Host values, such as the tunnel hostname. |
| loopback | Extra browser Origin values. A missing Origin is allowed. The value |
|
| Per-identity limit after authentication. Unauthenticated requests use a separate limit of 10, keyed by the socket address, or by |
|
|
|
| unset | Copied to |
|
| Reminders list name used by the digest tools. |
|
| Audit file, mode |
|
| Rotate the audit file after it reaches this size. Three older files are kept. |
| home directory | Directory for rules, the move manifest, digest state, the session log, the audit log, and the subscribed calendars file. |
|
|
|
|
| JSON object of display name to |
| unset | Comma-separated extra ports a feed URL or redirect may use. Port 443 is always allowed. |
Security
Credentials stay in your local MCP client config. The server runs on your machine. Revoke an app-specific password at appleid.apple.com.
Send mode
ICLOUD_MCP_SEND_MODE controls SMTP sending. Leave it unset for local stdio: the default is on, and compose_email, reply_to_email, and forward_email send mail as before. The check lives in the SMTP functions, so those tools cannot skip it.
Value | Behavior |
| Send. This is the default. |
| Refuse every send with an error. Nothing is handed to SMTP. |
| Do not send. |
| Send only when every To, Cc, and Bcc mailbox is the authenticated account. Addresses are parsed with the same parser nodemailer uses, then those objects are what gets sent. Case is ignored. |
Any other value is an error and nothing is sent. Recipient groups, addresses that do not parse to a single mailbox, and a CR, LF, or other control character in a header field are refused in every mode. The refusal does not include the address. A subject copied from the original message has CR, LF, and tab runs collapsed to a space, and other controls removed, before that check. A subject the caller supplies is still refused when it contains a control character.
License
MIT
Available Tools
86 toolsabandon_moveA
Abandon an in-progress move operation so a new one can start. Only use if you are certain the operation should not be resumed. Emails already moved will not be returned to source.
Inputs: no named parameters.
archive_older_thanA
Safely move emails older than N days from a source mailbox to an archive folder. Uses the same safe copy-verify-delete pipeline as bulk_move. Use dryRun: true to preview.
Inputs: days (required), targetMailbox (required), dryRun, sourceMailbox.
bulk_create_eventsA
Create multiple calendar events in one call. Much more efficient than calling create_event repeatedly. Each event in the array uses the same fields as create_event.
Inputs: events (required), calendarId (required), dryRun.
bulk_deleteA
Delete emails matching any combination of filters. Processes in chunks of 500 with per-chunk timeouts for reliability. Use dryRun: true to preview without making changes.
Inputs: since, before, domain, dryRun, +9 more.
bulk_delete_by_senderC
Delete all emails from a specific sender
Inputs: sender (required), dryRun, mailbox.
bulk_delete_by_subjectC
Delete all emails matching a subject pattern
Inputs: subject (required), dryRun, mailbox.
bulk_delete_eventsB
Delete multiple calendar events in one call. Much more efficient than calling delete_event repeatedly.
Inputs: eventIds (required), calendarId (required), dryRun.
bulk_flagB
Flag or unflag emails matching any combination of filters in bulk
Inputs: flagged (required), since, before, domain, +9 more.
bulk_flag_by_senderB
Flag or unflag all emails from a specific sender
Inputs: sender (required), flagged (required), dryRun, mailbox.
bulk_mark_readB
Mark all emails as read, optionally filtered by sender
Inputs: dryRun, sender, mailbox.
bulk_mark_unreadB
Mark all emails as unread, optionally filtered by sender
Inputs: dryRun, sender, mailbox.
bulk_moveA
Move emails matching any combination of filters from one mailbox to another. Uses safe copy-verify-delete with fingerprint verification and a persistent manifest. Use dryRun: true to preview without making changes.
Inputs: targetMailbox (required), limit, since, before, +11 more.
bulk_move_by_domainA
Move all emails from a specific domain to a folder. Convenience wrapper around bulk_move with a domain filter.
Inputs: domain (required), targetMailbox (required), dryRun, sourceMailbox.
bulk_move_by_senderB
Move all emails from a specific sender to a folder
Inputs: sender (required), targetMailbox (required), dryRun, sourceMailbox.
bulk_update_eventsA
Update multiple calendar events in one call. Each update object must include eventId and only the fields to change.
Inputs: updates (required), calendarId (required), dryRun.
complete_reminderC
Mark a reminder as completed in iCloud Reminders.
Inputs: listName (required), reminderId (required).
compose_emailA
Compose and send a new email via iCloud SMTP. The From address is always your iCloud account. Supports plain text, HTML, or both (multipart/alternative).
Inputs: to (required), subject (required), cc, bcc, +3 more.
count_emailsA
Count how many emails match a set of filters without moving or deleting them. Use this before bulk_move or bulk_delete to preview how many emails will be affected.
Inputs: since, before, domain, larger, +8 more.
create_calendarA
Create a new event calendar in iCloud Calendar. Fails if a calendar with that name already exists.
Inputs: name (required).
create_contactC
Create a new contact in iCloud Contacts.
Inputs: org, url, note, email, +8 more.
create_eventA
Create a new event in an iCloud calendar. For all-day events use allDay:true and YYYY-MM-DD for start/end.
Inputs: start (required), summary (required), calendarId (required), end, +7 more.
create_mailboxC
Create a new mailbox/folder
Inputs: name (required).
create_reminderC
Create a new reminder in iCloud Reminders.
Inputs: title (required), listName (required), due, notes, +1 more.
create_reminder_listA
Create a new Reminders list in iCloud Reminders. Fails if a list with that name already exists.
Inputs: name (required).
create_ruleA
Create a saved rule that applies a specific action to emails matching a set of filters. Rules are stored persistently and can be run on demand or all at once with run_all_rules.
Inputs: name (required), action (required), filters (required), description.
delete_calendarA
Delete an iCloud event calendar by exact name or calendarId. The calendar must have no events (past or future); delete them first with bulk_delete_events. Will not delete Reminders lists.
Inputs: name, dryRun, calendarId.
delete_contactB
Delete a contact from iCloud Contacts permanently.
Inputs: contactId (required), dryRun.
delete_emailC
Delete a single email
Inputs: uid (required), dryRun, mailbox.
delete_eventB
Delete a calendar event permanently from iCloud Calendar.
Inputs: eventId (required), calendarId (required), dryRun.
delete_mailboxA
Delete a mailbox/folder. The folder must be empty first.
Inputs: name (required), dryRun.
delete_older_thanC
Delete all emails older than a certain number of days
Inputs: days (required), dryRun, mailbox.
delete_reminderB
Delete a reminder from iCloud Reminders permanently.
Inputs: listName (required), reminderId (required), dryRun.
delete_reminder_listA
Delete a Reminders list. The list must be empty first, and the name must match exactly one list.
Inputs: name (required), dryRun.
delete_ruleC
Delete a saved rule by name.
Inputs: name (required), dryRun.
detect_conflictsA
Detect scheduling conflicts and tight gaps between events across multiple calendars. Compares all non-all-day events on the same date from different calendars.
Inputs: calendarIds (required), since, before, minBuffer.
empty_trashA
Permanently delete all emails in the trash (Deleted Messages or Trash folder). Use dryRun: true to preview first.
Inputs: dryRun.
flag_emailA
Flag or unflag a single email
Inputs: uid (required), flagged (required), mailbox.
forward_emailB
Forward an existing email to one or more recipients. Fetches the original email body and includes it as a forwarded message block. Supports plain text and/or HTML note.
Inputs: to (required), uid (required), cc, html, +2 more.
get_attachmentA
Download a specific attachment from an email. Returns the file content as base64-encoded data. Use list_attachments first to get the partId. Maximum 20 MB per request; use offset+length for larger files.
Inputs: uid (required), partId (required), length, offset, +1 more.
get_contactA
Get full details for a specific contact by ID. Use list_contacts or search_contacts to find a contactId.
Inputs: contactId (required).
get_digest_stateA
Get the current inbox digest state — last run timestamp, processed email UIDs (to skip on next run), pending actions, and per-sender skip counts for smart unsubscribe.
Inputs: no named parameters.
get_emailB
Get full content of a specific email by UID
Inputs: uid (required), mailbox, maxChars, includeHeaders.
get_email_rawA
Get the raw RFC 2822 source of an email (full headers + MIME body) as base64-encoded data. Useful for debugging or export. Capped at 1 MB.
Inputs: uid (required), mailbox.
get_emails_by_date_rangeC
Get emails between two dates
Inputs: endDate (required), startDate (required), limit, mailbox.
get_emails_by_senderC
Get all emails from a specific sender
Inputs: sender (required), limit, mailbox.
get_eventA
Get full details of a specific calendar event by its ID.
Inputs: eventId (required), calendarId (required).
get_inbox_summaryC
Get a summary of a mailbox including total, unread, and recent email counts
Inputs: account, mailbox.
get_mailbox_summaryA
Get total, unread, and recent email counts for any specific mailbox/folder
Inputs: mailbox (required).
get_move_statusA
Check the status of the current or most recent bulk move operation. Shows progress, chunk statuses, and any failures. Call this to monitor a long-running move or inspect a failed one.
Inputs: no named parameters.
get_reminderC
Get full details of a specific reminder by ID.
Inputs: listName (required), reminderId (required).
get_storage_reportA
Estimate storage usage by size bucket and identify top senders by email size. Uses SEARCH LARGER queries for bucketing and samples large emails for sender analysis.
Inputs: mailbox, sampleSize.
get_threadA
Find all emails in the same thread as a given email. Uses subject matching + References/In-Reply-To header filtering. Note: iCloud does not support server-side threading — results are approximate.
Inputs: uid (required), mailbox.
get_top_sendersA
Get the top senders by email count from a sample of the inbox
Inputs: mailbox, maxResults, sampleSize.
get_unread_sendersC
Get top senders of unread emails
Inputs: mailbox, maxResults, sampleSize.
get_unsubscribe_infoA
Get the List-Unsubscribe header from an email, parsed into email and URL components. Useful for AI-assisted inbox cleanup.
Inputs: uid (required), mailbox.
list_accountsA
List all configured email accounts (names and IMAP hosts). Use the account name in any mail tool's account parameter.
Inputs: no named parameters.
list_attachmentsA
List all attachments in an email without downloading them. Returns filename, MIME type, size, and IMAP part ID for each attachment.
Inputs: uid (required), mailbox.
list_calendarsA
List all calendars in iCloud Calendar (e.g. Personal, Work, School). Returns calendarId, name, and supported event types. When ICLOUD_MCP_SUBSCRIBED_CALENDARS=on, configured read-only subscribed (ICS/webcal) calendars are included with readOnly:true and subscribed:true, and subscribedCalendars reports that setting.
Inputs: no named parameters.
list_contactsA
List contacts from iCloud Contacts. Returns names, phones, emails, and other fields.
Inputs: limit, offset.
list_eventsA
List events in a specific iCloud calendar within a date range. Use list_calendars first to get a calendarId.
Inputs: calendarId (required), limit, since, before.
list_events_multiA
List events from multiple calendars in one call. Returns events grouped by calendar ID.
Inputs: calendarIds (required), limit, since, before.
list_mailboxesA
List all mailboxes/folders in iCloud Mail
Inputs: no named parameters.
list_reminder_listsA
List all Reminders lists in iCloud Reminders (e.g. "Reminders", "Work", "Shopping"). Returns name, id, and count per list.
Inputs: no named parameters.
list_remindersB
List reminders from iCloud Reminders. Omit listName to fetch from all lists.
Inputs: limit, listName, includeCompleted.
list_rulesA
List all saved rules with their filters, actions, and run history.
Inputs: no named parameters.
log_clearA
Clear the session log and start fresh. Use this at the start of a new task.
Inputs: no named parameters.
log_readA
Read the current session log to see what has been done so far.
Inputs: no named parameters.
log_writeA
Write a step to the session log. Use this to record your plan before starting, and after each completed step. Helps maintain progress across long operations.
Inputs: step (required).
mark_as_readA
Mark a single email as read or unread
Inputs: uid (required), seen (required), mailbox.
mark_older_than_readB
Mark all unread emails older than N days as read. Useful for bulk triage of a cluttered inbox.
Inputs: days (required), dryRun, mailbox.
move_emailA
Move a single email to a different mailbox/folder
Inputs: uid (required), targetMailbox (required), dryRun, sourceMailbox.
read_inboxB
Read emails from an inbox with pagination. Supports multiple accounts.
Inputs: page, limit, account, mailbox, +1 more.
rename_mailboxC
Rename an existing mailbox/folder
Inputs: newName (required), oldName (required).
rename_reminder_listA
Rename a Reminders list. The old name must match exactly one list, and the new name must not already be in use.
Inputs: newName (required), oldName (required), dryRun.
reply_to_emailA
Reply to an existing email. Automatically sets correct threading headers (In-Reply-To, References) and prefixes the subject with Re:. Supports plain text and/or HTML body.
Inputs: uid (required), cc, body, html, +2 more.
run_all_rulesA
Run all saved rules in sequence. Use dryRun: true to preview all rules without making changes.
Inputs: dryRun.
run_ruleB
Run a specific saved rule by name. Use dryRun: true to preview what would be affected without making changes.
Inputs: name (required), dryRun.
save_draftA
Save a draft email to your iCloud Drafts folder without sending it. Supports plain text, HTML, or both. The draft can be edited and sent later from Mail.app or iCloud.com.
Inputs: to (required), subject (required), cc, bcc, +5 more.
search_contactsB
Search iCloud Contacts by name, email address, or phone number.
Inputs: query (required).
search_emailsB
Search emails by keyword or targeted field queries, with optional filters for date, read status, domain, and more
Inputs: limit, query, since, before, +15 more.
search_eventsA
Search for events by title/summary across all calendars within an optional date range.
Inputs: query (required), since, before.
suggest_event_from_emailA
Fetch an email and return its content formatted for calendar event extraction. After calling this tool, extract the event fields from the returned content (pay attention to _dateAnchor for resolving relative dates like "Tuesday"), present a summary to the user for confirmation, then call create_event. No API key required.
Inputs: uid (required), mailbox.
update_contactA
Update an existing contact in iCloud Contacts. Only provided fields are changed; others are preserved.
Inputs: contactId (required), org, url, note, +9 more.
update_digest_stateB
Update the digest state after a run. Merges new processed UIDs into the existing list, updates lastRun, replaces pendingActions, and accumulates per-sender skip counts.
Inputs: lastRun, skipCounts, processedUids, seenReminders, +2 more.
update_eventB
Update an existing calendar event. Only provided fields are changed; others are preserved.
Inputs: eventId (required), calendarId (required), end, start, +8 more.
update_reminderB
Update an existing reminder. Only provided fields are changed; others are preserved.
Inputs: listName (required), reminderId (required), due, notes, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 86 tools
Mail operations contain many overlapping bulk convenience tools: bulk_delete vs bulk_delete_by_sender vs bulk_delete_by_subject vs delete_older_than, and similarly bulk_move vs bulk_move_by_sender vs bulk_move_by_domain. Descriptions clarify the differences, but an agent still has multiple plausible choices for the same cleanup task.
Nearly all tools use consistent snake_case with verb-first naming (list_, get_, create_, update_, delete_, bulk_). Minor deviations exist, such as log_write/log_read/log_clear reversing the order and mark_older_than_read/delete_older_than not following a strict verb_noun pattern.
86 tools is an extreme count mismatch for a coherent MCP surface, even across mail, calendar, reminders, and contacts. Many tools are convenience wrappers around a smaller core set of operations.
The surface has strong lifecycle coverage across mail, calendar, reminders, contacts, rules, attachments, threading, digest state, and bulk operations. There are no major dead ends; minor omissions such as rule updates are workable via delete and recreate.
Maintenance
Related MCP Connectors
Read, search and manage iCloud Mail, Calendar and Contacts from Claude and other MCP clients.
Hosted MCP server for Gmail, Outlook, iCloud, Fastmail & Yahoo Mail with per-workspace controls.
Hosted email MCP for your own Gmail, Outlook.com, Microsoft 365, iCloud or IMAP inbox: read, search, draft, reply in thread, forward and file mail. It moves or flags up to 500 messages in one call, and a send leaves exactly one copy in Sent. A calendar is a separate connection, and connecting one adds diary and scheduling tools.
Hosted Mailchimp MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Related MCP Servers
- AlicenseAqualityCmaintenanceAn MCP server that enables Claude to directly access and manage email through IMAP. It provides tools for reading, searching, organizing, and drafting emails within your mailbox.9MIT
- AlicenseAqualityBmaintenanceAn MCP server for Apple Mail that enables Claude to read, search, manage, and compose emails via AppleScript.2024 npm1MIT
- AlicenseBqualityDmaintenanceMCP server that connects Claude to iCloud Mail, enabling reading, searching, sending, and organizing emails via IMAP/SMTP.14PolyForm Noncommercial 1.0.0
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server that enables Claude Desktop to interact with iCloud email accounts. This server provides full email functionality including reading, sending, and managing emails through your iCloud account.1-