icloud-mcp 2.0.0 โ 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.local.json +35 -0
- package/.mcp.json.example +12 -0
- package/README.md +98 -8
- package/index.js +460 -1963
- package/lib/caldav.js +502 -0
- package/lib/carddav.js +401 -0
- package/lib/event-extractor.js +47 -0
- package/lib/imap.js +1944 -0
- package/lib/mime.js +134 -0
- package/lib/session.js +28 -0
- package/lib/smtp.js +220 -0
- package/package.json +4 -2
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"mcp__icloud-mail__list_mailboxes",
|
|
5
|
+
"mcp__icloud-mail__get_top_senders",
|
|
6
|
+
"mcp__icloud-mail__get_unread_senders",
|
|
7
|
+
"mcp__icloud-mail__get_storage_report",
|
|
8
|
+
"mcp__icloud-mail__get_mailbox_summary",
|
|
9
|
+
"mcp__icloud-mail__create_mailbox",
|
|
10
|
+
"mcp__icloud-mail__bulk_move",
|
|
11
|
+
"mcp__icloud-mail__delete_mailbox",
|
|
12
|
+
"mcp__icloud-mail__get_inbox_summary",
|
|
13
|
+
"mcp__icloud-mail__abandon_move",
|
|
14
|
+
"mcp__icloud-mail__search_emails",
|
|
15
|
+
"mcp__icloud-mail__count_emails",
|
|
16
|
+
"mcp__icloud-mail__archive_older_than",
|
|
17
|
+
"mcp__icloud-mail__bulk_move_by_sender",
|
|
18
|
+
"mcp__icloud-mail__get_move_status",
|
|
19
|
+
"mcp__icloud-mail__bulk_move_by_domain",
|
|
20
|
+
"WebSearch",
|
|
21
|
+
"WebFetch(domain:www.mdcourts.gov)",
|
|
22
|
+
"WebFetch(domain:probonomd.org)",
|
|
23
|
+
"WebFetch(domain:www.courts.state.md.us)",
|
|
24
|
+
"WebFetch(domain:msa.maryland.gov)",
|
|
25
|
+
"WebFetch(domain:www.harford.edu)",
|
|
26
|
+
"WebFetch(domain:thedailyrecord.com)",
|
|
27
|
+
"WebFetch(domain:ballotpedia.org)",
|
|
28
|
+
"mcp__icloud-mail__compose_email"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
"enableAllProjectMcpServers": true,
|
|
32
|
+
"enabledMcpjsonServers": [
|
|
33
|
+
"icloud-mail"
|
|
34
|
+
]
|
|
35
|
+
}
|
package/README.md
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
# icloud-mcp
|
|
2
2
|
|
|
3
|
-
A Model Context Protocol (MCP) server that connects Claude
|
|
3
|
+
A Model Context Protocol (MCP) server that connects Claude to your iCloud account โ Mail, Contacts, and Calendar. Read, search, organize, send, and automate across the full iCloud suite.
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
7
7
|
- ๐ฌ Read and paginate through any mailbox
|
|
8
8
|
- ๐ Search emails by keyword, sender, subject, body, date range, and more
|
|
9
9
|
- ๐งต Find email threads by References/In-Reply-To chain
|
|
10
|
+
- โ๏ธ Send emails, reply, forward, and save drafts via iCloud SMTP
|
|
11
|
+
- ๐ Create saved rules to auto-route emails on demand
|
|
10
12
|
- ๐๏ธ Bulk delete emails by any combination of filters
|
|
11
13
|
- ๐ Bulk move emails between folders with safe copy-verify-delete
|
|
12
14
|
- ๐ฆ Archive emails older than N days to any folder
|
|
@@ -19,10 +21,12 @@ A Model Context Protocol (MCP) server that connects Claude Desktop to your iClou
|
|
|
19
21
|
- ๐ Dry run mode for bulk operations โ preview before committing
|
|
20
22
|
- ๐ Safe move โ emails are fingerprinted and verified in the destination before removal from source
|
|
21
23
|
- ๐ Session logging โ Claude tracks progress across long multi-step operations
|
|
24
|
+
- ๐ค Contacts โ list, search, create, update, and delete iCloud Contacts via CardDAV
|
|
25
|
+
- ๐
Calendar โ list calendars, query events by date, create/update/delete events via CalDAV
|
|
22
26
|
|
|
23
27
|
## Prerequisites
|
|
24
28
|
|
|
25
|
-
- [Claude Desktop](https://claude.ai/download)
|
|
29
|
+
- [Claude Desktop](https://claude.ai/download) or Claude Code
|
|
26
30
|
- Node.js v20 or higher
|
|
27
31
|
- An iCloud account with an app-specific password
|
|
28
32
|
|
|
@@ -80,7 +84,9 @@ All checks passed. Ready to use with Claude Desktop.
|
|
|
80
84
|
|
|
81
85
|
If any step fails, a plain-English explanation and suggested fix will be shown.
|
|
82
86
|
|
|
83
|
-
### 4.
|
|
87
|
+
### 4. Connect to Claude
|
|
88
|
+
|
|
89
|
+
#### Claude Desktop
|
|
84
90
|
|
|
85
91
|
Open your Claude Desktop config file:
|
|
86
92
|
|
|
@@ -105,6 +111,38 @@ Add the following under `mcpServers`, replacing the path with your npm root from
|
|
|
105
111
|
}
|
|
106
112
|
```
|
|
107
113
|
|
|
114
|
+
Then fully quit Claude Desktop (Cmd+Q) and reopen it.
|
|
115
|
+
|
|
116
|
+
#### Claude Code
|
|
117
|
+
|
|
118
|
+
Run this command once to register the server for your user account (available across all projects):
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
claude mcp add icloud-mail \
|
|
122
|
+
--scope user \
|
|
123
|
+
-e IMAP_USER=you@icloud.com \
|
|
124
|
+
-e IMAP_PASSWORD=your-app-specific-password \
|
|
125
|
+
-- node $(npm root -g)/icloud-mcp/index.js
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Or use `npx` to avoid needing a global install:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
claude mcp add icloud-mail \
|
|
132
|
+
--scope user \
|
|
133
|
+
-e IMAP_USER=you@icloud.com \
|
|
134
|
+
-e IMAP_PASSWORD=your-app-specific-password \
|
|
135
|
+
-- npx -y icloud-mcp
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Verify it registered correctly:
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
claude mcp list
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
> **Running from source?** Copy `.mcp.json.example` to `.mcp.json`, set your credentials in your shell, then run `claude` from the repo directory. Claude Code will pick up the config automatically.
|
|
145
|
+
|
|
108
146
|
### 5. Add Custom Instructions (Recommended)
|
|
109
147
|
|
|
110
148
|
For large inbox operations, add the following to Claude Desktop's custom instructions to ensure Claude stays on track and checks in with you regularly. Go to **Claude Desktop โ Settings โ Custom Instructions** and add:
|
|
@@ -118,11 +156,14 @@ When using icloud-mail tools:
|
|
|
118
156
|
5. If you are ever unsure what you have done so far, call log_read before proceeding
|
|
119
157
|
```
|
|
120
158
|
|
|
121
|
-
### 6.
|
|
159
|
+
### 6. Start using it
|
|
160
|
+
|
|
161
|
+
You're all set. Try asking Claude:
|
|
122
162
|
|
|
123
|
-
|
|
163
|
+
- *"Show me the top senders in my iCloud inbox"*
|
|
164
|
+
- *"How many unread emails do I have?"*
|
|
124
165
|
|
|
125
|
-
## Available Tools (
|
|
166
|
+
## Available Tools (65)
|
|
126
167
|
|
|
127
168
|
### Read & Search
|
|
128
169
|
|
|
@@ -146,6 +187,15 @@ Fully quit Claude Desktop (Cmd+Q) and reopen it. You should now be able to manag
|
|
|
146
187
|
| `list_attachments` | List all attachments in an email (filename, MIME type, size, partId) |
|
|
147
188
|
| `get_attachment` | Download an attachment as base64 (max 20 MB); supports `offset`/`length` for paginated byte-range fetching |
|
|
148
189
|
|
|
190
|
+
### Send & Draft
|
|
191
|
+
|
|
192
|
+
| Tool | Description |
|
|
193
|
+
|------|-------------|
|
|
194
|
+
| `compose_email` | Send a new email via iCloud SMTP; supports plain text, HTML, cc, bcc, replyTo |
|
|
195
|
+
| `reply_to_email` | Reply to an email with correct In-Reply-To + References threading; supports `replyAll` |
|
|
196
|
+
| `forward_email` | Forward an email with an optional prepended note |
|
|
197
|
+
| `save_draft` | Save a draft to your Drafts folder without sending; supports plain text and HTML |
|
|
198
|
+
|
|
149
199
|
### Write
|
|
150
200
|
|
|
151
201
|
| Tool | Description |
|
|
@@ -189,6 +239,39 @@ Fully quit Claude Desktop (Cmd+Q) and reopen it. You should now be able to manag
|
|
|
189
239
|
| `get_move_status` | Check the status of the current or most recent bulk move; includes stale warning for operations >24h old |
|
|
190
240
|
| `abandon_move` | Abandon an in-progress move so a new one can start |
|
|
191
241
|
|
|
242
|
+
### Saved Rules
|
|
243
|
+
|
|
244
|
+
| Tool | Description |
|
|
245
|
+
|------|-------------|
|
|
246
|
+
| `create_rule` | Create a named rule with filters + action (move/delete/mark_read/mark_unread/flag/unflag) |
|
|
247
|
+
| `list_rules` | List all saved rules with last-run time and run count |
|
|
248
|
+
| `run_rule` | Run a specific rule by name; supports `dryRun` |
|
|
249
|
+
| `run_all_rules` | Run all saved rules in sequence; supports `dryRun` |
|
|
250
|
+
| `delete_rule` | Delete a saved rule by name |
|
|
251
|
+
|
|
252
|
+
### Contacts (CardDAV)
|
|
253
|
+
|
|
254
|
+
| Tool | Description |
|
|
255
|
+
|------|-------------|
|
|
256
|
+
| `list_contacts` | List contacts from iCloud Contacts; supports `limit`, `offset` for pagination |
|
|
257
|
+
| `search_contacts` | Search contacts by name, email, or phone number |
|
|
258
|
+
| `get_contact` | Get full details for a specific contact by ID |
|
|
259
|
+
| `create_contact` | Create a new contact; supports name, phones, emails, address, org, birthday, note |
|
|
260
|
+
| `update_contact` | Update an existing contact; only provided fields are changed |
|
|
261
|
+
| `delete_contact` | Permanently delete a contact |
|
|
262
|
+
|
|
263
|
+
### Calendar (CalDAV)
|
|
264
|
+
|
|
265
|
+
| Tool | Description |
|
|
266
|
+
|------|-------------|
|
|
267
|
+
| `list_calendars` | List all iCloud calendars with name, ID, and supported event types |
|
|
268
|
+
| `list_events` | List events in a calendar within a date range; supports `since`, `before`, `limit` |
|
|
269
|
+
| `get_event` | Get full details of a specific event by ID |
|
|
270
|
+
| `create_event` | Create a new event; supports title, start/end, timezone, all-day, description, location, recurrence |
|
|
271
|
+
| `update_event` | Update an existing event; only provided fields are changed |
|
|
272
|
+
| `delete_event` | Permanently delete a calendar event |
|
|
273
|
+
| `search_events` | Search for events by title across all calendars; supports date range |
|
|
274
|
+
|
|
192
275
|
### Session Log
|
|
193
276
|
|
|
194
277
|
| Tool | Description |
|
|
@@ -199,7 +282,7 @@ Fully quit Claude Desktop (Cmd+Q) and reopen it. You should now be able to manag
|
|
|
199
282
|
|
|
200
283
|
## Filters
|
|
201
284
|
|
|
202
|
-
`bulk_move`, `bulk_delete`, `bulk_flag`, `search_emails`,
|
|
285
|
+
`bulk_move`, `bulk_delete`, `bulk_flag`, `search_emails`, `count_emails`, and rules all accept any combination of these filters:
|
|
203
286
|
|
|
204
287
|
| Filter | Type | Description |
|
|
205
288
|
|--------|------|-------------|
|
|
@@ -238,7 +321,14 @@ Once configured, you can ask Claude things like:
|
|
|
238
321
|
- *"What's the unsubscribe link for this newsletter?"*
|
|
239
322
|
- *"Show me the 3 largest attachments in my inbox this month"*
|
|
240
323
|
- *"Flag all unread emails from my bank"*
|
|
241
|
-
- *"
|
|
324
|
+
- *"Create a rule that moves all emails from spotify.com to bulk-mail/services"*
|
|
325
|
+
- *"Reply to the last email from John and cc Sarah"*
|
|
326
|
+
- *"Draft a follow-up email to the team about the Q1 report"*
|
|
327
|
+
- *"Find John Smith's phone number in my contacts"*
|
|
328
|
+
- *"Add a new contact: Jane Doe, jane@example.com, +1 555 123 4567"*
|
|
329
|
+
- *"What's on my calendar next week?"*
|
|
330
|
+
- *"Create an event: dentist appointment Monday at 10am Eastern"*
|
|
331
|
+
- *"Find all my calendar events about 'team meeting'"*
|
|
242
332
|
|
|
243
333
|
## Security
|
|
244
334
|
|