# icloud-mcp [Health: Active]

**Category:** 🏢 Workplace & Productivity  
**Repository:** https://github.com/adamzaidi/icloud-mcp  
**GitHub Stars:** 0  
**npm Downloads (last month):** 848  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/icloud-mcp-4

## Description
MCP server for iCloud Mail, Calendar, Contacts, and Reminders. Works with Claude, Grok Bot, and any MCP client

## Tools
Capabilities this server exposes over MCP:

- **list_accounts** — List all configured email accounts (names and IMAP hosts). Use the account name in any mail tool's account parameter.
- **get_inbox_summary** — Get a summary of a mailbox including total, unread, and recent email counts
- **get_mailbox_summary** — Get total, unread, and recent email counts for any specific mailbox/folder
- **get_top_senders** — Get the top senders by email count from a sample of the inbox
- **get_unread_senders** — Get top senders of unread emails
- **get_emails_by_sender** — Get all emails from a specific sender
- **read_inbox** — Read emails from an inbox with pagination. Supports multiple accounts.
- **get_email** — Get full content of a specific email by UID
- **search_emails** — Search emails by keyword or targeted field queries, with optional filters for date, read status, domain, and more
- **count_emails** — 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.
- **bulk_move** — 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.
- **bulk_delete** — 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.
- **bulk_flag** — Flag or unflag emails matching any combination of filters in bulk
- **bulk_delete_by_sender** — Delete all emails from a specific sender
- **bulk_move_by_sender** — Move all emails from a specific sender to a folder
- **bulk_delete_by_subject** — Delete all emails matching a subject pattern
- **bulk_mark_read** — Mark all emails as read, optionally filtered by sender
- **bulk_mark_unread** — Mark all emails as unread, optionally filtered by sender
- **delete_older_than** — Delete all emails older than a certain number of days
- **get_emails_by_date_range** — Get emails between two dates
- **flag_email** — Flag or unflag a single email
- **mark_as_read** — Mark a single email as read or unread
- **delete_email** — Delete a single email
- **move_email** — Move a single email to a different mailbox/folder
- **list_mailboxes** — List all mailboxes/folders in iCloud Mail
- **create_mailbox** — Create a new mailbox/folder
- **rename_mailbox** — Rename an existing mailbox/folder
- **delete_mailbox** — Delete a mailbox/folder. The folder must be empty first.
- **empty_trash** — Permanently delete all emails in the trash (Deleted Messages or Trash folder). Use dryRun: true to preview first.
- **get_move_status** — 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_move** — 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.
- **log_write** — 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.
- **log_read** — Read the current session log to see what has been done so far.
- **log_clear** — Clear the session log and start fresh. Use this at the start of a new task.
- **list_attachments** — List all attachments in an email without downloading them. Returns filename, MIME type, size, and IMAP part ID for each attachment.
- **get_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_unsubscribe_info** — Get the List-Unsubscribe header from an email, parsed into email and URL components. Useful for AI-assisted inbox cleanup.
- **mark_older_than_read** — Mark all unread emails older than N days as read. Useful for bulk triage of a cluttered inbox.
- **bulk_move_by_domain** — Move all emails from a specific domain to a folder. Convenience wrapper around bulk_move with a domain filter.
- **get_email_raw** — 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.
- **bulk_flag_by_sender** — Flag or unflag all emails from a specific sender
- **archive_older_than** — 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.
- **get_storage_report** — 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.
- **get_thread** — 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_rule** — 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_rules** — List all saved rules with their filters, actions, and run history.
- **run_rule** — Run a specific saved rule by name. Use dryRun: true to preview what would be affected without making changes.
- **delete_rule** — Delete a saved rule by name.
- **run_all_rules** — Run all saved rules in sequence. Use dryRun: true to preview all rules without making changes.
- **compose_email** — 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_email** — 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_email** — 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_draft** — 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_digest_state** — 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_digest_state** — 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.
- **list_contacts** — List contacts from iCloud Contacts. Returns names, phones, emails, and other fields.
- **search_contacts** — Search iCloud Contacts by name, email address, or phone number.
- **get_contact** — Get full details for a specific contact by ID. Use list_contacts or search_contacts to find a contactId.
- **create_contact** — Create a new contact in iCloud Contacts.
- **update_contact** — Update an existing contact in iCloud Contacts. Only provided fields are changed; others are preserved.
- **delete_contact** — Delete a contact from iCloud Contacts permanently.
- **list_calendars** — 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_calendar** — Create a new event calendar in iCloud Calendar. Fails if a calendar with that name already exists.
- **delete_calendar** — 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.
- **list_events** — List events in a specific iCloud calendar within a date range. Use list_calendars first to get a calendarId.
- **get_event** — Get full details of a specific calendar event by its ID.
- **create_event** — Create a new event in an iCloud calendar. For all-day events use allDay:true and YYYY-MM-DD for start/end.
- **update_event** — Update an existing calendar event. Only provided fields are changed; others are preserved.
- **delete_event** — Delete a calendar event permanently from iCloud Calendar.
- **search_events** — Search for events by title/summary across all calendars within an optional date range.
- **bulk_update_events** — Update multiple calendar events in one call. Each update object must include eventId and only the fields to change.
- **list_events_multi** — List events from multiple calendars in one call. Returns events grouped by calendar ID.
- **bulk_create_events** — 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.
- **bulk_delete_events** — Delete multiple calendar events in one call. Much more efficient than calling delete_event repeatedly.
- **detect_conflicts** — 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_reminder_lists** — List all Reminders lists in iCloud Reminders (e.g. "Reminders", "Work", "Shopping"). Returns name, id, and count per list.
- **create_reminder_list** — Create a new Reminders list in iCloud Reminders. Fails if a list with that name already exists.
- **rename_reminder_list** — Rename a Reminders list. The old name must match exactly one list, and the new name must not already be in use.
- **delete_reminder_list** — Delete a Reminders list. The list must be empty first, and the name must match exactly one list.
- **list_reminders** — List reminders from iCloud Reminders. Omit listName to fetch from all lists.
- **get_reminder** — Get full details of a specific reminder by ID.
- **create_reminder** — Create a new reminder in iCloud Reminders.
- **update_reminder** — Update an existing reminder. Only provided fields are changed; others are preserved.
- **complete_reminder** — Mark a reminder as completed in iCloud Reminders.
- **delete_reminder** — Delete a reminder from iCloud Reminders permanently.
- **suggest_event_from_email** — 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.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "icloud-mcp": {
    "command": "npx",
    "args": ["-y","icloud-mcp"],
    "env": {
      "IMAP_USER": "",
      "IMAP_PASSWORD": ""
    }
  }
}
```

**Requires environment variables:** `IMAP_USER`, `IMAP_PASSWORD` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What icloud-mcp does

icloud-mcp exposes iCloud productivity data through the Model Context Protocol. Mail is the most extensively described area: agents can inspect accounts and folders, summarize inboxes, find messages by sender or date, search targeted fields, read complete messages, and count matching messages before changing them.

Mail organization tools handle individual and bulk operations. An agent can create, rename, or delete mailboxes, move or delete messages, change flags, mark messages read or unread, remove older mail, and empty the trash. Bulk filters can target senders, subject patterns, dates, read state, domains, and other search criteria. The server also supports Contacts through CardDAV, calendars through CalDAV, and Reminders.

## How it works

The server communicates with iCloud Mail over IMAP and uses SMTP for sending, replying, forwarding, and saving drafts. Contacts use CardDAV, and calendars use CalDAV. It can serve a local MCP client over stdio or run remotely over Streamable HTTP.

Bulk moves use a copy-verify-delete process with fingerprint checks and a persistent manifest. Long-running moves can be inspected with `get_move_status`, which reports progress, chunk states, and failures. Bulk deletion is processed in groups of up to 500 messages with per-chunk timeouts.

Operations that change or remove data support `dryRun: true` where applicable. A dry run returns a list of intended changes and counts without applying them. The server also maintains local rule, digest, session, move-manifest, and audit files in the user's home directory.

## Setup and configuration

Use Node.js 20 or newer and an iCloud account with an app-specific password. Install the package globally with `npm install -g icloud-mcp`, or let `npx -y icloud-mcp` fetch it when the MCP client starts. A diagnostic command can check connectivity before adding the server to a client configuration.

The standard credentials are `IMAP_USER` and `IMAP_PASSWORD`. If either is absent, the server can retrieve the missing value from the macOS Keychain; `ICLOUD_MCP_KEYCHAIN_SERVICE` changes the default Keychain service name, and `IMAP_PASS` is an alternate password variable when `IMAP_PASSWORD` is unset. Multiple accounts can be configured with numbered `IMAP_ACCOUNT_N_*` variables for IMAP and SMTP hosts, credentials, and account names.

`ICLOUD_MCP_REMINDER_LIST` selects the Reminders list used by digest tools. `ICLOUD_MCP_TOOL_PROFILE` defaults to `full`; setting it to `remote-safe` exposes a restricted set of read, search, draft, calendar, reminder, flag, and read-status tools. Remote deployments should use `ICLOUD_MCP_SEND_MODE=drafts` and the `remote-safe` profile so connected clients cannot send mail. Remote access requires the host Mac to remain awake and online.

## Tools and capabilities

- Inspect configured accounts, inbox statistics, sender rankings, unread senders, folders, and move progress.
- Read paginated inbox results or retrieve complete messages by UID.
- Search and count messages using keywords and filters such as date, sender, domain, and read status.
- Move, delete, flag, or mark messages individually or in bulk.
- Create, rename, delete, and empty iCloud Mail folders, with an empty-folder requirement for folder deletion.
- Work with iCloud Contacts, CalDAV calendars, and Reminders, including calendar bulk operations and conflict checks.

## Limitations and notes

An app-specific iCloud password is required. Remote mode is intended for drafts rather than sending mail when configured with the recommended restricted profile. Local state and audit data are written outside the repository; the audit log records tool metadata and counts rather than message bodies, subjects, arguments, or error text. The server is an independent project and is not affiliated with Anthropic or xAI.

_Full upstream README: https://allmcps.com/mcp/icloud-mcp-4/readme_

