Skip to main content
Glama
MarkUnthank

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: local-apple-mcp

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.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    An MCP server that bridges Claude Desktop to iCloud Mail, Calendar, Reminders, and Contacts, enabling cross-service actions like daily briefs, scheduling, email drafting, task deferring, and unified search via a single prompt.
    14 npm
    MIT
  • A
    license
    Not graded
    quality
    C
    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
    A
    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
    2,681 npm
    MIT
  • A
    license
    Not graded
    quality
    C
    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.
    14 npm
    MIT