apple-icloud-mcp 0.1.0 → 0.2.1
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-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +32 -7
- package/dist/bundle.js +1824 -641
- package/dist/calendar/create.js +6 -5
- package/dist/calendar/edit.js +72 -33
- package/dist/calendar/events.js +13 -8
- package/dist/calendar/expand.js +530 -51
- package/dist/calendar/format.js +15 -12
- package/dist/calendar/ics.js +219 -4
- package/dist/calendar/ids.js +3 -1
- package/dist/calendar/series.js +373 -58
- package/dist/calendar/tools.js +121 -51
- package/dist/calendar/window.js +5 -0
- package/dist/contacts/book.js +105 -29
- package/dist/contacts/edit.js +11 -2
- package/dist/contacts/model.js +16 -5
- package/dist/contacts/tools.js +8 -2
- package/dist/dav/client.js +14 -4
- package/dist/dav/icloud.js +3 -1
- package/dist/doctor.js +108 -0
- package/dist/errors.js +12 -0
- package/dist/http.js +7 -3
- package/dist/index.js +6 -0
- package/dist/mail/html-text.js +118 -23
- package/dist/mail/imap.js +31 -1
- package/dist/mail/tools.js +27 -9
- package/dist/music/client.js +3 -1
- package/dist/music/playlists.js +14 -15
- package/dist/music/tools-extended.js +68 -24
- package/dist/music/tools-library.js +1 -1
- package/dist/music/tools-write.js +71 -28
- package/dist/music/write-log.js +150 -18
- package/dist/time.js +59 -17
- package/dist/tools/_confirm.js +27 -7
- package/dist/tools/_shared.js +2 -2
- package/dist/tools/healthcheck.js +47 -41
- package/dist/version.js +1 -1
- package/dist/weather/tools.js +17 -25
- package/package.json +1 -1
- package/server.json +2 -2
- package/skills/apple-icloud-mcp/SKILL.md +3 -2
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
},
|
|
7
7
|
"metadata": {
|
|
8
8
|
"description": "Unofficial Apple Music, iCloud Calendar/Contacts/Mail, Apple Maps and WeatherKit tools for Claude Code",
|
|
9
|
-
"version": "0.1
|
|
9
|
+
"version": "0.2.1"
|
|
10
10
|
},
|
|
11
11
|
"plugins": [
|
|
12
12
|
{
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"displayName": "Apple iCloud",
|
|
15
15
|
"source": "./",
|
|
16
16
|
"description": "Apple Music playlists and library, iCloud Calendar, Contacts and Mail, Apple Maps, WeatherKit and iTunes search for Claude via MCP — runs anywhere, no Mac required. Unofficial; not affiliated with Apple.",
|
|
17
|
-
"version": "0.1
|
|
17
|
+
"version": "0.2.1",
|
|
18
18
|
"author": {
|
|
19
19
|
"name": "Chris Chall"
|
|
20
20
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "apple-icloud",
|
|
3
3
|
"displayName": "Apple iCloud",
|
|
4
|
-
"version": "0.1
|
|
4
|
+
"version": "0.2.1",
|
|
5
5
|
"description": "Apple Music playlists and library, iCloud Calendar, Contacts and Mail, Apple Maps, WeatherKit and iTunes search for Claude via MCP — runs anywhere, no Mac required. Unofficial; not affiliated with Apple.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Chris Chall"
|
package/README.md
CHANGED
|
@@ -12,8 +12,9 @@ It talks to Apple over the network through Apple's own web APIs and standard pro
|
|
|
12
12
|
IMAP/SMTP), so — unlike Mac-only Apple integrations such as
|
|
13
13
|
[apple-swift-mcp](https://github.com/chrischall/apple-swift-mcp) — it runs anywhere: Linux, Windows, a
|
|
14
14
|
container, or hosted on [mcp-host](#running-on-mcp-host) as a claude.ai connector. The two complement each other:
|
|
15
|
-
`apple-swift-mcp` drives the Mac's own apps (Calendar, Reminders, Contacts, Mail, Messages, Notes, Photos, Maps
|
|
16
|
-
while `apple-icloud-mcp` reaches Apple's web services from anywhere and adds Apple
|
|
15
|
+
`apple-swift-mcp` drives the Mac's own apps (Calendar, Reminders, Contacts, Mail, Messages, Notes, Photos, Maps,
|
|
16
|
+
and Music.app playlists), while `apple-icloud-mcp` reaches Apple's web services from anywhere and adds the Apple
|
|
17
|
+
Music catalog, WeatherKit and iTunes.
|
|
17
18
|
|
|
18
19
|
> [!NOTE]
|
|
19
20
|
> **Unofficial.** This project is not affiliated with, endorsed by or sponsored by Apple Inc. Apple, iCloud,
|
|
@@ -210,6 +211,12 @@ works with **no** Apple Developer account. It is unsupported by Apple and may st
|
|
|
210
211
|
tools that need it say so in their descriptions, and their answers report which backend (`official` or `web`)
|
|
211
212
|
served them.
|
|
212
213
|
|
|
214
|
+
> [!TIP]
|
|
215
|
+
> **On a Mac, you may not need web-player mode at all.** [apple-swift-mcp](https://github.com/chrischall/apple-swift-mcp)
|
|
216
|
+
> makes the same playlist edits — rename, delete, remove, reorder, sort, dedupe, move into folders — in the local
|
|
217
|
+
> Music.app library through Music's own scripting, with no tokens or developer account. It works on songs already in
|
|
218
|
+
> your library, so a catalog song still needs adding first (`apple_music_add_to_library` here).
|
|
219
|
+
|
|
213
220
|
## Running on mcp-host
|
|
214
221
|
|
|
215
222
|
The package ships a [`mint.yaml`](mint.yaml) that mcp-host reads when you register `apple-icloud-mcp`:
|
|
@@ -228,7 +235,8 @@ The package ships a [`mint.yaml`](mint.yaml) that mcp-host reads when you regist
|
|
|
228
235
|
SMTP are tunnelled through the same proxy with HTTP CONNECT.
|
|
229
236
|
|
|
230
237
|
Give it your time zone (`DISPLAY_TZ`): the runner is on UTC, and times you give without an offset ("3pm") are
|
|
231
|
-
read in `DISPLAY_TZ
|
|
238
|
+
read in `DISPLAY_TZ` — so are calendar events stored without a time zone of their own ("floating"), whatever
|
|
239
|
+
`timeZone` a call passes. Set **`MCP_CONFIRM_SECRET`** too: without it, a confirmation token issued just before the
|
|
232
240
|
child restarts (a redeploy, a machine move) stops working and you have to preview again. Spent tokens are
|
|
233
241
|
recorded on disk, so a shared secret does not let one be replayed.
|
|
234
242
|
|
|
@@ -259,7 +267,7 @@ recorded on disk, so a shared secret does not let one be replayed.
|
|
|
259
267
|
| `apple_music_get_recommendations` | Your personal Apple Music recommendations ("Made for You", "Recently Played" and similar groups), each with its title and the albums, playlists or stations in it (catalog ids). | read | |
|
|
260
268
|
| `apple_music_get_replay` | Apple Music Replay: your top songs, albums and artists for the latest Replay year, or for a given year (with play counts where Apple provides them). | read | |
|
|
261
269
|
| `apple_music_get_ratings` | Whether you have loved or disliked songs, albums, playlists, music videos or stations — catalog or library ids — returning love, dislike or none per id. | read | |
|
|
262
|
-
| `apple_music_create_playlist` | Create a new playlist in your Apple Music library, optionally with tracks (up to 500 catalog or library song ids; added 100 at a time), a description, a folder and public visibility. | additive | |
|
|
270
|
+
| `apple_music_create_playlist` | Create a new playlist in your Apple Music library, optionally with tracks (up to 500 catalog or library song ids; added 100 at a time), a description, a folder and public visibility (not in APPLE_WRITE_MODE=additive). | additive | |
|
|
263
271
|
| `apple_music_add_playlist_tracks` | Append songs (up to 500 catalog or library ids) to the end of one of your library playlists. | additive | |
|
|
264
272
|
| `apple_music_create_folder` | Create a playlist folder in your Apple Music library, at the top level or inside another folder. | additive | |
|
|
265
273
|
| `apple_music_add_to_library` | Add catalog songs, albums, playlists or music videos to your Apple Music library by catalog id (up to 100 per type). | additive | |
|
|
@@ -341,7 +349,7 @@ recorded on disk, so a shared secret does not let one be replayed.
|
|
|
341
349
|
| Value | What is registered |
|
|
342
350
|
|---|---|
|
|
343
351
|
| `none` | Read tools only. |
|
|
344
|
-
| `additive` | Reads, plus writes that only **add** to your own account: create a playlist or folder, append tracks, add to library/favorites, create an event (without attendees, and not in a calendar shared with other people) or a contact. Nothing existing is modified or removed and nothing is sent to anyone. |
|
|
352
|
+
| `additive` | Reads, plus writes that only **add** to your own account: create a (private) playlist or folder, append tracks, add to library/favorites, create an event (without attendees, and not in a calendar shared with other people) or a contact. Nothing existing is modified or removed and nothing is sent to anyone. |
|
|
345
353
|
| `all` (default) | Everything. |
|
|
346
354
|
|
|
347
355
|
Gated tools are not registered at all below their mode, so no prompt or injected instruction can call them.
|
|
@@ -409,7 +417,7 @@ All optional; each service activates when its credentials are present. Values th
|
|
|
409
417
|
|---|---|
|
|
410
418
|
| `APPLE_WRITE_MODE` | "none" = read-only tools; "additive" = also create/append, never modify, delete or send; "all" = everything (default). Unrecognized values fail closed to "none". |
|
|
411
419
|
| `APPLE_SERVICES` | Comma-separated services to enable (music, calendar, contacts, mail, maps, weather, itunes). Default: all. |
|
|
412
|
-
| `DISPLAY_TZ` | IANA time zone (e.g. America/New_York) for displayed times and for dates you give without an offset. Set this on a hosted server, which runs in UTC. |
|
|
420
|
+
| `DISPLAY_TZ` | IANA time zone (e.g. America/New_York) for displayed times and for dates you give without an offset. Calendar events stored without a time zone of their own (floating) are always read in it: a calendar call's `timeZone` changes how your times are read and shown (and, on create/update, the zone an event is stored in) but never how a floating event is read, so occurrence ids never depend on it. Set this on a hosted server, which runs in UTC. |
|
|
413
421
|
| `APPLE_UNITS` | "metric" (default) or "imperial" units for weather (Maps distances always show both). |
|
|
414
422
|
| `APPLE_STATE_CACHE` | Set to false to write nothing under $MCP_DATA_DIR/.apple-icloud-mcp: no web-player token or iCloud discovery cache, and the rejected-password latch and spent confirmation tokens then last only as long as the process. |
|
|
415
423
|
| `APPLE_REQUEST_TIMEOUT_MS` | Per-request timeout in milliseconds (default 30000). |
|
|
@@ -443,12 +451,29 @@ All optional; each service activates when its credentials are present. Values th
|
|
|
443
451
|
Run **`apple_healthcheck`** first. For each service it reports whether credentials are configured (and which
|
|
444
452
|
variables to set if not), whether Apple accepted them just now, the active write mode and the display time zone.
|
|
445
453
|
|
|
454
|
+
The same check runs from a terminal, with no MCP client involved — useful before wiring the server into Claude,
|
|
455
|
+
or to tell a credential problem from a client problem. It reads the shell environment only, not the `env` block
|
|
456
|
+
of `.mcp.json`, Claude Desktop's config or the extension's settings, so export the same values first:
|
|
457
|
+
|
|
458
|
+
```bash
|
|
459
|
+
printf 'App-specific password: '; read -rs ICLOUD_APP_PASSWORD; echo # not echoed, kept out of shell history
|
|
460
|
+
export ICLOUD_APP_PASSWORD ICLOUD_USERNAME=you@icloud.com
|
|
461
|
+
npx -y apple-icloud-mcp doctor # every enabled service
|
|
462
|
+
npx -y apple-icloud-mcp doctor calendar mail # only these
|
|
463
|
+
npx -y apple-icloud-mcp doctor --json # the apple_healthcheck report as JSON
|
|
464
|
+
```
|
|
465
|
+
|
|
466
|
+
It exits 0 when every configured service works (and every service named on the command line is configured,
|
|
467
|
+
enabled and working), 1 otherwise, and 2 for a usage error. It sends each configured service one read-only
|
|
468
|
+
request (the iCloud ones one at a time, so a revoked password is sent once), and prints no secrets. From a
|
|
469
|
+
source checkout, `node dist/index.js doctor` also reads the repo's `.env`.
|
|
470
|
+
|
|
446
471
|
| Symptom | Likely cause |
|
|
447
472
|
|---|---|
|
|
448
473
|
| iCloud "credentials rejected" | The app-specific password was revoked (Apple ID password changed) or the normal password was used. Generate a new app-specific password. |
|
|
449
474
|
| Apple Music 401 | Developer key problem: wrong Team/Key ID, or the key lacks MusicKit. In web mode: the `media-user-token` cookie expired — copy a fresh one. |
|
|
450
475
|
| Apple Music 403 | The Music User Token expired (≈6 months), was minted with a different key, or the account has no Apple Music subscription. Run `music-auth` again (without the developer key: ask its owner for `music-auth --print-developer-token`). |
|
|
451
|
-
| `PLAYLIST_CHANGED` | Apple has not caught up with the
|
|
476
|
+
| `PLAYLIST_CHANGED` | Apple has not caught up with a recent change this server made to the playlist yet (its reads lag writes by seconds), or the playlist was edited elsewhere. Reorders, track removals, duplicate-checked adds and playlist updates refuse to act on such a read. Re-read with `apple_music_get_playlist` and retry. |
|
|
452
477
|
| Times are off by hours | Set `DISPLAY_TZ` to your IANA zone. |
|
|
453
478
|
| Mail times out on a hosted deployment | Check `imap.mail.me.com` / `smtp.mail.me.com` are in the egress allowlist. |
|
|
454
479
|
|