iCloud MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
npm install -g icloud-mcp
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add -e "IMAP_USER=${IMAP_USER}" -e "IMAP_PASSWORD=${IMAP_PASSWORD}" icloud-mcp-0ce6 -- node "<FULL_PATH_TO_ICLOUD_MCP>/dist/index.js"

Replace <FULL_PATH_TO_ICLOUD_MCP>/dist/index.js with the actual folder you prepared in step 1.

Required:IMAP_USERIMAP_PASSWORD
README.md

Connect Claude to your iCloud Mail, Contacts, and Calendar

icloud-mcp

A Model Context Protocol (MCP) server that connects Claude to your iCloud account โ€” Mail, Contacts, and Calendar. Read, search, organize, send, and automate across the full iCloud suite.

Features

  • ๐Ÿ“ฌ Read and paginate through any mailbox
  • ๐Ÿ” Search emails by keyword, sender, subject, body, date range, and more
  • ๐Ÿงต Find email threads by References/In-Reply-To chain
  • โœ‰๏ธ Send emails, reply, forward, and save drafts via iCloud SMTP
  • ๐Ÿ“‹ Create saved rules to auto-route emails on demand
  • ๐Ÿ—‘๏ธ Bulk delete emails by any combination of filters
  • ๐Ÿ“ Bulk move emails between folders with safe copy-verify-delete
  • ๐Ÿ“ฆ Archive emails older than N days to any folder
  • ๐Ÿ“Š Analyze top senders and storage usage to identify inbox clutter
  • ๐Ÿ”ข Count emails matching any filter before taking action
  • โœ… Mark emails as read/unread, flag/unflag in bulk or individually
  • ๐Ÿ“Ž List and download email attachments (supports paginated byte-range fetching for large files)
  • ๐Ÿ”— Extract List-Unsubscribe links for AI-assisted cleanup
  • ๐Ÿ—‚๏ธ List, create, rename, and delete mailboxes
  • ๐Ÿ”„ Dry run mode for bulk operations โ€” preview before committing
  • ๐Ÿ” Safe move โ€” emails are fingerprinted and verified in the destination before removal from source
  • ๐Ÿ“ Session logging โ€” Claude tracks progress across long multi-step operations
  • ๐Ÿ‘ค Contacts โ€” list, search, create, update, and delete iCloud Contacts via CardDAV
  • ๐Ÿ“… Calendar โ€” list calendars, query events by date, create/update/delete events via CalDAV

Prerequisites

  • Claude Desktop or Claude Code
  • Node.js v20 or higher
  • An iCloud account with an app-specific password

Setup

1. Generate an Apple App-Specific Password

  1. Go to appleid.apple.com
  2. Sign in and navigate to Sign-In and Security โ†’ App-Specific Passwords
  3. Click + to generate a new password
  4. Label it something like Claude MCP and save the generated password

2. Install the package

npm install -g icloud-mcp

Then find the install location:

npm root -g

The path varies by setup:

Setup Typical path
Mac with Homebrew Node /opt/homebrew/lib/node_modules
Mac with system Node /usr/local/lib/node_modules
nvm ~/.nvm/versions/node/v20.x.x/lib/node_modules

3. Verify your setup

Before configuring Claude Desktop, run the doctor command to confirm everything is working:

IMAP_USER="you@icloud.com" IMAP_PASSWORD="your-app-specific-password" node $(npm root -g)/icloud-mcp/index.js --doctor

You should see:

icloud-mcp doctor
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
โœ… IMAP_USER is set
โœ… IMAP_PASSWORD is set
โœ… IMAP_USER looks like an email address
โœ… Connected to imap.mail.me.com:993
โœ… Authenticated as you@icloud.com
โœ… INBOX opened (12453 messages)
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
All checks passed. Ready to use with Claude Desktop.

If any step fails, a plain-English explanation and suggested fix will be shown.

4. Connect to Claude

Claude Desktop

Open your Claude Desktop config file:

open ~/Library/Application\ Support/Claude/claude_desktop_config.json

Add the following under mcpServers, replacing the path with your npm root from step 2:

{
  "mcpServers": {
    "icloud-mail": {
      "command": "node",
      "args": ["/opt/homebrew/lib/node_modules/icloud-mcp/index.js"],
      "env": {
        "IMAP_USER": "you@icloud.com",
        "IMAP_PASSWORD": "your-app-specific-password"
      }
    }
  }
}

Then fully quit Claude Desktop (Cmd+Q) and reopen it.

Claude Code

Run this command once to register the server for your user account (available across all projects):

claude mcp add icloud-mail \
  --scope user \
  -e IMAP_USER=you@icloud.com \
  -e IMAP_PASSWORD=your-app-specific-password \
  -- node $(npm root -g)/icloud-mcp/index.js

Or use npx to avoid needing a global install:

claude mcp add icloud-mail \
  --scope user \
  -e IMAP_USER=you@icloud.com \
  -e IMAP_PASSWORD=your-app-specific-password \
  -- npx -y icloud-mcp

Verify it registered correctly:

claude mcp list

Running from source? Copy .mcp.json.example to .mcp.json, set your credentials in your shell, then run claude from the repo directory. Claude Code will pick up the config automatically.

5. Add Custom Instructions (Recommended)

For large inbox operations, add the following to Claude Desktop's custom instructions to ensure Claude stays on track and checks in with you regularly. Go to Claude Desktop โ†’ Settings โ†’ Custom Instructions and add:

When using icloud-mail tools:
1. Before starting any multi-step operation, call log_clear then log_write with your full plan
2. After every single tool call, call log_write with what you

Tools (3)

mail_operationsRead, search, send, reply, forward, and organize emails
contact_operationsList, search, create, update, and delete iCloud Contacts
calendar_operationsList calendars and query, create, update, or delete events

Environment Variables

IMAP_USERrequiredYour iCloud email address
IMAP_PASSWORDrequiredYour iCloud app-specific password

Configuration

claude_desktop_config.json
{"mcpServers": {"icloud-mail": {"command": "node", "args": ["/opt/homebrew/lib/node_modules/icloud-mcp/index.js"], "env": {"IMAP_USER": "you@icloud.com", "IMAP_PASSWORD": "your-app-specific-password"}}}}

Try it

โ†’Find all emails from my bank in the last 30 days and move them to the 'Finance' folder.
โ†’Search for the email containing my flight confirmation and add the details to my calendar.
โ†’Archive all emails older than 90 days in my 'Newsletters' folder.
โ†’Create a new contact for John Doe with the phone number provided in my last email from him.
โ†’List my calendar events for tomorrow and summarize my schedule.

Frequently Asked Questions

What are the key features of iCloud MCP?

Read, search, and paginate through any iCloud mailbox. Send, reply, forward, and manage email drafts via SMTP. Bulk operations including delete, move, and mark as read/unread. Full contact management via CardDAV. Calendar event management via CalDAV.

What can I use iCloud MCP for?

Automating inbox cleanup by archiving old newsletters and bulk-deleting junk mail.. Syncing email-based travel or meeting information directly into your iCloud calendar.. Managing contacts by extracting information from email signatures and updating your address book.. Organizing complex email threads by moving related messages into specific project folders..

How do I install iCloud MCP?

Install iCloud MCP by running: npm install -g icloud-mcp

What MCP clients work with iCloud MCP?

iCloud MCP works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep iCloud MCP docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare