Skip to main content
Glama
mcp-icloud-mail

mcp-icloud-mail

by spa77k

日本語 | English | 简体中文 | 한국어

mcp-icloud-mail

iCloud メールを Claude などの AI から読むだけの MCP サーバーです。IMAP とアプリ用パスワードで接続します。

A read-only MCP server for iCloud Mail over IMAP, using an app-specific password.

できること

ツール

内容

list_mailboxes

フォルダの一覧と、件数・未読数

list_messages

フォルダの新しいメールの一覧(件名・差出人・日時)

search_messages

差出人・宛先・件名・本文・期間・未読で検索

get_message

1通の本文(テキスト)と添付ファイル名を読む

  • 送信・削除・移動・既読にする操作はありません。フォルダは読み取り専用で開くので、読んでも未読のままです。

  • 添付ファイルの中身は取り出しません(ファイル名・種類・サイズだけ)。

Related MCP server: iCloud MCP

準備

  1. Apple アカウントで 2 ファクタ認証をオンにする。

  2. account.apple.com にサインインし、「サインインとセキュリティ」→「App 用パスワード」でパスワードを作る(xxxx-xxxx-xxxx-xxxx の形)。

  3. Node.js 20 以上を入れる。

インストール

このパッケージは npm に未公開のため、GitHub から clone してビルドします。

git clone https://github.com/spa77k/mcp-icloud-mail.git
cd mcp-icloud-mail
npm ci
npm run build

ビルドすると dist/index.js ができます。設定ではこのファイルを絶対パスで指定します。

設定

以下の /path/to/mcp-icloud-mail は clone したディレクトリの絶対パス(pwd で確認できます)に置き換えてください。環境変数はプレースホルダのままにせず、自分の値に置き換えます。

Claude Code

claude mcp add icloud-mail -e ICLOUD_EMAIL=you@icloud.com -e ICLOUD_APP_PASSWORD=xxxx-xxxx-xxxx-xxxx -- node /path/to/mcp-icloud-mail/dist/index.js

Claude Desktop など(JSON で設定するクライアント)

{
  "mcpServers": {
    "icloud-mail": {
      "command": "node",
      "args": ["/path/to/mcp-icloud-mail/dist/index.js"],
      "env": {
        "ICLOUD_EMAIL": "you@icloud.com",
        "ICLOUD_APP_PASSWORD": "xxxx-xxxx-xxxx-xxxx"
      }
    }
  }
}

環境変数

内容

ICLOUD_EMAIL

iCloud メールアドレス(@icloud.com / @me.com / @mac.com)

ICLOUD_APP_PASSWORD

準備で作った App 用パスワード

使い方の例

  • 「今日届いた未読メールを要約して」

  • 「Amazon からの先月のメールを探して」

  • 「受信箱の最新10件を一覧にして」

注意

  • App 用パスワードは iCloud メール・連絡先・カレンダーなどにアクセスできます。設定ファイルを人に見せたり、リポジトリに入れたりしないでください。漏れたら account.apple.com でそのパスワードを取り消してください。

  • メール本文はそのまま AI に渡ります。知らない人からのメールに「〇〇を実行して」などの指示が書かれていても、AI がそれに従わないよう、ほかのツール(送信やファイル操作など)と組み合わせるときは操作の確認をオンにしておいてください。

  • Apple アカウントのパスワードを変えると、App 用パスワードはすべて無効になります。作り直して設定し直してください。

開発

npm ci
npm run build
ICLOUD_EMAIL=you@icloud.com ICLOUD_APP_PASSWORD=xxxx-xxxx-xxxx-xxxx npx @modelcontextprotocol/inspector node dist/index.js

License

MIT

Available Tools

4 tools
get_messageA
Read-only

Read one message by UID: headers, plain-text body and attachment list. Does not mark it as read.

Inputs: uid (required), mailbox, maxChars.

list_mailboxesA
Read-only

List all iCloud Mail mailboxes (folders) with message and unread counts.

Inputs: no named parameters.

list_messagesA
Read-only

List the most recent messages in a mailbox (newest first). Returns headers only.

Inputs: limit, mailbox.

search_messagesA
Read-only

Search messages in a mailbox. All conditions are combined with AND. Returns headers only, newest first.

Inputs: to, from, text, limit, +5 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool targets a distinct resource and action: list_mailboxes enumerates folders, list_messages lists a mailbox's headers, search_messages queries within a mailbox, and get_message fetches a single message by UID. Boundaries between list_messages and search_messages are clear since one is unfiltered listing and the other is a conditional search.

    Naming Consistency5/5

    All four tools follow a strict verb_noun snake_case pattern: list_mailboxes, list_messages, search_messages, get_message. The verb choice is also semantically precise (list vs. search vs. get).

    Tool Count4/5

    Four tools is a lean but coherent set for a read-only mail client, covering folder listing, message listing, search, and retrieval. It sits slightly under the ideal scope, but nothing is redundant or missing for the read path.

    Completeness3/5

    The surface is read-only: there is no send/compose, delete, move, or flag (mark read/unread) operation, which are core mail lifecycle actions. Reading is well covered (mailboxes, list, search, fetch by UID), but agents cannot act on messages beyond inspection.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides AI assistants with read-only access to iCloud mail and calendar via IMAP and CalDAV, with opt-in write support for sending mail, managing events, and contacts.
      1
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables an AI assistant to read and search iCloud mail, draft messages (never sent), manage calendar events with a preview/commit gate, and look up contacts via IMAP, CalDAV, and CardDAV.
      2
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI assistants to securely access IMAP mailboxes with read-focused tools for searching, reading, listing messages, and creating drafts, while deliberately preventing sending or deleting emails.
      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