Skip to main content
Glama
mcp-icloud
by ak1tnk

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.

→ Install with your AI agent

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.md

The 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 login

Register 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 serve

  • Orca: 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

MCP_ICLOUD_SESSION_DIR

$XDG_CONFIG_HOME/mcp-icloud, else ~/.config/mcp-icloud

Where the login is stored

MCP_ICLOUD_APPLE_ID

from mcp-icloud login

Overrides the saved Apple ID

MCP_ICLOUD_MAIL_BACKEND

auto

web, imap, or auto (IMAP if an app-specific password is set, else web)

MCP_ICLOUD_MAIL_USER

from mail-login; on web, your main iCloud address

Your iCloud Mail address; the default From

MCP_ICLOUD_MAIL_APP_PASSWORD

from mail-login

App-specific password for IMAP/SMTP

MCP_ICLOUD_MAIL_FROM_ALIASES

—

Extra From addresses, comma-separated

MCP_ICLOUD_SEND_ALLOWLIST

no limit

Allowed recipients: addresses and @domain, comma-separated

MCP_ICLOUD_MAIL_MAX_ATTACHMENT_MB

20

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:

  1. Log in there yourself (recommended): connect with SSH and run mcp-icloud login.

  2. Copy the login folder from your computer: run mcp-icloud login on your computer, then copy ~/.config/mcp-icloud to 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 login again. Accounts that use a hardware security key are not supported yet.

  • Unofficial. Not affiliated with Apple.

  • Revoke access: mcp-icloud logout signs out at Apple and deletes the login. mcp-icloud mail-logout deletes 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), then uv 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_reactivate

  • Mail: 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 tools
hme_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_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

    B3.2/5.0

    Scored across 18 tools

    Disambiguation4/5

    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.

    Naming Consistency4/5

    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.

    Tool Count4/5

    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.

    Completeness4/5

    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

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      B
      maintenance
      Exposes an iCloud Mail account through IMAP/SMTP as MCP tools, enabling Claude to read, search, sort, reply to, and archive email from a conversation.
      -
    • A
      license
      A
      quality
      B
      maintenance
      Enables local AI agents to search and read iCloud Mail, draft and send reviewed replies, and manage calendar events via a local MCP connection.
      19
      1
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables LLMs to read, search, file, and send iCloud Mail via IMAP and SMTP, with local-only credential handling and read-only tools by default.
      11
      34 PyPI
      1
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables 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