icloud-mcp
activeMCP server for iCloud Mail (IMAP/SMTP) and Calendar (CalDAV) — local stdio or remote HTTP with an API key.
uv run icloud-mcp setupAn MCP server that gives AI assistants safe access to iCloud Mail (IMAP/SMTP) and iCloud Calendar (CalDAV) using an Apple app-specific password — no main Apple ID password exposure and no two-factor prompts.
It runs locally over stdio for desktop coding/chat clients, or as a hosted remote Streamable HTTP server protected by an API key (serve-http) for cloud agents.
Available Tools
| Calendar | |
|---|---|
icloud_list_mailboxes |
icloud_list_calendars |
icloud_search_messages |
icloud_list_events (recurring events expanded) |
icloud_get_message |
icloud_create_event |
icloud_create_draft |
icloud_update_event |
icloud_send_message |
icloud_delete_event |
icloud_move_messages (archive / trash) |
|
icloud_set_flags (read / flagged) |
Design & Safety Choices
- No hard deletes: Deleting mail moves messages to
Deleted Messagesrather than permanently expunging them. - Draft-only mode for remote agents: Setting
ICLOUD_ALLOW_SEND=falseremovesicloud_send_messagealtogether, mitigating prompt injection from untrusted inbound emails while still allowing agents to prepare drafts. - Keychain storage locally:
uv run icloud-mcp setupstores credentials viakeyring(macOS Keychain, Windows Credential Manager, or Linux Secret Service) without echoing or writing plaintext files. - Subscribed calendars supported safely: Read-only
webcalfeeds are fetched and cached for 15 minutes, exposing only the publisher host name so private feed tokens never leak into model context.
Quick Start
git clone https://github.com/mcdscot/icloud-mcp.git
cd icloud-mcp
uv run icloud-mcp setup
uv run icloud-mcp check
Add as a local stdio server in Claude Code:
claude mcp add --scope user icloud -- uv run --directory /path/to/icloud-mcp icloud-mcp
For remote hosting (for example on Fly.io), run icloud-mcp serve-http with MCP_API_KEY, ICLOUD_USERNAME, and ICLOUD_APP_PASSWORD configured as environment secrets.