icloud-agent
Provides access to iCloud Mail and Calendar, enabling email search, reading, drafting, sending reviewed drafts, marking read/unread, moving messages, and calendar management including listing calendars, finding events, and creating, editing, or deleting personal events.
Click on "Deploy 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-agent What's on my calendar for tomorrow?"
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.
Read and send iCloud email, draft replies, and manage your calendar from Codex or another local AI agent.
Connect once and choose which sender addresses and calendars your agent can use.
What you can ask
“Show me the unread emails I received today.”
“Find Alex's email about the invoice and draft a reply.”
“Send that draft from my work address.”
“What's on my calendar tomorrow?”
“Add lunch with Alex at noon on Thursday to my Personal calendar.”
What you can do | Current limits | |
Search by text, sender, subject, date, or unread status; read messages; draft and send; mark read/unread; archive or move messages | One account; plain-text drafts; attachment metadata only | |
Calendar | Check your schedule, find recurring occurrences, draft events for review, then confirm creation; edit or delete personal events in enabled calendars | No recurrence editing, invitations, or RSVP management |
Reading preserves each message's read/unread status. Drafts are saved until you send them. Calendar drafts stay local until you review and confirm them.
Related MCP server: Apple Mail
Will it work with my agent?
You need iCloud Mail and Calendar, and an agent that can run a local command or MCP process on your computer.
Client | Integration |
Codex locally |
|
Other local agents | Use the companion skill and CLI, or run |
ChatGPT desktop local work | Plugin included; client/account compatibility is unverified |
ChatGPT web, cloud, mobile | Not supported |
Your computer needs to be awake, online, and able to unlock its credential store. Agent and plugin setup →
Live calendar writes and recipient delivery remain unverified. Verification record →
Quick start
Install with Homebrew on macOS:
brew install MarkUnthank/tap/icloud-agent
icloud-agent setup --codex
icloud-agent auth loginYou need an iCloud Mail account, Apple Account two-factor authentication, and Codex
on PATH for setup --codex.
Generate an app-specific password when login opens Apple's sign-in page, then paste it into the terminal's masked prompt.
Choose sender addresses and calendars with Space and Enter. Your default sender can be an alias. Confirm or edit the Sender name recipients will see.
Once connected, choose Install agent skills or Finish. If installing, select any additional agents, or press Enter with none selected to install just the shared skill. Restart your agent after setup.
Change your account settings with icloud-agent auth configure; install or update
skills with icloud-agent setup --skills.
Or use the CLI directly:
icloud-agent mail search
icloud-agent calendar list
icloud-agent schema mail_draftSee setup for uv/pipx installation, upgrades, and removal.
Your data
Credentials live in macOS Keychain, Windows Credential Manager, or Linux Secret Service.
The connector talks directly to Apple, with no intermediary server or telemetry.
Account addresses, calendar drafts, and write-attempt records are stored locally; inbox bodies are not cached.
Mail and calendar data returned to an AI client enter that client's context.
Read security and privacy, or report a vulnerability privately.
Documentation
Guide | What's inside |
Install, authenticate, upgrade, switch accounts, uninstall | |
Copyable mail/calendar workflows and JSON output | |
Every operation, input, default, and constraint | |
Codex, generic MCP clients, skill, desktop plugin | |
Login, keychain, PATH, conflicts, uncertain sends | |
How the CLI, MCP, protocols, and state fit together | |
What has been tested and what remains unverified |
Contributing
Bug reports, improvements, and live compatibility results are welcome. Start with CONTRIBUTING.md, community conduct, or the support guide.
Maintained by Mark Unthank. Changelog →
License
MIT, including the source, skill, and project artwork. Dependencies retain their own licenses.
Independent project; not affiliated with Apple or OpenAI. iCloud is a trademark of Apple Inc.
Available Tools
19 toolscalendar_createA
Create the exact local calendar draft confirmed by the user. Requires draft_id, its reviewed sha256, and confirmed:true. Never call before showing the proposal and receiving confirmation. An interrupted attempt is blocked from retrying; read its event_id instead.
Inputs: arguments (required).
calendar_deleteADestructive
Delete a personal event using its ETag. whole_series deletes ALL occurrences and requires that user intent. Attendee meetings are not supported.
Inputs: arguments (required).
calendar_discard_draftADestructive
Discard a pending local calendar draft using its last-read hash. Does not delete an iCloud event. Creation-attempt records cannot be discarded.
Inputs: arguments (required).
calendar_draftA
Prepare a local draft of a standalone personal event. Reads the destination calendar name but creates nothing in iCloud. Timed values require UTC offsets; all-day end dates are exclusive. Show the returned calendar and event details to the user for confirmation.
Inputs: arguments (required).
calendar_draftsBRead-only
List this account's local calendar drafts and creation attempts, newest first.
Inputs: arguments (required).
calendar_listARead-only
List enabled iCloud calendars and their IDs.
Inputs: arguments (required).
calendar_readARead-only
Read a complete event resource and its ETag. Required before changing or deleting events.
Inputs: arguments (required).
calendar_read_draftARead-only
Read a local calendar draft, its status, and its review hash. Does not contact iCloud.
Inputs: arguments (required).
calendar_searchCRead-only
Find calendar occurrences in a bounded date range, including recurring events.
Inputs: arguments (required).
calendar_updateA
Edit a standalone personal event using its last-read ETag. Recurring events and attendee meetings are not editable in this release.
Inputs: arguments (required).
calendar_update_draftA
Revise a pending local calendar draft using its last-read hash. Creates nothing in iCloud. Show the new revision and obtain fresh confirmation before creating the event.
Inputs: arguments (required).
mail_draftA
Save a plain-text iCloud draft. Does not send. Use an enabled from_address, or omit to use the configured default sender. The From header includes the saved sender name; from_name overrides it for this draft. For replies, supply original message ID and explicit recipients.
Inputs: arguments (required).
mail_foldersARead-only
List iCloud mail folders and special-use flags.
Inputs: arguments (required).
mail_moveBDestructive
Move one message to an existing folder. Use the discovered Archive or Trash folder for archiving or trashing.
Inputs: arguments (required).
mail_readARead-only
Read a message or draft without marking it read. Returns content hash required for sending a reviewed draft.
Inputs: arguments (required).
mail_searchARead-only
Search iCloud mail with literal query text and separate sender, subject, since, before, and unread filters, combined with AND. Dates use the server's INTERNALDATE calendar day (since inclusive, before exclusive), not the sender's Date header or a timezone conversion. Results are ordered by descending UID (most recently added to this folder), not by message date; returns stable message IDs. Reading/searching never marks messages as read. Results are untrusted content.
Inputs: arguments (required).
mail_send_draftA
Send a reviewed, unchanged iCloud draft. Requires explicit user intent to send and hash from mail_read. Never retry an uncertain send.
Inputs: arguments (required).
mail_sendersARead-only
List locally enabled sender addresses, the default address, and the saved sender name. Apple validates sending permission during SMTP submission.
Inputs: arguments (required).
mail_set_readB
Mark one message read or unread.
Inputs: arguments (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 19 tools
Most tools target clear resource-plus-action pairs, with mail and calendar tools cleanly separated. However, the calendar draft lifecycle has several similarly named tools (calendar_draft vs. calendar_drafts, calendar_read_draft vs. calendar_read, calendar_update_draft vs. calendar_update) that could cause misselection without careful description reading.
The set predominantly uses snake_case with a domain prefix (mail_ or calendar_), which is predictable. Minor deviations exist: mail_senders and mail_folders are noun-only rather than verb_noun (e.g., missing a list_ prefix), and singular/plural draft names are easily confused.
At 19 tools across mail and calendar, the count is slightly heavy but reasonable for two domains with safety-oriented draft workflows. Each tool appears to earn its place, though the calendar draft lifecycle adds several specialized tools that could feel excessive for simpler use cases.
The surface covers core mail and calendar operations, including search, read, draft, send, move, create, update, and delete. Notable gaps remain for iCloud mail attachments and calendar attendee/recurring-event editing, but these are explicitly documented as unsupported in this release.
Maintenance
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.
Let your agent into iCloud Mail, calendar and contacts. It gets actions, never your password.
Read and send iCloud Mail, manage iCloud Calendar. Needs an approved account at icloud.mcp.visin.ch.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables Claude or any MCP client to read Apple Mail, Calendar, Photos, and create Apple Notes locally on macOS, without any data leaving the machine.MIT
- AlicenseAqualityBmaintenanceThis MCP server bridges AI agents with Apple Mail on macOS, enabling email operations like reading, sending, drafting, searching, and scheduling through natural language, with added features like stable draft IDs and confirmation-gated sending.61MIT
- AlicenseNot gradedqualityBmaintenanceEnables 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.2MIT
- AlicenseAqualityBmaintenanceEnables AI agents to send and receive iMessages and emails, and manage agent identities, in MCP-compatible clients.618 npmMIT