iCloud Mail MCP server
Provides tools to read, search, organize, and draft mail in an iCloud mailbox, including listing folders, retrieving messages and threads, handling attachments, marking messages, moving messages, and saving drafts.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
iCloud Mail MCP server
A local MCP server that lets Claude read, organise and draft mail in an iCloud mailbox. It runs on your Mac over stdio and exposes nothing to the network.
It cannot send mail and cannot permanently delete mail. Replies are saved to Drafts for you to send.
Tools
Tool | What it does |
| Folders with total and unread counts |
| Filter by sender, recipient, subject, text, dates, unread, flagged |
| One message: headers, body, attachment list |
| A whole conversation, oldest first, including your replies |
| Text and images inline; other types saved to disk on request |
| Read/unread, flag/unflag |
| Move to a folder, archive, junk or trash |
| Save a new message or a reply to Drafts |
Related MCP server: apple-mail-mcp
Setup
Build
npm install && npm run buildCreate an app-specific password. Sign in at account.apple.com as the iCloud account you want Claude to use, then Sign-In and Security → App-Specific Passwords. The account needs two-factor authentication.
Store it in the Keychain. Replace the address with the account's primary iCloud address. You are prompted for the password, so it never appears in shell history.
security add-generic-password -s icloud-mail-mcp -a you@icloud.com -wRegister with Claude Code. Use the absolute path to this folder.
claude mcp add icloud-mail --scope user --env ICLOUD_USER=you@icloud.com -- node /path/to/icloud-mail-mcp/dist/stdio.jsClaude Desktop: add this under
mcpServersin~/Library/Application Support/Claude/claude_desktop_config.json, then restart the app."icloud-mail": { "command": "node", "args": ["/path/to/icloud-mail-mcp/dist/stdio.js"], "env": { "ICLOUD_USER": "you@icloud.com" } }Install the skills (optional)
cp -R skills/inbox-triage skills/draft-reply ~/.claude/skills/
The first time the server reads the password, macOS may ask whether security can access the Keychain item. Choose Always Allow.
Options
Environment variables, all optional except ICLOUD_USER.
Variable | Default | Purpose |
| (required) | Primary iCloud address used to log in |
| same as user | Address drafts are written from (for an alias) |
| none | Display name on drafts |
|
| Set to |
|
| Where saved attachments go |
|
| Cap on body text returned per message |
Safeguards
No send, no permanent delete. The worst a hijacked instruction can do is move mail or save a draft.
Untrusted content is labelled. Every email body is wrapped in
<untrusted_email_content>so Claude can tell it from instructions.Sensitive-mail filter. Messages that look like sign-in codes, password resets or security alerts return headers only.
Audit log. Each tool call writes one line to stderr (tool, mailbox, uids), never message content.
Password stays in the Keychain. It is not read from the environment or any file.
Prompt injection cannot be ruled out. Avoid combining this server with tools that can send data elsewhere (web browsing, other connectors) in the same conversation.
Turning it off
Revoke the app-specific password at account.apple.com. Access stops immediately. To remove the local copy:
security delete-generic-password -s icloud-mail-mcp -a you@icloud.comDevelopment
npm testnpx @modelcontextprotocol/inspector -e ICLOUD_USER=you@icloud.com node dist/stdio.jssrc/tools.ts is independent of the transport, so a remote (HTTP) entry point can be added beside src/stdio.ts later.
What has been checked against iCloud
scripts/live-check.mjs (read-only) and scripts/draft-check.mjs (saves one test draft) run the built server against the real mailbox. Listing folders, searching, reading a message, thread lookup across Inbox and Sent, and saving a draft all work.
Not yet exercised live: mark_messages, move_messages and get_attachment.
Licence
MIT. See LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect any IMAP/SMTP mailbox to Claude & ChatGPT: search, read, sort, draft. Sends only with OK.
Bring Gmail, Outlook, iCloud Mail, Yahoo Mail, Fastmail and other IMAP mailboxes together. Search connected email, including semantic search; cached or indexed results may be incomplete or stale. Read messages and attachments, create drafts, send or reply when requested, and manage rules for new mail. Separate permissions control reading, attachments, drafts, sending and mailbox changes.
Connect any mailbox to Claude, ChatGPT & AI: read, send, reply, schedule & search emails.
Your mailboxes in ChatGPT and Claude: Gmail, iCloud, Fastmail, any IMAP. Passwords stay yours.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables Claude to control the macOS Mail app for reading, searching, drafting, sending, and managing emails directly from Claude Desktop.12MIT
- AlicenseAqualityCmaintenanceGives Claude (or any LLM) full control over Apple Mail — read, search, compose, reply, move, flag, and delete messages — via AppleScript on your local machine, with no cloud intermediary.222MIT
- AlicenseAqualityDmaintenanceA local MCP server that lets Claude read macOS Mail.app via JXA, with tools for listing accounts/mailboxes, searching and reading messages. Read-only by default, with optional opt-in write tools for compose drafts and Apple Calendar events.7MIT
- AlicenseNot gradedqualityBmaintenanceExposes an iCloud Mail account through IMAP/SMTP as MCP tools, enabling Claude to read, search, sort, reply to, and archive email from a conversation.33 npmMIT