mcp-icloud
Provides tools for managing iCloud Hide My Email addresses (create, list, label, update, deactivate/reactivate) and iCloud Mail (list mailboxes, search/read messages, download attachments, set flags, move/archive/trash, send/reply/forward, and save drafts).
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., "@mcp-icloud Create a Hide My Email address for signing up for a newsletter."
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.
Overview
mcp-icloud is an MCP server for iCloud Hide My Email and iCloud Mail. It works with AI agents such as Claude Code, Codex, Grok, Muse and Qwen. It runs on macOS and Linux.
Related MCP server: icloud-agent
What you can do
Create a new Hide My Email address when you sign up for a website
List your addresses, add labels and notes, and turn addresses off and on again
Search and read your mail
Save attachments as files
Organize mail: mark as read, flag, move, archive, move to Trash
Send, reply and forward
Save a draft without sending it
You need iCloud+ for Hide My Email.
Install with your AI agent
Copy this and send it to your agent:
Set up mcp-icloud by following these steps. Please reply to me in English.
https://raw.githubusercontent.com/ak1tnk/mcp-icloud/main/docs/agent-setup.mdThe agent installs it, registers it and checks it. You do this yourself:
When the agent asks, open a terminal and run
mcp-icloud login. Enter your Apple ID, password and 2FA code there. One login covers Hide My Email and Mail.Never paste a password or code into the chat. A good agent will not ask for one.
Optional: for a more stable mail connection, create an app-specific password at https://account.apple.com and run
mcp-icloud mail-login.
More prompts (everyday tasks, standing instructions): docs/prompts.md
Manual install
You need Python 3.11–3.13 and uv.
uv tool install git+https://github.com/ak1tnk/mcp-icloud
mcp-icloud login # Apple ID, password, 2FA code
mcp-icloud status # check the loginRegister the server. If your client can't find mcp-icloud, use the full path from
command -v mcp-icloud.
Claude Code:
claude mcp add icloud -- mcp-icloud serveOrca:
orca bot tools add "mcp-icloud serve" --bot <bot-name>Other MCP clients (JSON config):
{ "mcpServers": { "icloud": { "command": "mcp-icloud", "args": ["serve"] } } }
Configuration
All optional. Set them in the MCP server's environment.
Variable | Default | Meaning |
|
| Where the login is stored |
| from | Overrides the saved Apple ID |
|
|
|
| from | Your iCloud Mail address; the default From |
| from | App-specific password for IMAP/SMTP |
| — | Extra From addresses, comma-separated |
| no limit | Allowed recipients: addresses and |
|
| Attachment size limit |
Using it with Grok, Muse, Qwen and other agents
If your agent runs on another machine (a cloud computer or server), the login must be on that machine too. Two ways:
Log in there yourself (recommended): connect with SSH and run
mcp-icloud login.Copy the login folder from your computer: run
mcp-icloud loginon your computer, then copy~/.config/mcp-icloudto the same place on the agent's machine. Keep it private (chmod 700).
Risk: the login folder gives full access to your iCloud account (Mail, Drive, Photos, …), not only what this server does. Only put it on machines you trust.
To use Mail only, without the login folder: use an app-specific password there
(mcp-icloud mail-login, or MCP_ICLOUD_MAIL_USER and MCP_ICLOUD_MAIL_APP_PASSWORD).
Notes
Nothing is deleted permanently. "Trash" moves mail to the Trash folder.
Hide My Email addresses can't be deleted here, only turned off (and on again).
Sending is immediate, and by default an agent can send to anyone as you. To limit recipients, set
MCP_ICLOUD_SEND_ALLOWLIST.The default mail connection is experimental. It uses iCloud.com's private web API, which Apple can change. The IMAP connection (app-specific password) is more stable. On the default connection, a search can use only one text filter (sender, recipient, subject or text) at a time.
The login expires after a while (weeks to months). Then run
mcp-icloud loginagain. Accounts that use a hardware security key are not supported yet.Unofficial. Not affiliated with Apple.
Revoke access:
mcp-icloud logoutsigns out at Apple and deletes the login.mcp-icloud mail-logoutdeletes the stored app-specific password; also delete it at https://account.apple.com.Uninstall: run the two logout commands above, remove the server from your client (
claude mcp remove icloud), thenuv tool uninstall mcp-icloud.
Built on pyicloud and the MCP Python SDK. License: MIT.
Hide My Email:
hme_list,hme_generate(proposes an address),hme_reserve(saves it with a label and note),hme_update,hme_deactivate,hme_reactivateMail:
mail_list_mailboxes,mail_search,mail_read,mail_download_attachment,mail_set_flags,mail_move,mail_archive,mail_trash,mail_send,mail_reply,mail_forward,mail_save_draft
Available Tools
18 toolshme_deactivateB
Stop forwarding an address. The address can be reactivated later.
Inputs: anonymous_id (required). Returns: object
hme_generateB
Generate a candidate address. It is not saved until hme_reserve.
Inputs: no named parameters. Returns: object
hme_listB
List all active and inactive Hide My Email addresses.
Inputs: no named parameters. Returns: object
hme_reactivateC
Resume forwarding a previously deactivated address.
Inputs: anonymous_id (required). Returns: object
hme_reserveC
Save a generated Hide My Email address with a label and optional note.
Inputs: email (required), label (required), note. Returns: object
hme_updateA
Update an address's label or note, preserving fields that are omitted.
Inputs: anonymous_id (required), note, label. Returns: object
mail_archiveC
Move messages to the Archive mailbox.
Inputs: uids (required), mailbox (required). Returns: object
mail_download_attachmentC
Download an attachment to a new absolute file with private permissions.
Inputs: uid (required), path (required), index (required), mailbox (required). Returns: object
mail_forwardC
Forward a message immediately, optionally including its attachments.
Inputs: to (required), uid (required), mailbox (required), cc, +4 more. Returns: object
mail_list_mailboxesB
List mailboxes and their special uses.
Inputs: no named parameters. Returns: object
mail_moveC
Move messages to an existing mailbox.
Inputs: uids (required), mailbox (required), destination (required). Returns: object
mail_readB
Read a message and list its attachments. Optionally mark it read.
Inputs: uid (required), mailbox (required), mark_read, max_chars. Returns: object
mail_replyC
Send a reply immediately, optionally to all original recipients.
Inputs: uid (required), body (required), mailbox (required), reply_all, +2 more. Returns: object
mail_save_draftC
Save a message in Drafts without sending it.
Inputs: cc, to, bcc, body, +3 more. Returns: object
mail_searchC
Search mail and return the newest matching message headers.
Inputs: text, limit, since, before, +6 more. Returns: object
mail_sendC
Send a message immediately, with optional attachments.
Inputs: to (required), body (required), subject (required), cc, +3 more. Returns: object
mail_set_flagsC
Set or clear the read and flagged status of messages.
Inputs: uids (required), mailbox (required), seen, flagged. Returns: object
mail_trashC
Move messages to Trash without deleting them permanently.
Inputs: uids (required), mailbox (required). Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 18 tools
Most tools target distinct lifecycle operations: send/reply/forward/save_draft are clearly separated, and the hme_generate vs hme_reserve split is explicitly explained. The main friction is mail_move vs mail_archive vs mail_trash, since Archive and Trash are also 'existing mailboxes' an agent could move to, and mail_read's optional mark-as-read overlaps slightly with mail_set_flags.
A consistent prefix_verb(_object) convention holds throughout, with the mail_ and hme_ prefixes cleanly separating two sub-domains. Minor deviations exist where the object is implied (mail_archive, mail_trash, mail_forward) versus explicit (mail_download_attachment, mail_list_mailboxes), but the pattern stays readable.
18 tools across two real sub-domains (mail operations and Hide My Email address management) is somewhat heavy but each tool maps to a distinct, non-redundant action. Nothing looks like filler, so the set is only slightly over the ideal range.
Mail covers compose, reply, forward, draft save, read, search, mailbox listing, move/archive/trash, flags, and attachment download; Hide My Email covers list/generate/reserve/update/deactivate/reactivate as a full lifecycle. Gaps are minor: no permanent delete, no ability to send or edit an existing saved draft, and no draft listing.
Maintenance
Related MCP Connectors
Email for AI agents: read, search and send from your Gmail, Outlook, Yahoo, iCloud or IMAP inbox.
Connect Gmail, iCloud Mail, Outlook, Yahoo Mail, Fastmail and other IMAP inboxes to ChatGPT, Claude and compatible AI assistants. Find emails by meaning across languages with semantic search. Ask AI to find customer conversations, summarize deadlines and draft follow-ups. Give a sales rep access to a shared outreach inbox or bring email into a compatible CRM. Share an iCloud custom-domain inbox with teammates without their own Apple ID or iCloud+ plan. Search results may be incomplete or stale; separate permissions control mail actions.
Read, search and manage iCloud Mail, Calendar and Contacts from Claude and other MCP clients.
Email infrastructure for AI agents — send, receive, search, and reply to email over MCP.
Related MCP Servers
- FlicenseNot 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.-
- AlicenseAqualityBmaintenanceEnables local AI agents to search and read iCloud Mail, draft and send reviewed replies, and manage calendar events via a local MCP connection.191MIT
- AlicenseAqualityBmaintenanceEnables LLMs to read, search, file, and send iCloud Mail via IMAP and SMTP, with local-only credential handling and read-only tools by default.1134 PyPI1MIT
- AlicenseNot gradedqualityCmaintenanceEnables an AI assistant to search, read, flag, move, draft, and send email on an iCloud account over IMAP and SMTP, including attachments and threaded replies. Message content is treated as data, and sending can be gated or omitted for safer automation.MIT