icloud-mcp
Provides tools to access and manage iCloud mail, calendar, and contacts, with read-only capabilities by default and optional write operations.
Click on "Install 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., "@icloud-mcpshow my unread emails from today"
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.
icloud-mcp
A Model Context Protocol server that gives AI assistants read-only access to your iCloud mail and calendar over IMAP and CalDAV. Credentials live in your OS keyring (macOS Keychain by default) — never in a config file or the repo.
Defaults target iCloud, but every endpoint is overridable, so it works against any standard IMAP/CalDAV provider.
Status
Read-only by default; writes are strictly opt-in. Mail, calendar, and contacts
can be listed, searched, and read with no ability to change anything: the IMAP
connection is opened read-only and bodies are fetched with BODY.PEEK[], so
messages are never even marked as read.
Mutating tools span mail (send_mail, reply_mail, forward_mail), calendar
(create_event, update_event, delete_event), and contacts (create_contact,
update_contact, delete_contact) — but all are disabled unless you set
ICLOUD_ENABLE_WRITES=1, and even then every write requires an interactive
confirmation (MCP elicitation) before it runs. See Writes (opt-in).
Writes (opt-in)
Mutations are gated two ways:
Operator switch — write tools refuse with an explanatory error unless
ICLOUD_ENABLE_WRITES=1is set in the server's environment.Per-action confirmation — when enabled, each write tool calls back to the client to confirm the exact action before executing. Destructive operations (delete event / contact) are gated identically — no extra force flag, just the same confirmation.
iCloud issues a single app-specific password covering IMAP, SMTP, CalDAV, and CardDAV — there is no scoped "write-only" credential — so write-safety is structural: mail is sent over a separate, fresh SMTP connection (the read path's IMAP client has no send capability), and the opt-in flag + confirmation guard every mutation.
Related MCP server: apple-mail-mcp
Install
pip install icloud-mcpOr run it without installing — handy for MCP clients that launch the server on demand:
uvx icloud-mcpTo install the latest unreleased code straight from GitHub:
pip install git+https://github.com/eodozzy/icloud-mcpOr for local development:
git clone git@github.com:eodozzy/icloud-mcp
cd icloud-mcp
python3 -m venv .venv && .venv/bin/pip install -e ".[test]"Requires Python 3.11+.
Credentials
Generate an app-specific password for your Apple ID (never use your main password), then store it in your keyring:
# macOS
security add-generic-password -a "you@icloud.com" -s "icloud-mcp" -w "xxxx-xxxx-xxxx-xxxx"On other platforms, the cross-platform keyring
library is used — keyring set icloud-mcp you@icloud.com also works anywhere.
The username comes from the ICLOUD_USERNAME environment variable. Resolution
order for the password:
OS keyring (
ICLOUD_KEYRING_SERVICE, defaulticloud-mcp, + username)ICLOUD_APP_PASSWORDenvironment variable (fallback)
To reuse an existing keyring entry (e.g. one named my-icloud), set
ICLOUD_KEYRING_SERVICE=my-icloud.
Configuration
Set ICLOUD_USERNAME (required). All else is optional — see
.env.example for the full list of endpoint/timezone overrides.
Register with an MCP client
The server speaks MCP over stdio: a client launches the icloud-mcp command
as a subprocess and talks to it over stdin/stdout. "Installing" it into a client
just means telling that client which command to run and which env vars to pass —
the password itself stays in the keyring, never in the client config.
If icloud-mcp isn't on your PATH (e.g. you installed into a virtualenv),
use the absolute path to the launcher, e.g. /path/to/repo/.venv/bin/icloud-mcp.
Claude Code
claude mcp add icloud \
--env ICLOUD_USERNAME=you@icloud.com \
--env ICLOUD_KEYRING_SERVICE=icloud-mcp \
-- icloud-mcpThen claude mcp list to confirm. Add -s user to make it available across all
projects rather than just the current one.
Claude Desktop
Add the server to Claude Desktop's config file. On macOS this is:
~/Library/Application Support/Claude/claude_desktop_config.json(On Windows: %APPDATA%\Claude\claude_desktop_config.json.)
The easiest way to open it is Settings → Developer → Edit Config. Add an
mcpServers key alongside whatever is already in the file — do not paste a
second top-level { ... } object, or the file becomes invalid JSON:
{
"mcpServers": {
"icloud": {
"command": "icloud-mcp",
"env": {
"ICLOUD_USERNAME": "you@icloud.com",
"ICLOUD_KEYRING_SERVICE": "icloud-mcp"
}
}
}
}If the file already contains other keys, merge mcpServers in as a sibling
(remember the comma between keys):
{
"someExistingSetting": "...",
"mcpServers": { "icloud": { "...": "..." } }
}Then fully quit Claude Desktop (⌘Q, not just closing the window) and reopen it. The server shows up as a Local MCP server and its tools become available.
Notes:
First call prompts for Keychain access. macOS asks whether
icloud-mcpmay read the keyring item; click Always Allow to avoid repeat prompts.Claude Desktop may rewrite this file when it saves its own preferences, dropping hand-added keys it doesn't recognize. If the server disappears after you change other settings, just re-add the
mcpServersblock.
Tools & resources
Tools (model-invoked):
Tool | Description |
| List a folder (default INBOX), newest first, with optional |
| Full-text search the inbox (or a named folder) |
| List the available IMAP mailbox folder names |
| Fetch one message by UID, with full body |
| Calendar events in a date window |
| Events whose title matches text, in a window |
| Names of all calendars |
| List address-book contacts (name, emails, phones, org) |
| Find contacts matching text across name, org, and emails |
| Send a plain-text email |
| Reply to a message by UID (quotes original; |
| Forward a message by UID to a new recipient |
| Create a calendar event |
| Edit an event by UID (only the fields you pass) |
| Delete an event by UID |
| Create a new contact |
| Edit a contact by UID (merges into the existing vCard) |
| Delete a contact by UID |
⚠️ Write tools require ICLOUD_ENABLE_WRITES=1 and confirm each action — see
Writes (opt-in).
Resources (passive context):
URI | Description |
| Most recent inbox messages |
| Today + tomorrow's events |
Behavior notes
Empty/missing headers: messages whose
Subjectheader is absent or present-but-blank render as(no subject); a blank/absentFromrenders as(unknown). (Some mail has an empty subject line rather than no subject line at all — both are normalized.)Snippets prefer the
text/plainpart; for HTML-only mail, tags are stripped (<style>/<script>/<head>content discarded) so you still get a readable preview.Double-wrapped bodies: some senders (e.g. USPS Informed Delivery) embed a redundant MIME header block at the top of the decoded body. A leading
Content-*/MIME-Versionheader block is stripped so those headers don't leak into the snippet or body.since_dateis date-granular and evaluated in the IMAP server's timezone (UTC for iCloud), so asince_dateof today can include late-yesterday messages in your local time.
Development
.venv/bin/pytest # run the fixture-based test suite (no live account)
.venv/bin/mcp dev -m icloud_mcp.server # interactive MCP InspectorSecurity notes
The app-specific password lives in the OS keyring only — never in
.env, never committed.Read access (mail, calendar, contacts) cannot mutate anything; the IMAP session is opened read-only.
Writes are off by default. They require
ICLOUD_ENABLE_WRITES=1and an interactive confirmation per action, and mail is sent over a separate SMTP connection isolated from the read path.An app-specific password can be revoked at any time from appleid.apple.com without affecting your Apple ID.
License
MIT — see LICENSE.
Not affiliated with, endorsed by, or sponsored by Apple Inc. iCloud is a trademark of Apple Inc.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceEnables users to view and create events in their iCloud Calendar using natural language through supported LLMs. It integrates with Apple's infrastructure via app-specific passwords to provide secure calendar management.Last updated1
- AlicenseAqualityBmaintenanceEnables AI assistants to read, send, search, and manage emails in Apple Mail on macOS.Last updated2598MIT
- Alicense-qualityBmaintenanceEnables AI agents to access iCloud Calendar, Reminders, and Mail with configurable scope and read-only modes.Last updated1MIT
- AlicenseAqualityDmaintenanceGives AI agents read and write access to Apple Reminders via iCloud CalDAV, syncing with iPhone/iPad and supporting lists shared via Family Sharing.Last updated7MIT
Related MCP Connectors
Let ChatGPT, Claude & Cursor use your Mac: email, calendar, iMessage, Teams, files. Local, free.
Calendar API for AI agents: events, availability, Google/Microsoft setup, scheduling, and iCal.
Hosted Google Calendar MCP server for AI agents. No self-hosting or Google Cloud setup.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/eodozzy/icloud-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server