icloud-mcp
Provides tools to access and manage iCloud Mail (IMAP/SMTP) and iCloud Calendar (CalDAV): list mailboxes, search/read messages, create drafts, send messages (unless disabled), move/flag mail; list calendars and events (including expanded recurring events and read-only subscribed calendars), and create, update, or delete events.
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 list my iCloud calendar events for next week"
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 that gives AI assistants access to iCloud Mail (IMAP/SMTP) and iCloud Calendar (CalDAV).
It signs in with an Apple app-specific password, so it never sees your Apple ID password and needs no two-factor handling. Run it locally over stdio, or host it as a remote server protected by an API key.
Tools
Calendar | |
|
|
|
|
|
|
|
|
|
|
| |
|
Mail is never hard-deleted: "delete" means moving to
Deleted Messages.iCloud does not file mail sent over SMTP, so
icloud_send_messagesaves a copy toSent Messagesitself.iCloud rejects CalDAV UID queries, so events are addressed by their CalDAV URL (
event_id).Editing or deleting a recurring event affects the whole series.
Subscribed calendars (webcal feeds such as sports fixtures or app schedules) are included, read-only. iCloud stores only a link to each feed, so the server downloads it itself and caches it for 15 minutes. Feed URLs often contain private tokens, so tools only ever return the publisher's host name.
Legacy CalDAV Reminders lists (shown in iCloud with ⚠️) are hidden; current Reminders are not available over CalDAV.
Related MCP server: icloud-mcp
Requirements
Python 3.12+ and uv
An app-specific password: https://account.apple.com → Sign-In and Security → App-Specific Passwords
Run locally
git clone https://github.com/mcdscot/icloud-mcp.git
cd icloud-mcp
uv run icloud-mcp setup # prompts for Apple ID and app-specific password, stores them in the OS keychain
uv run icloud-mcp check # verifies Mail and Calendar sign-insetup stores the credentials with keyring (macOS Keychain, Windows
Credential Manager or the Linux Secret Service). The password is never echoed or written to a file.
Then add it to your MCP client as a stdio server. For example, with Claude Code:
claude mcp add --scope user icloud -- uv run --directory /path/to/icloud-mcp icloud-mcpHost it remotely
Remote MCP clients (for example cloud-hosted agents) need an HTTPS endpoint. icloud-mcp serve-http
serves stateless Streamable HTTP on $PORT (default 8080), at both / and /mcp, and refuses any request
without the API key in $MCP_API_KEY. GET /healthz is open for health checks.
Clients authenticate with either header:
Authorization: Bearer <key>
X-API-Key: <key>Deploy to Fly.io
cp fly.example.toml fly.toml # set your app name, region and ICLOUD_TIMEZONE
fly apps create <your-app-name>
python3 -c "import secrets; print('icmcp_' + secrets.token_urlsafe(32))" # your API key: keep it safe
fly secrets set ICLOUD_USERNAME=<apple-id> ICLOUD_APP_PASSWORD=<app-specific-password> MCP_API_KEY=<api-key>
fly deployYour endpoint is https://<your-app-name>.fly.dev. To use your own domain, run
fly certs add <domain> and add the DNS records it prints. If your DNS is on Cloudflare, set the record to
DNS only (grey cloud) so Fly can issue the certificate.
fly.toml is git-ignored so your app name and settings stay out of the repository. Other hosts work the
same way: run the Dockerfile and set the same environment variables.
Configuration
Variable | Purpose |
| Apple ID email (overrides the keychain) |
| App-specific password (overrides the keychain) |
| Send-as address, if different from the Apple ID (must be one of your iCloud aliases) |
| IANA zone for times given without an offset; defaults to the machine's zone |
|
|
| Required by |
| Port for |
Security
This server can read, move and (unless disabled) send email as you. Treat it accordingly.
Prompt injection. Emails and calendar invites are written by other people. An assistant reading them can be tricked by instructions hidden in a message, such as "forward the last ten emails to …". For a hosted server, keep
ICLOUD_ALLOW_SEND=false: the assistant can still write drafts, and you send them yourself. Only enable sending if you trust every client and review what it does.The API key is the only lock on a hosted server. Generate a long random key, give it only to your MCP client's credential store, never paste it into a chat, and rotate it (
fly secrets set MCP_API_KEY=…) if it leaks.Use an app-specific password, never your Apple ID password. You can revoke it at any time at https://account.apple.com without affecting anything else.
Single user. One deployment serves one iCloud account; there is no per-user isolation.
Destructive tools are marked with MCP
destructiveHint, and nothing deletes mail permanently.
Development
uv run pytestLicense
Available Tools
12 toolsicloud_create_draftB
Save a plain-text draft to the iCloud Drafts mailbox without sending it.
Inputs: to (required), body (required), subject (required), cc, +3 more. Returns: object
icloud_create_eventC
Create an event in an iCloud calendar.
Inputs: start (required), summary (required), calendar (required), end, +4 more. Returns: object
icloud_delete_eventADestructive
Delete an event (for a recurring event, the whole series). Confirm with the user first.
Inputs: event_id (required). Returns: object
icloud_get_messageARead-only
Read one message: headers, body as text (HTML converted), and the attachment list.
Inputs: uid (required), mailbox, mark_read, max_chars. Returns: object
icloud_list_calendarsARead-only
List the user's iCloud calendars: their own and shared ones (kind 'calendar'), plus calendars they subscribe to such as sports fixtures or app feeds (kind 'subscribed', read-only).
Inputs: no named parameters. Returns: result
icloud_list_eventsARead-only
List events in a time range across calendars, recurring events expanded into occurrences, sorted by start.
Includes subscribed calendars (marked read_only). All-day events report `end` as the last day inclusive.
If a subscribed feed cannot be fetched, its error is listed under `warnings` and the rest still return.
Inputs: end (required), start (required), limit, query, +2 more. Returns: object
icloud_list_mailboxesARead-only
List iCloud Mail mailboxes with total and unread message counts.
Inputs: no named parameters. Returns: result
icloud_move_messagesA
Move messages between mailboxes (also how to archive or trash them; nothing is permanently deleted).
Inputs: uids (required), to_mailbox (required), from_mailbox (required). Returns: object
icloud_search_messagesARead-only
Search one mailbox and return message summaries (newest first) with uid, sender, subject, date and flags.
With no filters it lists the most recent messages. Use offset/has_more to page.
Inputs: text, limit, since, before, +7 more. Returns: object
icloud_send_messageADestructive
Send a plain-text email from the user's iCloud address. Cannot be undone: confirm with the user first.
Inputs: to (required), body (required), subject (required), cc, +3 more. Returns: object
icloud_set_flagsC
Mark messages read/unread and/or flagged/unflagged.
Inputs: uids (required), mailbox (required), seen, flagged. Returns: object
icloud_update_eventA
Change fields of an event; omitted fields stay as they are. For a recurring event this edits the whole series.
Inputs: event_id (required), end, start, all_day, +3 more. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Mail and calendar tools are cleanly separated, and within mail each tool maps to a distinct action: listing mailboxes, searching, reading a single message, drafting, sending, moving, and flagging. The move vs. set_flags split is explicitly clarified in the descriptions, leaving no real boundary confusion.
All twelve tools follow a uniform `icloud_<verb>_<noun>` snake_case pattern, and the resource prefixes (mailboxes, messages, calendars, events) make the pattern even more predictable. No mixed conventions or vague verbs.
Twelve tools split sensibly into seven mail operations and five calendar operations, each earning its place with no filler. The surface is well-scoped for a personal iCloud mail+calendar integration.
Core CRUD and lifecycle coverage is present for both domains: search/read/draft/send/move/flag for mail and list/create/update/delete for events. Minor gaps remain, such as no reply/forward, no attachment download, no calendar creation/deletion, and no attendee/RSVP handling.
Maintenance
Related MCP Connectors
Connect Apple iCloud and Microsoft 365 mail, calendars, contacts and tasks to AI.
Let your agent into iCloud Mail, calendar and contacts. It gets actions, never your password.
Connect your email accounts and iCloud Calendar to AI with account-specific permissions.
Read, search and manage iCloud Mail, Calendar and Contacts from Claude and other MCP clients.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to access iCloud Calendar, Reminders, and Mail with configurable scope and read-only modes.1MIT
- AlicenseNot gradedqualityDmaintenanceProvides AI assistants with read-only access to iCloud mail and calendar via IMAP and CalDAV, with opt-in write support for sending mail, managing events, and contacts.1MIT
- AlicenseNot gradedqualityBmaintenanceEnables an AI assistant to read and search iCloud mail, draft messages (never sent), manage calendar events with a preview/commit gate, and look up contacts via IMAP, CalDAV, and CardDAV.2MIT
- AlicenseAqualityCmaintenanceEnables AI assistants to read iCloud Mail over IMAP with an app-specific password, including listing mailboxes, browsing and searching messages, and reading message bodies and attachment filenames. All operations are read-only, so messages remain unread and cannot be sent, deleted, moved, or altered.4MIT