An MCP server implementation for iCloud services, written in Go. This server allows AI agents to interact with your iCloud Email, and generate events for Calendar and Reminders.
| Feature | Status | Description |
|---|---|---|
| ✅ Fully Supported | Send emails (SMTP) and read recent emails (IMAP). | |
| Calendar | Generates valid iCalendar (.ics) objects for events. Direct syncing/listing requires a specific ICLOUD_CALDAV_URL. |
|
| Reminders | Generates valid VTODO objects. Listing reminders requires ICLOUD_REMINDERS_URL. |
|
| Notes | Reading notes is limited to the legacy "Notes" IMAP folder. Modern iCloud Notes are not supported. |
This project relies on well-established open-source libraries in the Go ecosystem:
- emersion/go-imap: A widely used, robust IMAP client library.
- emersion/go-webdav & go-ical: Standard libraries for handling WebDAV/CalDAV and iCalendar formats.
- net/smtp: The standard Go library for SMTP.
- App-Specific Passwords: You MUST use an Apple App-Specific Password, not your main Apple ID password. This ensures that even if the token is compromised, your main account remains secure, and you can revoke the password at any time via appleid.apple.com.
- Environment Variables: Credentials are read from environment variables (
ICLOUD_EMAIL,ICLOUD_PASSWORD). Never commit these values to code or share them.
- Go installed (1.23+ recommended).
- An iCloud account.
- An App-Specific Password generated from appleid.apple.com.
Clone the repository and build the server:
git clone <your-repo-url>
cd icloud-mcp
go build -o icloud-mcpSet the following environment variables:
ICLOUD_EMAIL: Your iCloud email address (e.g.,user@icloud.com).ICLOUD_PASSWORD: Your App-Specific Password (format:xxxx-xxxx-xxxx-xxxx).ICLOUD_CALDAV_URL(Optional): The direct URL to your specific calendar collection (e.g.,https://caldav.icloud.com/1234567/calendars/work/).ICLOUD_REMINDERS_URL(Optional): The direct URL to your specific reminders collection.
Add the server to your MCP configuration (e.g., claude_desktop_config.json):
{
"mcpServers": {
"icloud": {
"command": "/path/to/icloud-mcp",
"env": {
"ICLOUD_EMAIL": "your_email@icloud.com",
"ICLOUD_PASSWORD": "your_app_specific_password"
}
}
}
}send_email: Send an email.- Args:
to,subject,body
- Args:
read_emails: Fetch recent emails.- Args:
limit(default 10)
- Args:
read_notes: Fetch legacy notes from IMAP.- Args:
limit(default 10)
- Args:
create_calendar_event: Generate an iCalendar event.- Args:
summary,start_time(RFC3339),duration_minutes
- Args:
list_calendar_events: List events (RequiresICLOUD_CALDAV_URL).create_reminder: Generate a Reminder (VTODO).- Args:
title,due_date(optional)
- Args:
list_reminders: List reminders (RequiresICLOUD_REMINDERS_URL).create_note: (Experimental) Placeholder for Notes creation.
MIT