icloud-mcp

mcp
Security Audit
Warn
Health Pass
  • License — License: MIT
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Community trust — 21 GitHub stars
Code Warn
  • process.env — Environment variable access in config.js
  • network request — Outbound network request in email/imap-client.js
Permissions Pass
  • Permissions — No dangerous permissions requested

No AI report is available for this listing yet.

SUMMARY

MCP server for Apple services — Mail, Calendar, Contacts, Reminders, Notes, Messages, Safari — via AppleScript (local) or iCloud IMAP/CalDAV/CardDAV (cloud)

README.md

iCloud Logo

Apple MCP Server

Connect Claude to your Apple services via the Model Context Protocol

Features • Installation • Configuration • Tools • Architecture

Node Version License MCP Compatible macOS Protocols


Overview

This MCP server enables Claude to interact with your Apple services in two modes:

Local Mode (Default) - macOS Only

Uses AppleScript to access native macOS apps. Faster, works offline, more services.

Service Backend Tools
Email IMAP / SMTP * 6
Calendar CalDAV * 4
Contacts Contacts.app 7
Reminders Reminders.app 7
Notes Notes.app 5
Messages Messages.app + imsg 4
Safari Safari.app 4

* Email and Calendar still use the iCloud protocols in both modes and need
credentials. Their AppleScript clients exist but are not wired up yet.

Cloud Mode - Works Anywhere

Uses iCloud protocols (IMAP, CalDAV, CardDAV). Requires app-specific password.

Service Protocol Endpoint
Email IMAP / SMTP imap.mail.me.com / smtp.mail.me.com
Calendar CalDAV caldav.icloud.com
Contacts CardDAV contacts.icloud.com

Features

  • 40 Tools across 7 services (local-only tools return an error in cloud mode)
  • Dual Mode - switch between local (fast) and cloud (remote access)
  • 7 Services - Email, Calendar, Contacts, Reminders, Notes, Messages, Safari
  • Secure Authentication - AppleScript permissions or app-specific passwords
  • Full CRUD - create, read, update, delete across services

Installation

# Clone the repository
git clone https://github.com/MrGo2/icloud-mcp.git
cd icloud-mcp

# Install dependencies
npm install

# Configure (optional for local mode)
cp .env.example .env

Configuration

Local Mode (Default)

No configuration needed! Just run:

npm start

On first use, macOS will prompt for access to each app. Grant permission in System Settings > Privacy & Security > Automation.

Cloud Mode

  1. Generate an App-Specific Password

    • Go to appleid.apple.com
    • Sign in → Security → App-Specific Passwords → Generate
    • Name it iCloud MCP and copy the 16-character password
  2. Configure .env

    USE_LOCAL_MODE=false
    [email protected]
    ICLOUD_APP_PASSWORD=xxxx-xxxx-xxxx-xxxx
    

Add to Claude Desktop

Add to your Claude Desktop MCP settings (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "apple": {
      "command": "node",
      "args": ["/path/to/icloud-mcp/index.js"]
    }
  }
}

Tools

Authentication (3)

Tool Description
about Server information
check-auth-status Verify credentials
set-mode Switch between LOCAL and CLOUD at runtime

Email (6)

Tool Description
list-emails List emails from a folder
read-email Read full email content
send-email Compose and send email
search-emails Search by criteria
mark-as-read Mark read/unread
list-folders List mail folders

Calendar (4)

Tool Description
list-events List upcoming events
list-calendars List all calendars
create-event Create new event
delete-event Delete an event

Contacts (7)

Tool Description
list-contacts List contacts
search-contacts Search by name/email/phone
read-contact Get contact details
create-contact Create new contact
delete-contact Delete a contact
list-contact-accounts List accounts (iCloud, Google, ...) - local only
list-contact-groups List contact groups - local only

Reminders (7) - Local Only

Tool Description
list-reminder-lists List all reminder lists
list-reminders List reminders from a list
create-reminder Create new reminder
update-reminder Update reminder
complete-reminder Mark as complete
delete-reminder Delete reminder
search-reminders Search reminders

Notes (5) - Local Only

Tool Description
list-note-folders List note folders
list-notes List notes
read-note Read note content
create-note Create new note
search-notes Search notes

Messages (4) - Local Only

Reading requires the imsg CLI and Full Disk Access.

Tool Description
list-chats List recent conversations
read-messages Read a conversation's history
send-message Send iMessage/SMS
react-message Send a tapback reaction

Safari (4) - Local Only

Tool Description
list-safari-tabs List open tabs
get-current-safari-url Get current tab URL
open-safari-url Open URL in new tab
close-safari-tab Close a tab

Architecture

icloud-mcp/
├── index.js              # MCP server (JSON-RPC over stdio)
├── mode.js               # Runtime mode state
├── config.js             # Configuration
├── auth/                 # Credential management + set-mode
├── email/
│   ├── imap-client.js    # Cloud: IMAP
│   ├── smtp-client.js    # Cloud: SMTP
│   ├── local-client.js   # Local: Mail.app
│   └── index.js
├── calendar/
│   ├── caldav-client.js  # Cloud: CalDAV
│   ├── local-client.js   # Local: Calendar.app
│   └── index.js
├── contacts/
│   ├── carddav-client.js # Cloud: CardDAV
│   ├── local-client.js   # Local: Contacts.app
│   └── index.js
├── reminders/            # Local only
├── notes/                # Local only
├── messages/             # Local only
├── safari/               # Local only
└── utils/
    ├── applescript.js    # AppleScript executor
    ├── date-utils.js
    └── error-handler.js

Usage Examples

List Reminders

"Show me my reminders for today"

Create a Reminder

"Create a reminder to buy milk tomorrow at 5pm"

Send a Message

"Send an iMessage to +34612345678 saying I'll be there in 10 minutes"

Check Safari Tabs

"What tabs do I have open in Safari?"

Send Email

"Send an email to [email protected] with subject 'Meeting Tomorrow'"

Mode Comparison

Feature Local Mode Cloud Mode
Speed Fast (~100ms) Slower (~500ms+)
Works offline ✅ ❌
Remote access ❌ ✅
Services 7 3
Tools 40 advertised 40 advertised, 22 usable
Requirements macOS App-specific password

Limitations

Feature Status Reason
Read Messages ✅ Via the imsg CLI (needs Full Disk Access)
Edit Notes ⚠️ Limited AppleScript limitation
iCloud Drive ❌ Requires CloudKit
Find My ❌ Internal API only

Troubleshooting

Issue Solution
Permission denied Grant access in System Settings > Privacy & Security > Automation
App not responding Make sure the app (Mail, Calendar, etc.) is running
Authentication failed (cloud) Use app-specific password, not Apple ID password
IMAP timeout (cloud) iCloud servers can be slow - retry

Development

# Run in local mode (default)
npm start

# Run in cloud mode
USE_LOCAL_MODE=false npm start

# Test with MCP Inspector
npm run inspect

License

MIT © Carlos Lorenzo


Built for use with Claude and the Model Context Protocol

Reviews (0)

No results found