icloud-mail-mcp
Provides tools to interact with iCloud Mail: list folders, search and list emails, read messages and attachments as text, send emails, and delete or move messages via IMAP/SMTP.
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
Remote-MCP-Server, über den Claude (App oder Web, von jedem Gerät) auf ein iCloud-Postfach zugreift: Mails suchen und lesen, Anhänge als Text lesen, Mails senden, löschen und verschieben.
Gedacht für einen kleinen Heimserver (z. B. Raspberry Pi). Der Server lauscht nur auf 127.0.0.1
und wird ausschließlich über Tailscale Funnel auf dem Pfad /mcp veröffentlicht.
Jede Anfrage braucht den Header X-API-Key.
Claude ── HTTPS 443, Header "X-API-Key: <MCP_TOKEN>"
└─ Tailscale Funnel https://<PUBLIC_HOST>/mcp (nur Pfad /mcp)
└─ server.py 127.0.0.1:8010 (systemd-User-Unit)
├─ IMAP imap.mail.me.com:993
└─ SMTP smtp.mail.me.com:587Tools
Tool | Zweck |
| Ordner des Postfachs inkl. SPECIAL-USE-Flags |
| Suche (Tage, ungelesen, unbeantwortet, Absender, Betreff), neueste zuerst |
| Mail komplett lesen (Text max. 20.000 Zeichen) |
| Anhang als Text (PDF, TXT, CSV, HTML, JSON …) |
| Senden über iCloud-SMTP, Kopie in „Sent Messages“, kleine Base64-Anhänge |
| Standard: in den Papierkorb (per |
| Verschieben, z. B. archivieren oder aus dem Papierkorb wiederherstellen. Max. 25 uids |
Die Lese-Tools markieren nie etwas als gelesen. Schreibende Tools arbeiten ausschließlich mit UID-Befehlen:
IMAP MOVE, falls angeboten, sonst UID COPY + UID STORE +FLAGS (\Deleted) + UID EXPUNGE (UIDPLUS).
Ein einfaches EXPUNGE wird nie ausgeführt. iCloud bietet aktuell kein MOVE, aber UIDPLUS.
Sicherheit:
Nur
127.0.0.1; ohne oder mit falschemX-API-Key→ 401 (Fehlversuche werden im Log gezählt).DNS-Rebinding-Schutz: erlaubt sind nur localhost und
PUBLIC_HOST.Kein Zugriffslog, keine Mailinhalte im Log.
Die Server-instructions weisen Claude an, Mailinhalte als fremde Daten zu behandeln und vor Senden, Löschen und Verschieben bestätigen zu lassen. Tool-Annotations (
destructiveHintusw.) sind gesetzt.
Related MCP server: mail-mcp
Einrichtung
Voraussetzungen: Python ≥ 3.11, uv, Tailscale mit aktiviertem HTTPS und Funnel, ein App-spezifisches Passwort für iCloud.
git clone https://github.com/<user>/icloud-mail-mcp.git ~/icloud-mail-mcp
cd ~/icloud-mail-mcp
uv sync --no-dev # legt .venv an (mit Tests: uv sync)
cp .env.example .env && chmod 600 .env # Werte eintragen, MCP_TOKEN zufällig erzeugenDienst (systemd, als normaler Benutzer):
mkdir -p ~/.config/systemd/user
cp icloud-mail-mcp.service ~/.config/systemd/user/
systemctl --user daemon-reload
systemctl --user enable --now icloud-mail-mcp
sudo loginctl enable-linger "$USER" # startet auch ohne Login nach einem NeustartTailscale Funnel (nur den Pfad /mcp veröffentlichen):
tailscale funnel --bg --set-path /mcp http://127.0.0.1:8010/mcpIn Claude: Einstellungen → Connectors → Benutzerdefinierten Connector hinzufügen, URL
https://<PUBLIC_HOST>/mcp, Request-Header X-API-Key = Wert von MCP_TOKEN.
Empfehlung: send_email und delete_email auf „Freigabe vor jeder Nutzung“ stellen.
Konfiguration (.env)
Variable | Bedeutung |
| iCloud-Adresse |
| App-spezifisches Passwort |
| Anzeigename beim Senden (optional) |
| Name, dem Claude Mails vor dem Senden, Löschen oder Verschieben zeigen soll (optional) |
| API-Key, mindestens 32 Zeichen |
| lokaler Port, Standard 8010 |
| Hostname des Funnels, z. B. |
Betrieb und Test
systemctl --user status icloud-mail-mcp
systemctl --user restart icloud-mail-mcp # nach Änderungen an .env oder server.py
journalctl --user -u icloud-mail-mcp -n 50
T=$(grep '^MCP_TOKEN=' .env | cut -d= -f2-)
curl -s http://127.0.0.1:8010/mcp -H "X-API-Key: $T" \
-H 'Content-Type: application/json' -H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'Lizenz
MIT
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.
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.
Connect any mailbox to Claude, ChatGPT & AI: read, send, reply, schedule & search emails.
Related MCP Servers
- FlicenseNot gradedqualityBmaintenanceEnables Claude to read, search, draft, send, flag, and move email across multiple IMAP/SMTP mailboxes while keeping credentials local.-
- 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 LLMs to read, search, file, and send iCloud Mail via IMAP and SMTP, with local-only credential handling and read-only tools by default.1127 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