Building icloud-mcp in 30 minutes to connect Meta Muse to iCloud
Outside of work, almost all of my personal admin lives in Apple’s ecosystem. Most of my personal email domains are hosted on iCloud+ Custom Email Domains, and my personal calendar lives in iCloud too.
With Meta’s new personal AI agent, Muse, recently landing in the UK, I wanted to test how useful it could be for everyday life management. For that to work at all, connecting it to iCloud Mail and iCloud Calendar was non-negotiable.
Why I built my own MCP server
The first snag was simple: Apple doesn’t offer an official MCP server for iCloud. I did find a few commercial options, but they felt overly expensive for what is essentially a thin bridge over standard IMAP, SMTP, and CalDAV protocols.
Rather than pay a recurring fee for a black-box connector, I opened Claude Code yesterday to see how fast I could build a focused, open-source server myself. About half an hour later, icloud-mcp was up and running.
It authenticates using an Apple app-specific password (so it never touches my main Apple ID password or trips two-factor prompts) and runs either locally over stdio or remotely over Streamable HTTP behind an API key.
Hosting on Fly.io for pennies
Because Muse is a cloud-hosted agent, it needed an HTTPS endpoint rather than a local stdio process. I deployed icloud-mcp on Fly.io, which is a great fit for tiny personal MCP servers because of its scale-to-zero support:
- When the server is idle, Fly stops the machine (
auto_stop_machines) and bills $0 for CPU and RAM. - When Muse calls the endpoint, Fly automatically spins the machine back up (
auto_start_machines) to handle the request. - As long as you stick to a shared IP (avoiding the dedicated IPv4 add-on) and no persistent volumes, you only pay for a few seconds of compute plus pennies a month for container image storage.
First real test: Cyber Monday inbox triage
I wired the remote endpoint into Muse yesterday and put it to work properly this morning. So far, Muse has been completely happy talking to it:
- Morning briefings: Pulling clean summaries of my unread personal emails alongside today’s calendar items.
- Cyber Monday unsubscribe blitz: With promotional emails flooding in today, I had Muse work through old newsletters I’d forgotten about over the past year and bulk-unsubscribe from roughly 25–30 mailing lists.
It’s early days, and I still keep guardrails on what a remote agent can do (for example, icloud-mcp supports ICLOUD_ALLOW_SEND=false so an agent can draft replies without sending them directly). Even with those limits, turning a 30-minute build into a genuinely useful personal inbox and calendar assistant feels like a glimpse of where personal agents are headed.
The code is open source under MIT on GitHub: mcdscot/icloud-mcp.