Skip to main content
Glama
icloud-agent

icloud-agent

by MarkUnthank

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

Mail

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

icloud-agent setup --codex registers MCP and installs the skill

Other local agents

Use the companion skill and CLI, or run icloud-agent mcp as a stdio subprocess

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 login

You 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_draft

See 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

Setup

Install, authenticate, upgrade, switch accounts, uninstall

Usage

Copyable mail/calendar workflows and JSON output

CLI & MCP reference

Every operation, input, default, and constraint

Agent setup

Codex, generic MCP clients, skill, desktop plugin

Troubleshooting

Login, keychain, PATH, conflicts, uncertain sends

Architecture

How the CLI, MCP, protocols, and state fit together

Verification

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 tools
calendar_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_deleteA
Destructive

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_draftA
Destructive

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_draftsB
Read-only

List this account's local calendar drafts and creation attempts, newest first.

Inputs: arguments (required).

calendar_listA
Read-only

List enabled iCloud calendars and their IDs.

Inputs: arguments (required).

calendar_readA
Read-only

Read a complete event resource and its ETag. Required before changing or deleting events.

Inputs: arguments (required).

calendar_read_draftA
Read-only

Read a local calendar draft, its status, and its review hash. Does not contact iCloud.

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_foldersA
Read-only

List iCloud mail folders and special-use flags.

Inputs: arguments (required).

mail_moveB
Destructive

Move one message to an existing folder. Use the discovered Archive or Trash folder for archiving or trashing.

Inputs: arguments (required).

mail_readA
Read-only

Read a message or draft without marking it read. Returns content hash required for sending a reviewed draft.

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_sendersA
Read-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

    A3.6/5.0

    Scored across 19 tools

    Disambiguation4/5

    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.

    Naming Consistency4/5

    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.

    Tool Count4/5

    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.

    Completeness4/5

    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

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables 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
    • A
      license
      A
      quality
      B
      maintenance
      This 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.
      61
      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
      A
      quality
      B
      maintenance
      Enables AI agents to send and receive iMessages and emails, and manage agent identities, in MCP-compatible clients.
      6
      18 npm
      MIT