icloud-mcp 2.0.0 โ 2.2.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 +26 -0
- package/.mcp.json.example +12 -0
- package/README.md +68 -8
- package/index.js +191 -1963
- 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 +3 -2
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
]
|
|
21
|
+
},
|
|
22
|
+
"enableAllProjectMcpServers": true,
|
|
23
|
+
"enabledMcpjsonServers": [
|
|
24
|
+
"icloud-mail"
|
|
25
|
+
]
|
|
26
|
+
}
|
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 Mail account. Read, search, organize, send, and automate your inbox directly through Claude.
|
|
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
|
|
@@ -22,7 +24,7 @@ A Model Context Protocol (MCP) server that connects Claude Desktop to your iClou
|
|
|
22
24
|
|
|
23
25
|
## Prerequisites
|
|
24
26
|
|
|
25
|
-
- [Claude Desktop](https://claude.ai/download)
|
|
27
|
+
- [Claude Desktop](https://claude.ai/download) or Claude Code
|
|
26
28
|
- Node.js v20 or higher
|
|
27
29
|
- An iCloud account with an app-specific password
|
|
28
30
|
|
|
@@ -80,7 +82,9 @@ All checks passed. Ready to use with Claude Desktop.
|
|
|
80
82
|
|
|
81
83
|
If any step fails, a plain-English explanation and suggested fix will be shown.
|
|
82
84
|
|
|
83
|
-
### 4.
|
|
85
|
+
### 4. Connect to Claude
|
|
86
|
+
|
|
87
|
+
#### Claude Desktop
|
|
84
88
|
|
|
85
89
|
Open your Claude Desktop config file:
|
|
86
90
|
|
|
@@ -105,6 +109,38 @@ Add the following under `mcpServers`, replacing the path with your npm root from
|
|
|
105
109
|
}
|
|
106
110
|
```
|
|
107
111
|
|
|
112
|
+
Then fully quit Claude Desktop (Cmd+Q) and reopen it.
|
|
113
|
+
|
|
114
|
+
#### Claude Code
|
|
115
|
+
|
|
116
|
+
Run this command once to register the server for your user account (available across all projects):
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
claude mcp add icloud-mail \
|
|
120
|
+
--scope user \
|
|
121
|
+
-e IMAP_USER=you@icloud.com \
|
|
122
|
+
-e IMAP_PASSWORD=your-app-specific-password \
|
|
123
|
+
-- node $(npm root -g)/icloud-mcp/index.js
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Or use `npx` to avoid needing a global install:
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
claude mcp add icloud-mail \
|
|
130
|
+
--scope user \
|
|
131
|
+
-e IMAP_USER=you@icloud.com \
|
|
132
|
+
-e IMAP_PASSWORD=your-app-specific-password \
|
|
133
|
+
-- npx -y icloud-mcp
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Verify it registered correctly:
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
claude mcp list
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
> **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.
|
|
143
|
+
|
|
108
144
|
### 5. Add Custom Instructions (Recommended)
|
|
109
145
|
|
|
110
146
|
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 +154,14 @@ When using icloud-mail tools:
|
|
|
118
154
|
5. If you are ever unsure what you have done so far, call log_read before proceeding
|
|
119
155
|
```
|
|
120
156
|
|
|
121
|
-
### 6.
|
|
157
|
+
### 6. Start using it
|
|
122
158
|
|
|
123
|
-
|
|
159
|
+
You're all set. Try asking Claude:
|
|
124
160
|
|
|
125
|
-
|
|
161
|
+
- *"Show me the top senders in my iCloud inbox"*
|
|
162
|
+
- *"How many unread emails do I have?"*
|
|
163
|
+
|
|
164
|
+
## Available Tools (55)
|
|
126
165
|
|
|
127
166
|
### Read & Search
|
|
128
167
|
|
|
@@ -146,6 +185,15 @@ Fully quit Claude Desktop (Cmd+Q) and reopen it. You should now be able to manag
|
|
|
146
185
|
| `list_attachments` | List all attachments in an email (filename, MIME type, size, partId) |
|
|
147
186
|
| `get_attachment` | Download an attachment as base64 (max 20 MB); supports `offset`/`length` for paginated byte-range fetching |
|
|
148
187
|
|
|
188
|
+
### Send & Draft
|
|
189
|
+
|
|
190
|
+
| Tool | Description |
|
|
191
|
+
|------|-------------|
|
|
192
|
+
| `compose_email` | Send a new email via iCloud SMTP; supports plain text, HTML, cc, bcc, replyTo |
|
|
193
|
+
| `reply_to_email` | Reply to an email with correct In-Reply-To + References threading; supports `replyAll` |
|
|
194
|
+
| `forward_email` | Forward an email with an optional prepended note |
|
|
195
|
+
| `save_draft` | Save a draft to your Drafts folder without sending; supports plain text and HTML |
|
|
196
|
+
|
|
149
197
|
### Write
|
|
150
198
|
|
|
151
199
|
| Tool | Description |
|
|
@@ -189,6 +237,16 @@ Fully quit Claude Desktop (Cmd+Q) and reopen it. You should now be able to manag
|
|
|
189
237
|
| `get_move_status` | Check the status of the current or most recent bulk move; includes stale warning for operations >24h old |
|
|
190
238
|
| `abandon_move` | Abandon an in-progress move so a new one can start |
|
|
191
239
|
|
|
240
|
+
### Saved Rules
|
|
241
|
+
|
|
242
|
+
| Tool | Description |
|
|
243
|
+
|------|-------------|
|
|
244
|
+
| `create_rule` | Create a named rule with filters + action (move/delete/mark_read/mark_unread/flag/unflag) |
|
|
245
|
+
| `list_rules` | List all saved rules with last-run time and run count |
|
|
246
|
+
| `run_rule` | Run a specific rule by name; supports `dryRun` |
|
|
247
|
+
| `run_all_rules` | Run all saved rules in sequence; supports `dryRun` |
|
|
248
|
+
| `delete_rule` | Delete a saved rule by name |
|
|
249
|
+
|
|
192
250
|
### Session Log
|
|
193
251
|
|
|
194
252
|
| Tool | Description |
|
|
@@ -199,7 +257,7 @@ Fully quit Claude Desktop (Cmd+Q) and reopen it. You should now be able to manag
|
|
|
199
257
|
|
|
200
258
|
## Filters
|
|
201
259
|
|
|
202
|
-
`bulk_move`, `bulk_delete`, `bulk_flag`, `search_emails`,
|
|
260
|
+
`bulk_move`, `bulk_delete`, `bulk_flag`, `search_emails`, `count_emails`, and rules all accept any combination of these filters:
|
|
203
261
|
|
|
204
262
|
| Filter | Type | Description |
|
|
205
263
|
|--------|------|-------------|
|
|
@@ -238,7 +296,9 @@ Once configured, you can ask Claude things like:
|
|
|
238
296
|
- *"What's the unsubscribe link for this newsletter?"*
|
|
239
297
|
- *"Show me the 3 largest attachments in my inbox this month"*
|
|
240
298
|
- *"Flag all unread emails from my bank"*
|
|
241
|
-
- *"
|
|
299
|
+
- *"Create a rule that moves all emails from spotify.com to bulk-mail/services"*
|
|
300
|
+
- *"Reply to the last email from John and cc Sarah"*
|
|
301
|
+
- *"Draft a follow-up email to the team about the Q1 report"*
|
|
242
302
|
|
|
243
303
|
## Security
|
|
244
304
|
|