iCloud Relay
Provides tools for accessing and managing iCloud Mail through IMAP/SMTP: listing folders, searching messages with newest-first pagination, reading decoded text/HTML without marking messages as seen, marking messages read/unread, creating plain or HTML drafts, and optionally sending email after a two-step confirmation when enabled.
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-relay
Stateless MCP bridge from Grok Bot (Cursor) to iCloud Mail.
Hosted as a Cursor App with Streamable HTTP MCP at:
https://icloud-relay.apps.grok.bot/mcp
The relay never stores mailbox passwords. Clients send an Apple ID and an app-specific password only in connector request headers for that call. A shared relay token gates tools/call. SMTP send is off unless you explicitly enable it.
Features
List folders (Unicode NFC/NFD paths)
Search with filters, newest-first date order, and cursor pagination
Peek-read (decoded text/html; never sets
\Seenon read)Mark read/unread
Create drafts (plain and/or HTML
multipart/alternative)Optional SMTP send (two-step confirm token, 15s delay) when
MAIL_SEND_ENABLED=true
Out of scope: push/IDLE, attachment byte download, move/delete, folder admin. Full matrix: docs/FEATURES.md.
Related MCP server: imap-mcp-server
Security model
Control | Behavior |
Credentials | Only |
Relay gate |
|
Client IP | Rate limits use platform |
Concurrency | Per-mailbox, per-IP, and process caps ( |
Send | Disabled by default; preview → wait → confirm with HMAC token |
Logging | Passwords are never logged or echoed |
Treat the public MCP URL like any credentialed proxy: keep the relay token secret, use Apple app-specific passwords, and prefer drafts over send.
Connect from Grok Bot
Add a Remote HTTPS connector to
https://icloud-relay.apps.grok.bot/mcp.Set secure headers in the connector only:
X-iCloud-Mail-User— Apple ID emailX-iCloud-Mail-Password— app-specific passwordX-iCloud-Relay-Token— same value as the app secretRELAY_ACCESS_TOKEN
Reconnect and confirm tools load.
Run locally
npm install
npm test
npm run build
npm startLocal server: http://127.0.0.1:3847 (/ status, /health, /mcp).
# Local tool calls without a deployed relay token:
RELAY_ALLOW_INSECURE=1 npm start
# Point IMAP at the FakeImap fixture (see tests):
IMAP_HOST=127.0.0.1 IMAP_PORT=<port> IMAP_SECURE=0App secrets (Cursor Apps):
Name | Purpose |
| Shared gate for |
| Set |
Architecture
Grok Bot --HTTPS MCP--> Cursor App (api/mcp.js)
|
ImapFlow / SMTP --> iCloud Mailsrc/mcp/— Streamable HTTP JSON-RPC (/mcp)src/mail/— IMAP, SMTP, MIME compose, sanitize, send-intentsrc/limits.ts— rate limits and concurrency slotsapi/+scripts/build.mjs— Cursor Apps / Vercel-style bundletest/fixtures/fake-imap-server.ts— offline IMAP for unit/E2E
Each /mcp POST is independent (no session store).
Verification (for agents)
Drive the real HTTP surface:
.cursor/skills/verify-icloud-relay/(FakeImap + free ports)Formal concurrency caps:
.cursor/skills/verify-mail-slots/— TLA+/TLC model ofwithMailSlotplusformal/mail-slots/check-code.mjsInvariants and layout: AGENTS.md
node --import tsx .cursor/skills/verify-icloud-relay/bin/verify.mjs launch
node --import tsx .cursor/skills/verify-icloud-relay/bin/verify.mjs drive health-status
node --import tsx .cursor/skills/verify-icloud-relay/bin/verify.mjs cleanup
bash formal/mail-slots/run.sh
node --import tsx formal/mail-slots/check-code.mjsLicense
MIT © 2026 Naofumi Kagami
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
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.
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.
Hosted MCP server for Gmail, Outlook, iCloud, Fastmail & Yahoo Mail with per-workspace controls.
Related MCP Servers
- 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
- AlicenseNot gradedqualityBmaintenanceEnables AI clients to work with IMAP mail accounts over a Streamable HTTP MCP endpoint, with per-user login-key authentication, isolated account directories, and encrypted (write-only) credential storage behind a self-hosted gateway.GPL 3.0
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to search, read, draft, move and flag mail in self-hosted IMAP mailboxes over MCP Streamable HTTP, protected by OAuth 2.1 with per-client, per-folder and per-operation rules, encrypted credentials and a full audit log. A Go sidecar handles header reads with caching, while structured errors, request ids and verified write outcomes keep unattended operation reliable.MIT
- AlicenseNot gradedqualityBmaintenanceGives Grok Bot and other MCP clients read and send access to a mailbox over HTTPS when they can't reach mail servers directly. It exposes tools to list folders, search and read messages with their attachments, and optionally send plain-text mail with replies threaded to the original.MIT