Apple Icloud Mcp

io.github.chrischall由 GitHub 帳號 chrischall 發布v0.5.0更新於 Nov 12, 2026

Unofficial: Apple Music, iCloud Calendar/Contacts/Mail, Apple Maps and WeatherKit, no Mac needed

概覽

AI 產生的概覽

非官方本機 MCP 伺服器,讓助理不需 Mac 就能讀取與編輯 Apple Music、iCloud 行事曆、聯絡人和郵件,以及 Apple 地圖與 WeatherKit。

可以做什麼
  • 搜尋 Apple Music 目錄、排行榜和 iTunes Store,並讀取你的資料庫、播放清單、收聽紀錄、Replay 和評分
  • 建立播放清單與資料夾、加入曲目、收藏和資料庫項目,並設定評分
  • 重新命名、重新排序、去重或刪除播放清單,以及從資料庫移除項目(網頁播放器模式)
  • 列出、搜尋、建立、修改和刪除 iCloud 行事曆事件,並找出空閒時間
  • 搜尋、讀取、建立、修改和刪除 iCloud 聯絡人,並列出聯絡人群組
  • 列出信箱、搜尋與閱讀郵件、下載附件、寄送郵件、變更標記和移動郵件
適用情境
適合想用一個伺服器讓助理管理個人 Apple 生態系的情況:依行事曆安排時間、查詢聯絡人、整理郵件,或建立與清理 Apple Music 播放清單,同時附帶地圖與天氣查詢。
執行需求
透過 npx 在本機執行,需要 Node.js 22 或更新版本。iCloud 行事曆、聯絡人和郵件需要 ICLOUD_USERNAME 與 ICLOUD_APP_PASSWORD(專用密碼)。存取 Apple Music 資料庫需要互動式登入取得的 APPLE_MUSIC_USER_TOKEN,或 APPLE_MUSIC_WEB_USER_TOKEN。Apple Music 目錄、地圖和 WeatherKit 需要付費的 Apple 開發者會員資格,並設定 APPLE_TEAM_ID、APPLE_KEY_ID 和 APPLE_PRIVATE_KEY。iTunes 搜尋與排行榜不需任何憑證。
安裝前請注意
會處理敏感憑證:專用密碼、Apple 私鑰、Music 使用者權杖或瀏覽器工作階段 Cookie。寫入類工具可寄送郵件、刪除行事曆事件(出席者會收到取消通知,且沒有垃圾桶)、在所有裝置上永久刪除聯絡人,以及刪除或重排播放清單;APPLE_WRITE_MODE 預設為 all,可設為 none 或 additive 加以限制。網頁播放器模式使用 Apple 非公開 API,可能隨時失效。所有資料都會傳送到 Apple 的主機。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Apple Icloud Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

apple-icloud-mcp

[CI] [npm] [license]

A Model Context Protocol server that connects Claude to Apple's web services: Apple Music (your playlists, library and the catalog), iCloud Calendar, Contacts and Mail, Apple Maps, WeatherKit, and the iTunes Search API.

It talks to Apple over the network through Apple's own web APIs and standard protocols (CalDAV, CardDAV, IMAP/SMTP), so — unlike Mac-only Apple integrations such as apple-swift-mcp — it runs anywhere: Linux, Windows, a container, or hosted on mcp-host as a claude.ai connector. The two complement each other: apple-swift-mcp drives the Mac's own apps (Calendar, Reminders, Contacts, Mail, Messages, Notes, Photos, Maps, and Music.app playlists), while apple-icloud-mcp reaches Apple's web services from anywhere and adds the Apple Music catalog, WeatherKit and iTunes.

[!NOTE] Unofficial. This project is not affiliated with, endorsed by or sponsored by Apple Inc. Apple, iCloud, Apple Music, Apple Maps and WeatherKit are trademarks of Apple Inc., used here only to name the services it connects to.

[!WARNING] AI-developed project. This codebase was entirely built and is actively maintained by Claude Code. No human has audited the implementation. Review all code and tool permissions before use.

[!IMPORTANT] Not yet verified against a live Apple account. Every request shape comes from Apple's documentation or Apple's own web client and is covered by tests against faithful fakes, but the build environment had no Apple credentials. The first real run is the real verification — run apple_healthcheck first, and see docs/APPLE-API.md for what each call relies on.

What you can do

  • "Make a playlist called Road Trip 2026 with twenty upbeat 80s songs"
  • "Add the top 5 songs from Taylor Swift's latest album to my Workout playlist"
  • "Remove duplicates from my Chill playlist and sort it by artist" (web-player mode)
  • "What have I been listening to on heavy rotation?" / "Show my Apple Music Replay for this year"
  • "What's on my calendar next week?" / "Find me a free hour on Thursday afternoon"
  • "Move my dentist appointment to Friday at 3pm"
  • "What's Jane's phone number?" / "Add Bob Lee from Acme with [email protected] to my contacts"
  • "Any unread email from my landlord?" / "Reply to the last message from Sam saying I'll be there"
  • "How long will it take to drive to the airport at 5pm?" / "Coffee shops near Union Square"
  • "Will it rain in Chicago tomorrow?"
  • "Find the podcast Hard Fork and list its latest episodes" / "What are the top albums in the UK right now?"

Services and what each needs

Every service is optional: each one switches on when its credentials are present, and apple_healthcheck tells you which are working.

ServiceWhat you getCredentialCost
Apple Music (official API)Catalog search, charts, your library, playlists (create, add tracks, folders), history, recommendations, Replay, ratings, favoritesApple Developer key + a Music User TokenApple Developer Program ($99/yr) + Apple Music subscription
Apple Music (web-player mode, opt-in, unofficial)Everything above plus rename/delete playlists, remove/reorder/sort/dedupe tracks, move to folders, remove from libraryThe media-user-token cookie from music.apple.comApple Music subscription only
iCloud Calendar (CalDAV)List/search events (recurring ones expanded), create/update/delete with correct time zones and recurrence, free-time finderApple ID + app-specific passwordFree
iCloud Contacts (CardDAV)Search, read, create, update (per-email/phone edits), delete, groupsApple ID + app-specific passwordFree
iCloud Mail (IMAP/SMTP)List mailboxes, search, read (without marking read), send and reply, flag, moveApple ID + app-specific passwordFree
Apple Maps (Maps Server API)Geocode, reverse geocode, place search, directions, ETAs, signed map-image URLsApple Developer keyFree up to 25,000 calls/day
WeatherKitCurrent conditions, hourly/daily forecast, next-hour precipitation, severe-weather alertsApple Developer key + Services IDFree up to 500,000 calls/month
iTunes Search + chartsSearch/lookup songs, albums, podcasts (with episodes), apps, books, audiobooks; top chartsNoneFree

Requirements

  • Node.js 22 or later (the hosted runner uses Node 26).
  • Whatever the services you want need (table above).

Acknowledgement of Terms

By using this MCP server, you acknowledge and agree to the following:

1. It accesses your own Apple accounts only, with credentials you supply. It cannot reach anyone else's data, and on a shared deployment each person's Apple ID stays in their own process.

2. Apple's terms govern your use, just as they govern your direct use of Apple's services — in particular the Apple Media Services Terms, the iCloud Terms and Conditions and, for the developer-key services, the Apple Developer Program License Agreement. The iCloud Terms say you may not "interfere with or disrupt the Service (including accessing the Service through any automated means, like scripts or web crawlers)". The iCloud paths here use the mechanism Apple provides for third-party apps — app-specific passwords over CalDAV, CardDAV and IMAP/SMTP — at the pace of a person using an assistant. Apple Music web-player mode is different: it uses Apple's private web-player API with your browser session, which Apple has said may be blocked at any time. It is off unless you turn it on. Terms read by the maintainer 2026-09-26.

3. Personal use only. This project is not affiliated with, endorsed by, or sponsored by Apple Inc. "Apple", "Apple Music", "iCloud" and related marks are Apple's. Do not share your credentials, and do not use this to bulk-extract data.

4. Writes are real. Creating a calendar event with attendees makes iCloud email them invitations; sending mail sends it; deleting a playlist or contact deletes it. Those actions ask for confirmation first (see Confirmation), and APPLE_WRITE_MODE can remove write tools entirely.

5. You accept full responsibility for the consequences, technical (rate limits, a locked account after repeated failed sign-ins) and otherwise.

This is the maintainer's good-faith summary, not legal advice, and it does not modify or supersede Apple's actual terms.

Installation

Claude Code

bash
claude mcp add apple -- npx -y apple-icloud-mcp

then set the variables for the services you want (see Setting up credentials) in the server's env, for example in .mcp.json:

json
{  "mcpServers": {    "apple": {      "command": "npx",      "args": ["-y", "apple-icloud-mcp"],      "env": {        "ICLOUD_USERNAME": "[email protected]",        "ICLOUD_APP_PASSWORD": "abcd-efgh-ijkl-mnop",        "DISPLAY_TZ": "America/New_York"      }    }  }}

Claude Desktop

Install the .mcpb bundle from the latest release and fill in the settings it asks for, or add the same npx entry to claude_desktop_config.json.

From source

bash
git clone https://github.com/chrischall/apple-icloud-mcp.git && cd apple-icloud-mcpnpm install && npm run buildcp .env.example .env   # fill in what you neednpm run dev

Setting up credentials

iCloud Calendar, Contacts and Mail — an app-specific password

  1. Sign in at appleid.apple.com → Sign-In and Security → App-Specific Passwords → generate one (two-factor authentication must be on).
  2. Set ICLOUD_USERNAME (your Apple ID email) and ICLOUD_APP_PASSWORD (the xxxx-xxxx-xxxx-xxxx password). Your normal Apple ID password does not work here.
  3. If your Apple ID is not an @icloud.com / @me.com address, also set ICLOUD_MAIL_ADDRESS to your iCloud Mail address (Mail only).

Changing your Apple ID password revokes every app-specific password — the usual reason a working setup suddenly returns "credentials rejected". After a definitive rejection the server stops sending that password — for 24 hours or until you change it, across restarts too (it records a digest of the rejected pair, never the password) — because repeated failed sign-ins can lock an Apple ID.

Reminders are not available: since iOS 13, iCloud Reminders no longer sync over CalDAV (see Not supported).

Apple Developer key — Apple Music (official), Apple Maps, WeatherKit

These three need a paid Apple Developer Program membership.

  1. In Certificates, Identifiers & Profiles, create the identifiers for the services you want: a Media ID (Apple Music), a Maps ID (Apple Maps), and a Services ID for WeatherKit.
  2. Under Keys, create a key and tick Media Services (MusicKit), MapKit JS and/or WeatherKit. One key can carry all three. Download the .p8 (you only get one chance).
  3. Set APPLE_TEAM_ID, APPLE_KEY_ID and APPLE_PRIVATE_KEY (the .p8 contents — multi-line PEM, a one-line value with \n escapes, or base64 all work). For WeatherKit also set APPLE_WEATHERKIT_SERVICE_ID. Separate keys per service are supported with APPLE_MUSIC_KEY_ID / APPLE_MUSIC_PRIVATE_KEY, APPLE_MAPS_… and APPLE_WEATHERKIT_….

The server signs short-lived tokens itself (12 hours for Apple Music, 1 hour for Maps and WeatherKit).

Apple Music — your library (official API): a Music User Token

Catalog search works with the developer key alone. Your library and playlists also need a Music User Token, which Apple only issues through an interactive MusicKit sign-in in a browser. With the developer key set, run:

bash
npx apple-icloud-mcp music-auth

It opens a page on 127.0.0.1, you click Sign in with Apple Music, and it prints APPLE_MUSIC_USER_TOKEN=…. Put that value in APPLE_MUSIC_USER_TOKEN. It lasts about six months, is tied to the developer key that minted it, and changing your Apple ID password revokes it.

Someone without the developer key (another person on a shared deployment) never needs the .p8. The key's owner runs npx apple-icloud-mcp music-auth --print-developer-token --days 7 and sends them the short-lived token it prints; they run APPLE_MUSIC_DEVELOPER_TOKEN=<that token> npx apple-icloud-mcp music-auth on their own machine, sign in, and keep the user token it prints. The developer token expires on its own; the user token keeps working with the server's key.

Apple Music — web-player mode (opt-in, unofficial)

Apple's official API cannot rename or delete playlists, remove or reorder tracks, or remove anything from your library. Apple's own web player can. Web-player mode uses that same private API with your browser session:

  1. Sign in at music.apple.com in a desktop browser.
  2. Open the developer tools → Application/Storage → Cookies → https://music.apple.com and copy the value of the media-user-token cookie.
  3. Set it as APPLE_MUSIC_WEB_USER_TOKEN.

The web player's own developer token is read from music.apple.com automatically (and cached). This mode also works with no Apple Developer account. It is unsupported by Apple and may stop working without notice; the tools that need it say so in their descriptions, and their answers report which backend (official or web) served them.

[!TIP] On a Mac, you may not need web-player mode at all. apple-swift-mcp makes the same playlist edits — rename, delete, remove, reorder, sort, dedupe, move into folders — in the local Music.app library through Music's own scripting, with no tokens or developer account. It works on songs already in your library, so a catalog song still needs adding first (apple_music_add_to_library here).

Running on mcp-host

The package ships a mint.yaml that mcp-host reads when you register apple-icloud-mcp:

  • Owner settings (the developer key, APPLE_WRITE_MODE, APPLE_SERVICES, MCP_CONFIRM_SECRET, …) go in the registration's environment — store the private key and confirm secret as secrets.
  • Everything personal (Apple ID, app-specific password, Music tokens, iCloud Mail address, time zone, default calendar, Apple Music storefront) is declared as auth.fields, so mcp-host asks each person when they connect and remembers the answers per person; each caller gets their own process and data directory.
  • State: dataDir holds a few small files (see Security) that keep a scale-to-zero cold start cheap and stop a revoked password or a spent confirmation token from being reused after a restart.
  • Egress: only the Apple hosts this server calls (api.music.apple.com, amp-api.music.apple.com, music.apple.com, caldav.icloud.com, contacts.icloud.com, *.icloud.com, imap.mail.me.com, smtp.mail.me.com, maps-api.apple.com, weatherkit.apple.com, itunes.apple.com, rss.marketingtools.apple.com). HTTPS goes through the runner's proxy via Node's built-in fetch; IMAP and SMTP are tunnelled through the same proxy with HTTP CONNECT.

Give it your time zone (DISPLAY_TZ): the runner is on UTC, and times you give without an offset ("3pm") are read in DISPLAY_TZ — so are calendar events stored without a time zone of their own ("floating"), whatever timeZone a call passes. Confirmation tokens survive a restart on their own: mcp-host gives a child with a dataDir a stable per-child key (MCP_HOST_CONFIRM_SECRET), so a preview approved after the child idled out (or was redeployed) still works. Spent tokens are recorded on disk, so none can be replayed. An owner-set MCP_CONFIRM_SECRET takes precedence over the host's key.

Tools

59 tools. Mode is the lowest APPLE_WRITE_MODE that registers the tool; Confirm marks tools that ask first (details); 🌐 marks Apple Music tools that need web-player mode.

Health

ToolWhat it doesModeConfirm
apple_healthcheckCheck which Apple services (Apple Music, iCloud Calendar, Contacts, Mail, Apple Maps, WeatherKit, iTunes) are configured and reachable.read

Apple Music

ToolWhat it doesModeConfirm
apple_music_search_catalogSearch Apple Music's catalog by text for songs, albums, artists, playlists, music videos or stations.read
apple_music_get_catalog_itemsLook up Apple Music catalog songs, albums, artists, playlists, music videos or stations by id — or songs/music videos by ISRC, albums by UPC.read
apple_music_get_chartsGet Apple Music's top charts (most played songs, albums, playlists, music videos) for a storefront, optionally for one genre.read
apple_music_list_playlistsList the playlists in your Apple Music library (alphabetical), or the contents of one playlist folder (folders and playlists).read
apple_music_get_playlistRead one playlist — a library playlist (p.…) or a catalog playlist (pl.…) — with its tracks in order.read
apple_music_list_foldersList the playlist folders in your Apple Music library: the top level, or the sub-folders of one folder.read
apple_music_search_librarySearch YOUR Apple Music library (not the whole catalog) by text for songs, albums, artists, playlists or music videos.read
apple_music_list_libraryList what is in your Apple Music library: all songs, albums, artists or music videos (alphabetical, paged), or recently-added items.read
apple_music_get_historyYour recent Apple Music listening: recently-played (albums, playlists, stations), recently-played-tracks (songs), recent-stations, or heavy-rotation.read
apple_music_get_recommendationsYour 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
apple_music_get_replayApple 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
apple_music_get_ratingsWhether you have loved or disliked songs, albums, playlists, music videos or stations — catalog or library ids — returning love, dislike or none per id.read
apple_music_create_playlistCreate 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
apple_music_add_playlist_tracksAppend songs (up to 500 catalog or library ids) to the end of one of your library playlists.additive
apple_music_create_folderCreate a playlist folder in your Apple Music library, at the top level or inside another folder.all
apple_music_add_to_libraryAdd catalog songs, albums, playlists or music videos to your Apple Music library by catalog id (up to 100 per type).additive
apple_music_add_favoritesMark catalog songs, albums, playlists, artists or music videos as favorites (the star in Apple Music; favorite songs go to your Favorite Songs playlist), by catalog id, up to 100 per type.additive
apple_music_set_ratingSet your rating on a song, album, playlist, music video or station (catalog or library id): love, dislike, or none to clear it.all
apple_music_update_playlist 🌐Rename one of your Apple Music library playlists, change its description, or make it public/private.all
apple_music_remove_playlist_tracks 🌐Remove tracks from one of your library playlists by library track id and/or 1-based position (from apple_music_get_playlist).allyes
apple_music_reorder_playlist 🌐Reorder one of your library playlists: move tracks, sort (name, artist, album, release date, duration, date added), reverse, dedupe (keep the first copy of each song), or replace with a complete new order of its track ids (can drop tracks).allyes
apple_music_move_playlist 🌐Move one of your library playlists into a playlist folder, or back to the top level ("root").all
apple_music_delete_playlist 🌐Delete one of your library playlists (songs stay in your library).allyes
apple_music_remove_from_library 🌐Remove songs, albums, music videos or playlists from your Apple Music library by LIBRARY id (i.…, l.…, p.… from apple_music_list_library / apple_music_search_library), up to 50 at a time; the preview names each item.allyes
apple_music_remove_favorites 🌐Remove the favorite (star) from catalog songs, albums, playlists, artists or music videos, by catalog id, up to 100 per type.all

iCloud Calendar

ToolWhat it doesModeConfirm
apple_calendar_list_calendarsList your iCloud calendars (event calendars only): id, name, color, whether you can add events to it, whether it is shared (shared: with you by someone else; sharedByYou: by you with others), and which one new events go into by default.read
apple_calendar_list_eventsList iCloud Calendar events (appointments, meetings) in a date window, recurring events expanded into occurrences, sorted by start.read
apple_calendar_search_eventsSearch iCloud Calendar events by text (case-insensitive match in title, location or notes) within a date window: fromDate (default today; may be in the past) + toDate or daysAhead (default 30), max 366 days.read
apple_calendar_get_eventGet one iCloud Calendar event in full (notes untruncated, attendees, alerts, recurrence rule in plain English) by the id list/search returned.read
apple_calendar_create_eventCreate an iCloud Calendar event: title, startDate/endDate (timed default 1 hour; all-day endDate = last day), location, notes, url, alarms, recurrence, attendees.additivewith attendees
apple_calendar_update_eventChange an iCloud Calendar event: title, startDate/endDate, isAllDay, location, notes, url ("" clears), alarms, attendees (full new list), calendar (moves it).allwith attendees
apple_calendar_delete_eventDelete an iCloud Calendar event. Recurring: span thisEvent (default; the one occurrence an "#occ=" id names), futureEvents (it and all later ones) or allEvents (the whole series).allyes
apple_calendar_find_free_timeFind free time in your iCloud calendars: open slots per day within working hours (workdayStart/workdayEnd, default 09:00–17:00, weekdays only by default) at least minDurationMinutes long (default 30).read

iCloud Contacts

ToolWhat it doesModeConfirm
apple_contacts_searchSearch the user's iCloud Contacts (address book) by name, nickname, company, job title, email, or phone number digits — optionally only within one contact group.read
apple_contacts_getGet one iCloud contact in full by id (from apple_contacts_search): names, organization, job title, emails, phones, postal addresses and URLs — each with its label and an entryId that apple_contacts_update can target — birthday, note, the…read
apple_contacts_list_groupsList the contact groups in iCloud Contacts (e.g. Family, Work): each group's id, name and member count.read
apple_contacts_createCreate a new contact in iCloud Contacts. Needs a givenName, familyName or organization; optional middleName, nickname, department, jobTitle, note, birthday (YYYY-MM-DD, or --MM-DD without a year), and lists of emails, phones, urls and po…additive
apple_contacts_updateEdit an existing iCloud contact in place. Scalar fields (givenName, familyName, middleName, nickname, organization, department, jobTitle, note, birthday) replace the current value; "" clears it.all
apple_contacts_deletePermanently delete one contact from iCloud Contacts (on every device) by id.allyes

iCloud Mail

ToolWhat it doesModeConfirm
apple_mail_list_mailboxesList the iCloud Mail mailboxes (folders): path, name, special use (inbox, sent, drafts, trash, junk, archive) and, by default, message and unread counts.read
apple_mail_searchSearch emails in one iCloud Mail mailbox (default INBOX) by sender, recipient, subject, full text, received date range, unread and flagged state.read
apple_mail_get_messageRead one iCloud Mail message by uid (from apple_mail_search): headers (from, to, cc, reply-to, date, subject, message-id), the body as plain text (HTML converted to readable text when there is no text part), a truncated flag, and attachm…read
apple_mail_download_attachmentDownload one attachment as an embedded binary resource using its 1-based index from apple_mail_get_message; defaults to 10 MiB, max 20 MiB, and never marks the message read.read
apple_mail_sendSend an email from your iCloud address (to/cc/bcc, subject, text or Markdown body; no attachments).allyes
apple_mail_update_flagsMark iCloud Mail messages read or unread, and flag or unflag them, by uid (1–100 uids from apple_mail_search, one mailbox).all
apple_mail_moveMove iCloud Mail messages (1–100 uids from apple_mail_search, one mailbox) to another mailbox: a path from apple_mail_list_mailboxes or an alias (inbox, archive, trash, junk, sent, drafts).all

Apple Maps

ToolWhat it doesModeConfirm
apple_maps_geocodeTurn an address or place name into coordinates with Apple Maps (geocoding).read
apple_maps_reverse_geocodeFind the street address at a latitude/longitude with Apple Maps (reverse geocoding) — e.g. "where is 37.33,-122.01?".read
apple_maps_searchSearch Apple Maps for places: businesses, points of interest, addresses, landmarks (e.g. "coffee", "EV charger", "Golden Gate Bridge").read
apple_maps_directionsDriving, walking or cycling directions between two places with Apple Maps (addresses or "lat,lng").read
apple_maps_etasTravel time and distance from one point to up to 10 destinations at once with Apple Maps — driving with live traffic, transit, walking or cycling (e.g. "which of these stores is closest by car?").read
apple_maps_lookup_placeLook up Apple Maps places by place id — the id field from apple_maps_search, apple_maps_geocode or apple_maps_reverse_geocode results — 1 to 50 at once.read
apple_maps_snapshot_urlMake a signed link to a static Apple Maps image (PNG): centred on an address or "lat,lng", and/or with pins (each with an optional label, colour and one-character glyph; the map fits the pins when no center is given).read

WeatherKit

ToolWhat it doesModeConfirm
apple_weather_getWeather forecast for a place from Apple Weather (WeatherKit): current conditions, hourly (up to 240 h), daily (up to 10 days), next-hour rain, severe-weather alerts (need countryCode).read
apple_weather_get_alertGet one severe-weather alert's full official text from Apple Weather (WeatherKit), unmodified, by its id (the alerts[].id from apple_weather_get called with countryCode).read

iTunes Search and charts

ToolWhat it doesModeConfirm
apple_itunes_searchSearch Apple's iTunes Store catalog — songs, albums, artists, podcasts and podcast episodes, audiobooks, apps and ebooks — with no Apple account or key.read
apple_itunes_lookupLook up iTunes Store items (no Apple account or key) by ids — 1–200 trackId/collectionId/artistId values, e.g. from apple_itunes_search or an Apple Music link — or by one UPC/EAN (album), ISBN (book) or bundleId (app).read
apple_charts_getApple's current top charts (no Apple account or key): most-played songs, albums, music videos and playlists on Apple Music; top podcasts, trending podcast episodes and top subscriber channels; top free/paid apps and books; top audiobooks.read

Write protection (APPLE_WRITE_MODE)

ValueWhat is registered
noneRead tools only.
additiveReads, plus writes that only add to your own account: create a (private) playlist, 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.
all (default)Everything.

Gated tools are not registered at all below their mode, so no prompt or injected instruction can call them. An unrecognised value fails closed to none. APPLE_SERVICES (comma-separated: music, calendar, contacts, mail, maps, weather, itunes) narrows which services register tools at all.

Confirmation (MCP_CONFIRM_MODE)

Irreversible actions and anything that reaches another person ask for confirmation first: sending mail, deleting an event, contact, playlist or library item, removing or reordering playlist tracks, and creating or changing an event with attendees (iCloud emails them). A client that can show a prompt (Claude Code) asks you directly, unless MCP_CONFIRM_ELICITATION=off. One that cannot (claude.ai) gets a two-step flow: the first call does nothing and returns a preview plus a confirmToken; only a repeat call with that token acts, and it is refused if the target changed in between.

VariableMeaning
MCP_CONFIRM_MODEask-user (default — the model must get your OK before repeating the call), auto (the model may confirm after reviewing the preview), refuse (never). Unknown values mean refuse.
MCP_CONFIRM_ELICITATIONon (default) or off. off never shows a prompt, so every client gets the two-step flow under MCP_CONFIRM_MODE. Set it for a client that says it can prompt but never does (the gated call hangs — opencode 2.0.x). Any other value stays on (with a stderr warning).
MCP_CONFIRM_TTL_SECONDSHow long a token is valid (default 600).
MCP_CONFIRM_SECRETToken signing key; random per process by default (on mcp-host, the host's per-child MCP_HOST_CONFIRM_SECRET beside an absolute MCP_DATA_DIR is used instead). Set it so a token survives a restart; spent tokens are recorded on disk (mcp-utils' shared store, $MCP_DATA_DIR/.mcp-confirm/spent/, or ~/.apple-icloud-mcp/confirm-spent/ without an absolute MCP_DATA_DIR), so none can be replayed. With APPLE_STATE_CACHE=false they are remembered by the process only (a warning says so); if the directory cannot be written, confirmed writes are refused rather than risk a replay.

Environment variables

All optional; each service activates when its credentials are present. Values that are blank, undefined, null or an unexpanded ${VAR} count as unset.

Apple Developer key

VariableMeaning
APPLE_TEAM_IDYour Apple Developer Team ID (10 characters). Needed for Apple Music (official API), Apple Maps and WeatherKit.
APPLE_KEY_IDKey ID of a private key created in Certificates, Identifiers & Profiles → Keys with Media Services (MusicKit), MapKit JS and/or WeatherKit enabled.
APPLE_PRIVATE_KEY 🔒Contents of that key's .p8 file (PEM; one-line values with \n escapes and base64 are accepted).
APPLE_PRIVATE_KEY_PATHLocal installs only: a path to the .p8 file instead of APPLE_PRIVATE_KEY.
APPLE_MUSIC_KEY_IDOptional per-service override of APPLE_KEY_ID for Apple Music (pair with APPLE_MUSIC_PRIVATE_KEY).
APPLE_MUSIC_PRIVATE_KEY 🔒Optional per-service override of APPLE_PRIVATE_KEY for Apple Music.
APPLE_MAPS_KEY_IDOptional per-service override of APPLE_KEY_ID for Apple Maps.
APPLE_MAPS_PRIVATE_KEY 🔒Optional per-service override of APPLE_PRIVATE_KEY for Apple Maps.
APPLE_WEATHERKIT_KEY_IDOptional per-service override of APPLE_KEY_ID for WeatherKit.
APPLE_WEATHERKIT_PRIVATE_KEY 🔒Optional per-service override of APPLE_PRIVATE_KEY for WeatherKit.
APPLE_WEATHERKIT_SERVICE_IDWeatherKit only: the Services ID registered for WeatherKit (e.g. com.example.weather).

Apple Music

VariableMeaning
APPLE_MUSIC_DEVELOPER_TOKEN 🔒Optional: a pre-minted Apple Music developer token (JWT) instead of signing one from the key above.
APPLE_MUSIC_USER_TOKEN 🔒Music User Token for your library (official API), from a one-time MusicKit sign-in: npx apple-icloud-mcp music-auth. Without the Apple Developer key, ask the owner for a developer token (music-auth --print-developer-token) and run it with APPLE_MUSIC_DEVELOPER_TOKEN set. Lasts ~6 months.
APPLE_MUSIC_WEB_USER_TOKEN 🔒Opt-in web-player mode (no developer account needed; unlocks rename/delete/remove/reorder): the media-user-token cookie from a signed-in music.apple.com tab.
APPLE_MUSIC_WEB_DEVELOPER_TOKEN 🔒Optional override for the web-player developer token (normally read automatically from music.apple.com).
APPLE_MUSIC_STOREFRONTTwo-letter Apple Music storefront (e.g. us, gb). Default: your account's storefront, else us.

iCloud

VariableMeaning
ICLOUD_USERNAMEYour Apple ID email, for iCloud Calendar, Contacts and Mail.
ICLOUD_APP_PASSWORD 🔒An app-specific password from appleid.apple.com → Sign-In and Security → App-Specific Passwords (NOT your Apple ID password).
ICLOUD_MAIL_ADDRESSYour @icloud.com address, only if your Apple ID email is not an iCloud address (needed for Mail).
ICLOUD_DEFAULT_CALENDARCalendar new events go to when none is named (default: the first writable event calendar).

Behaviour

VariableMeaning
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".
APPLE_SERVICESComma-separated services to enable (music, calendar, contacts, mail, maps, weather, itunes). Default: all.
DISPLAY_TZIANA 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.
APPLE_UNITS"metric" (default) or "imperial" units for weather (Maps distances always show both).
APPLE_STATE_CACHESet 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.
APPLE_REQUEST_TIMEOUT_MSPer-request timeout in milliseconds (default 30000).
APPLE_DEBUG_LOGSet to 1 to log every upstream request line to stderr (credentials redacted).

Confirmation

VariableMeaning
MCP_CONFIRM_MODEHow confirm-gated writes (send mail, deletes, removing tracks, invitations) behave on a client with no prompt, like claude.ai: "ask-user" (default: preview + confirmToken, the model must get your OK), "auto", or "refuse". Unknown values mean refuse.
MCP_CONFIRM_ELICITATION"off" never shows a confirmation prompt, so every client gets the MCP_CONFIRM_MODE flow. Set it for a client that says it can prompt but never does (the gated call hangs, e.g. opencode 2.0.x). Any other value stays "on" (with a stderr warning).
MCP_CONFIRM_TTL_SECONDSLifetime of a confirmToken in seconds (default 600).
MCP_CONFIRM_SECRET 🔒Signing key for confirmTokens. Random per process by default; set it so a token issued just before a restart or redeploy still works (spent tokens are recorded on disk, so none can be replayed).

🔒 = a secret: store it as one.

Not supported (and why)

  • Reminders, Notes, Find My, iCloud Drive, Photos, Hide My Email. None has a public API or a standard protocol that still works: iCloud Reminders left CalDAV with iOS 13. The only route is iCloud.com's private API, which needs your full Apple ID password, an SRP sign-in and a two-factor code, has broken four times in about two years, is blocked by Advanced Data Protection, and is exactly the "automated means" the iCloud Terms forbid. On a Mac, apple-swift-mcp covers Reminders, Notes and Photos natively.
  • Playing music. Apple's web APIs manage your library; playback happens in an Apple Music app.
  • Creating or deleting calendars — iCloud's CalDAV server does not reliably support it.
  • Mail attachment sending — outgoing mail carries no attachments. Incoming attachments can be downloaded with apple_mail_download_attachment.

Troubleshooting

Run apple_healthcheck first. For each service it reports whether credentials are configured (and which variables to set if not), whether Apple accepted them just now, the active write mode and the display time zone.

The same check runs from a terminal, with no MCP client involved — useful before wiring the server into Claude, or to tell a credential problem from a client problem. It reads the shell environment only, not the env block of .mcp.json, Claude Desktop's config or the extension's settings, so export the same values first:

bash
printf 'App-specific password: '; read -rs ICLOUD_APP_PASSWORD; echo   # not echoed, kept out of shell historyexport ICLOUD_APP_PASSWORD [email protected]npx -y apple-icloud-mcp doctor                  # every enabled servicenpx -y apple-icloud-mcp doctor calendar mail    # only thesenpx -y apple-icloud-mcp doctor --json           # the apple_healthcheck report as JSON

It exits 0 when every configured service works (and every service named on the command line is configured, enabled and working), 1 otherwise, and 2 for a usage error. It sends each configured service one read-only request (the iCloud ones one at a time, so a revoked password is sent once), and prints no secrets. From a source checkout, node dist/index.js doctor also reads the repo's .env.

SymptomLikely cause
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.
Apple Music 401Developer key problem: wrong Team/Key ID, or the key lacks MusicKit. In web mode: the media-user-token cookie expired — copy a fresh one.
Apple Music 403The 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).
PLAYLIST_CHANGEDApple 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.
Times are off by hoursSet DISPLAY_TZ to your IANA zone.
Mail times out on a hosted deploymentCheck imap.mail.me.com / smtp.mail.me.com are in the egress allowlist.

APPLE_DEBUG_LOG=1 logs every upstream request line to stderr, with credentials redacted.

Security

  • Credentials are read from the environment at call time and never written to disk, logged, or put in a URL; every error and log line is scrubbed of every credential the process has used.

  • Only Apple's hosts are contacted; a redirect or DAV href pointing anywhere else is refused before any credential travels.

  • Reading mail never marks it read (apple_mail_update_flags does that when asked). HTML mail is converted to text with hidden content dropped, and mail and calendar text is labelled as content from its sender.

  • Local data: small files under $MCP_DATA_DIR/.apple-icloud-mcp/ (or ~/.apple-icloud-mcp/), all mode 0600 and none holding your password or tokens:

    • music-web-token.json — Apple Music web player's own public developer token (web mode only);
    • dav-calendar.json, dav-contacts.json — iCloud discovery URLs, bound to the credential they came from;
    • mail-login.json — which IMAP login form iCloud accepted;
    • icloud-rejected.json — salted digests of rejected Apple ID/password pairs and when, so a revoked password is not re-sent for 24 hours even after a restart;
    • confirm-spent/ — one file per used confirmation token (its random id and expiry), so none can be replayed after a restart. Hosted with an absolute MCP_DATA_DIR, this lives in mcp-utils' shared $MCP_DATA_DIR/.mcp-confirm/spent/ instead.

    Delete the directory to remove them, or set APPLE_STATE_CACHE=false to never write them (the latch and the spent-token record then last only as long as the process, and a warning says so).

Development

bash
npm run build        # tsc → dist/, then esbuild bundle → dist/bundle.jsnpm test             # typecheck + vitestnpm run test:coverage  # 100% line/branch/function/statement coverage is enforced

See CLAUDE.md for the architecture and docs/APPLE-API.md for the provenance of every Apple API detail.

License

MIT

來源:README.md,提交 d35a037

工具

59

apple_healthcheck

Check Apple service credentials and connectivity

Check which Apple services (Apple Music, iCloud Calendar, Contacts, Mail, Apple Maps, WeatherKit, iTunes) are configured and reachable. For each: whether credentials are set (and which variables to set if not), and whether Apple accepted them on a cheap read-only request. Also reports the write mode and display time zone. Run this first when a tool fails or to see what this server can do.

輸入參數services

apple_music_search_catalog

Search the Apple Music catalog

Search Apple Music's catalog by text for songs, albums, artists, playlists, music videos or stations. Results are grouped by type, each group with its own returned/hasMore/nextOffset, and carry catalog ids other tools take (e.g. to add songs to a playlist). Up to 25 per type per call. Needs an Apple Developer key (APPLE_TEAM_ID, APPLE_KEY_ID, APPLE_PRIVATE_KEY) or web-player mode (APPLE_MUSIC_WEB_USER_TOKEN).

輸入參數term必填viewlimittypesoffsetstorefront

apple_music_get_catalog_items

Look up Apple Music catalog items

Look up Apple Music catalog songs, albums, artists, playlists, music videos or stations by id — or songs/music videos by ISRC, albums by UPC. A single album or playlist also returns its track list (paged); a single artist can include views such as top-songs or latest-release. Reports ids Apple did not return. Needs an Apple Developer key or web-player mode.

輸入參數idsupcisrctype必填viewviewsstorefronttracksLimittracksOffset

apple_music_get_charts

Get Apple Music charts

Get Apple Music's top charts (most played songs, albums, playlists, music videos) for a storefront, optionally for one genre. Each chart has its own returned/hasMore/nextOffset and ranked items with catalog ids. Needs an Apple Developer key or web-player mode.

輸入參數viewchartgenrelimittypesoffsetstorefront

apple_music_list_playlists

List your Apple Music playlists

List the playlists in your Apple Music library (alphabetical), or the contents of one playlist folder (folders and playlists). Each has its library id (p.…), name, description, canEdit, isPublic, hasCatalog, dateAdded and lastModifiedDate. Paged. Needs APPLE_MUSIC_USER_TOKEN with an Apple Developer key, or web-player mode (APPLE_MUSIC_WEB_USER_TOKEN).

輸入參數viewlimitoffsetfolderId

apple_music_get_playlist

Read an Apple Music playlist and its tracks

Read one playlist — a library playlist (p.…) or a catalog playlist (pl.…) — with its tracks in order. Each track has its 1-based position, library id, catalogId, name, artist, album and duration. Paged (up to 300 per call), or allTracks for the whole list (up to 5000); a complete read returns a revision (for reorder/remove tracks' expectedRevision). Library playlists need APPLE_MUSIC_USER_TOKEN or web-player mode.

輸入參數viewlimitoffsetallTracksplaylistId必填storefront

apple_music_list_folders

List your Apple Music playlist folders

List the playlist folders in your Apple Music library: the top level, or the sub-folders of one folder. Each has its folder id (p.…, for apple_music_list_playlists folderId, apple_music_create_folder parentFolderId and apple_music_move_playlist), name and dateAdded, plus how many playlists sit directly in the folder. Needs APPLE_MUSIC_USER_TOKEN or web-player mode.

輸入參數folderId

apple_music_search_library

Search your Apple Music library

Search YOUR Apple Music library (not the whole catalog) by text for songs, albums, artists, playlists or music videos. Results are grouped by type with library ids (i.… songs, l.… albums, p.… playlists) and each group's returned/hasMore/nextOffset. Up to 25 per type. Needs APPLE_MUSIC_USER_TOKEN or web-player mode.

輸入參數term必填viewlimittypesoffset

apple_music_list_library

List your Apple Music library

List what is in your Apple Music library: all songs, albums, artists or music videos (alphabetical, paged), or recently-added items. Items carry library ids and, for songs, the catalogId. Needs APPLE_MUSIC_USER_TOKEN or web-player mode.

輸入參數kind必填viewlimitoffset

apple_music_get_history

Get your Apple Music listening history

Your recent Apple Music listening: recently-played (albums, playlists, stations), recently-played-tracks (songs), recent-stations, or heavy-rotation. Apple gives no play timestamps or counts here and pages recently-played 10 at a time and tracks 30 at a time (this tool pages for you; only about the last 50 items are reachable). Needs APPLE_MUSIC_USER_TOKEN or web-player mode.

輸入參數feed必填viewlimitoffset

apple_music_get_recommendations

Get your Apple Music 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). Needs APPLE_MUSIC_USER_TOKEN or web-player mode.

輸入參數viewlimitoffset

apple_music_get_replay

Get your Apple Music 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). Needs APPLE_MUSIC_USER_TOKEN or web-player mode; a specific year uses an undocumented Apple endpoint that works most reliably in web-player mode.

輸入參數viewyearlimitviews

apple_music_get_ratings

Get your Apple Music ratings (love / dislike)

Whether you have loved or disliked songs, albums, playlists, music videos or stations — catalog or library ids — returning love, dislike or none per id. Needs APPLE_MUSIC_USER_TOKEN or web-player mode.

輸入參數ids必填type必填

apple_music_create_playlist

Create an Apple Music 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). Returns the new playlist id (p.…) and checks it by re-reading (Apple can take a few seconds to show it). Needs APPLE_MUSIC_USER_TOKEN or web-player mode.

輸入參數name必填tracksfolderIdisPublicdescription

apple_music_add_playlist_tracks

Add tracks to an Apple Music playlist

Append songs (up to 500 catalog or library ids) to the end of one of your library playlists. By default skips songs already in the playlist (matched by catalog id; refused while Apple does not show your last change to it yet). Refuses playlists you cannot edit (Apple-curated or collaborative). Verifies the new tracks show. Needs APPLE_MUSIC_USER_TOKEN or web-player mode.

輸入參數tracks必填playlistId必填skipDuplicates

apple_music_create_folder

Create an Apple Music playlist folder

Create a playlist folder in your Apple Music library, at the top level or inside another folder. Returns the new folder id (p.…) for apple_music_create_playlist / apple_music_move_playlist. Needs APPLE_MUSIC_USER_TOKEN or web-player mode.

輸入參數name必填parentFolderId

apple_music_add_to_library

Add songs, albums or playlists to your Apple Music library

Add catalog songs, albums, playlists or music videos to your Apple Music library by catalog id (up to 100 per type). Apple answers only "accepted": it silently ignores ids it cannot add and new items can take a while to appear, so check later with apple_music_search_library. Needs APPLE_MUSIC_USER_TOKEN or web-player mode.

輸入參數songsalbumsplaylistsmusicVideos

apple_music_add_favorites

Favorite songs, albums, playlists or artists in Apple Music

Mark catalog songs, albums, playlists, artists or music videos as favorites (the star in Apple Music; favorite songs go to your Favorite Songs playlist), by catalog id, up to 100 per type. Apple answers only "accepted" and silently ignores ids it cannot favorite. Needs APPLE_MUSIC_USER_TOKEN or web-player mode.

輸入參數songsalbumsartistsplaylistsmusicVideos

apple_music_set_rating

Love or dislike an Apple Music item

Set your rating on a song, album, playlist, music video or station (catalog or library id): love, dislike, or none to clear it. Always sends the rating (Apple's reads can lag its writes); returns the previous rating as read and verifies the new one. Needs APPLE_MUSIC_USER_TOKEN or web-player mode.

輸入參數id必填type必填rating必填

apple_music_update_playlist

Rename an Apple Music playlist or change its description

Rename one of your Apple Music library playlists, change its description, or make it public/private. Returns the previous values and verifies the change. Refused while Apple does not show your last change to the playlist yet (the update sends every field back, so it would undo it). Uses Apple's web-player API (unofficial; needs APPLE_MUSIC_WEB_USER_TOKEN).

輸入參數nameisPublicplaylistId必填description

apple_music_remove_playlist_tracks

Remove tracks from an Apple Music playlist

Remove tracks from one of your library playlists by library track id and/or 1-based position (from apple_music_get_playlist). Apple removes EVERY copy of a track, so removing one copy of a duplicate is refused (use apple_music_reorder_playlist). Takes expectedRevision, returns the new revision. Uses Apple's web-player API (unofficial; needs APPLE_MUSIC_WEB_USER_TOKEN). Asks the user to confirm first: a confirmation prompt where the client supports one; otherwise the first call performs NO write and returns a preview of exactly what would happen plus a confirmToken, and only a repeat call with that token proceeds (see MCP_CONFIRM_MODE).

輸入參數trackIdspositionsplaylistId必填confirmTokenexpectedRevision

apple_music_reorder_playlist

Reorder, sort, dedupe or rewrite an Apple Music playlist

Reorder one of your library playlists: move tracks, sort (name, artist, album, release date, duration, date added), reverse, dedupe (keep the first copy of each song), or replace with a complete new order of its track ids (can drop tracks). Takes expectedRevision, returns the new revision. Uses Apple's web-player API (unofficial; needs APPLE_MUSIC_WEB_USER_TOKEN). Asks the user to confirm first: a confirmation prompt where the client supports one; otherwise the first call performs NO write and returns a preview of exactly what would happen plus a confirmToken, and only a repeat call with that token proceeds (see MCP_CONFIRM_MODE).

輸入參數bycounttrackIdsoperation必填descendingplaylistId必填toPositionconfirmTokenfromPositionexpectedRevision

apple_music_move_playlist

Move an Apple Music playlist into a folder

Move one of your library playlists into a playlist folder, or back to the top level ("root"). Checks the folder exists and verifies the playlist appears in it. Uses Apple's web-player API (unofficial; needs APPLE_MUSIC_WEB_USER_TOKEN).

輸入參數folderId必填playlistId必填

apple_music_delete_playlist

Delete an Apple Music playlist

Delete one of your library playlists (songs stay in your library). For an Apple playlist saved to your library, this removes it from your library. The preview shows its name, track count and date added; verifies it is gone. Uses Apple's web-player API (unofficial; needs APPLE_MUSIC_WEB_USER_TOKEN). Asks the user to confirm first: a confirmation prompt where the client supports one; otherwise the first call performs NO write and returns a preview of exactly what would happen plus a confirmToken, and only a repeat call with that token proceeds (see MCP_CONFIRM_MODE).

輸入參數playlistId必填confirmToken

apple_music_remove_from_library

Remove songs, albums or playlists from your Apple Music library

Remove songs, albums, music videos or playlists from your Apple Music library by LIBRARY id (i.…, l.…, p.… from apple_music_list_library / apple_music_search_library), up to 50 at a time; the preview names each item. Uses Apple's web-player API (unofficial; needs APPLE_MUSIC_WEB_USER_TOKEN). Asks the user to confirm first: a confirmation prompt where the client supports one; otherwise the first call performs NO write and returns a preview of exactly what would happen plus a confirmToken, and only a repeat call with that token proceeds (see MCP_CONFIRM_MODE).

輸入參數ids必填type必填confirmToken

apple_music_remove_favorites

Unfavorite songs, albums, playlists or artists in Apple Music

Remove the favorite (star) from catalog songs, albums, playlists, artists or music videos, by catalog id, up to 100 per type. Apple answers only "accepted" and offers no way to read favorites back. Uses Apple's web-player API (unofficial; needs APPLE_MUSIC_WEB_USER_TOKEN).

輸入參數songsalbumsartistsplaylistsmusicVideos

apple_calendar_list_calendars

List your iCloud calendars

List your iCloud calendars (event calendars only): id, name, color, whether you can add events to it, whether it is shared (shared: with you by someone else; sharedByYou: by you with others), and which one new events go into by default. Use the name or id with the other apple_calendar_* tools. Needs ICLOUD_USERNAME and ICLOUD_APP_PASSWORD (an app-specific password).

無需輸入參數。

apple_calendar_list_events

List iCloud Calendar events in a date range

List iCloud Calendar events (appointments, meetings) in a date window, recurring events expanded into occurrences, sorted by start. Window: fromDate (default today) + toDate (exclusive) or daysAhead (default 7), max 366 days; the window is always stated. Filter by calendars; page with limit/offset (totalMatched, nextOffset). Rows are compact by default (see view). Each event has an id for get/update/delete. Dates are ISO-8601: YYYY-MM-DD or YYYY-MM-DDTHH:MM[:SS], optional Z or ±HH:MM. An offset-less time is wall clock in timeZone (default DISPLAY_TZ), never UTC; a stored floating one is read in DISPLAY_TZ.

輸入參數viewlimitoffsettoDatefromDatetimeZonecalendarsdaysAhead

apple_calendar_search_events

Search iCloud Calendar events

Search iCloud Calendar events by text (case-insensitive match in title, location or notes) within a date window: fromDate (default today; may be in the past) + toDate or daysAhead (default 30), max 366 days. Only that window is searched, and the response says so. Returns matching occurrences sorted by start, with ids; rows are compact by default (see view). Dates are ISO-8601: YYYY-MM-DD or YYYY-MM-DDTHH:MM[:SS], optional Z or ±HH:MM. An offset-less time is wall clock in timeZone (default DISPLAY_TZ), never UTC; a stored floating one is read in DISPLAY_TZ.

輸入參數viewlimitquery必填offsettoDatefromDatetimeZonecalendarsdaysAhead

apple_calendar_get_event

Get an iCloud Calendar event

Get one iCloud Calendar event in full (notes untruncated, attendees, alerts, recurrence rule in plain English) by the id list/search returned. An id ending in "#occ=…" is that one occurrence; a bare recurring id describes the series. includeIcs adds the raw iCalendar (lines unfolded, account ids redacted).

輸入參數eventId必填timeZoneincludeIcs

apple_calendar_create_event

Create an iCloud Calendar event

Create an iCloud Calendar event: title, startDate/endDate (timed default 1 hour; all-day endDate = last day), location, notes, url, alarms, recurrence, attendees. Goes into calendar, else ICLOUD_DEFAULT_CALENDAR, else the first writable calendar not shared with others; a shared one is named (APPLE_WRITE_MODE=additive refuses it, and attendees). With attendees it asks first (iCloud emails them): a prompt where the client supports one, else the first call performs NO write and returns a preview plus a confirmToken for a repeat call (MCP_CONFIRM_MODE). Without attendees the first call creates the event immediately.

輸入參數urlnotestitle必填alarmsendDatecalendarisAllDaylocationtimeZoneattendeesstartDate必填recurrence另有 1 個

apple_calendar_update_event

Change an iCloud Calendar event

Change an iCloud Calendar event: title, startDate/endDate, isAllDay, location, notes, url ("" clears), alarms, attendees (full new list), calendar (moves it). Recurring: span thisEvent (default, "#occ=" id), futureEvents (splits the series) or allEvents. Returns before/after. If the event has or gets attendees it asks first (iCloud emails them): a prompt where the client supports one, else the first call performs NO write and returns a preview plus a confirmToken for a repeat call (MCP_CONFIRM_MODE). Without attendees the first call changes the event immediately.

輸入參數urlspannotestitlealarmsendDateeventId必填calendarisAllDaylocationtimeZoneattendees另有 2 個

apple_calendar_delete_event

Delete an iCloud Calendar event

Delete an iCloud Calendar event. Recurring: span thisEvent (default; the one occurrence an "#occ=" id names), futureEvents (it and all later ones) or allEvents (the whole series). Calendar has no trash. If the event has attendees iCloud emails them a cancellation. Asks the user to confirm first: a confirmation prompt where the client supports one; otherwise the first call performs NO write and returns a preview of exactly what would happen plus a confirmToken, and only a repeat call with that token proceeds (see MCP_CONFIRM_MODE).

輸入參數spaneventId必填timeZoneconfirmToken

apple_calendar_find_free_time

Find free time in your iCloud Calendar

Find free time in your iCloud calendars: open slots per day within working hours (workdayStart/workdayEnd, default 09:00–17:00, weekdays only by default) at least minDurationMinutes long (default 30). Busy = events not marked free, not cancelled and not declined by you; all-day events block only with includeAllDay (then even marked free). Nothing before now is offered. Window max 31 days. Dates are ISO-8601: YYYY-MM-DD or YYYY-MM-DDTHH:MM[:SS], optional Z or ±HH:MM. An offset-less time is wall clock in timeZone (default DISPLAY_TZ), never UTC; a stored floating one is read in DISPLAY_TZ.

輸入參數toDatefromDatetimeZonecalendarsdaysAheadworkdayEndweekdaysOnlyworkdayStartincludeAllDayminDurationMinutes

apple_contacts_get

Get an iCloud contact

Get one iCloud contact in full by id (from apple_contacts_search): names, organization, job title, emails, phones, postal addresses and URLs — each with its label and an entryId that apple_contacts_update can target — birthday, note, the contact groups it belongs to, whether it has a photo, and when it was last modified. Requires ICLOUD_USERNAME + ICLOUD_APP_PASSWORD (an app-specific password).

輸入參數timeZonecontactId必填

apple_contacts_list_groups

List iCloud contact groups

List the contact groups in iCloud Contacts (e.g. Family, Work): each group's id, name and member count. Pass a group name to apple_contacts_search to list its members. Requires ICLOUD_USERNAME + ICLOUD_APP_PASSWORD (an app-specific password).

無需輸入參數。

apple_contacts_create

Create an iCloud contact

Create a new contact in iCloud Contacts. Needs a givenName, familyName or organization; optional middleName, nickname, department, jobTitle, note, birthday (YYYY-MM-DD, or --MM-DD without a year), and lists of emails, phones, urls and postal addresses, each with an optional label (home, work, mobile, other or custom text). Returns the new contact's id and details as re-read from iCloud (verified). Requires ICLOUD_USERNAME + ICLOUD_APP_PASSWORD (an app-specific password). Available when APPLE_WRITE_MODE is additive or all.

輸入參數noteurlsemailsphonesbirthdayjobTitlenicknameaddressesgivenNamedepartmentfamilyNamemiddleName另有 1 個

apple_contacts_update

Edit an iCloud contact

Edit an existing iCloud contact in place. Scalar fields (givenName, familyName, middleName, nickname, organization, department, jobTitle, note, birthday) replace the current value; "" clears it. emails/phones/urls/addresses take change objects {action: add|remove|replace} aimed at one entry by entryId (from apple_contacts_get) or current value; an absent target is a reported no-op listing what is there. The rest of the card is kept byte-for-byte. Returns before/after, re-read to verify. Requires ICLOUD_USERNAME + ICLOUD_APP_PASSWORD (an app-specific password). Needs APPLE_WRITE_MODE=all.

輸入參數noteurlsemailsphonesbirthdayjobTitlenicknameaddressescontactId必填givenNamedepartmentfamilyName另有 2 個

apple_contacts_delete

Delete an iCloud contact

Permanently delete one contact from iCloud Contacts (on every device) by id. The preview shows its name, organization, emails and phones. Requires ICLOUD_USERNAME + ICLOUD_APP_PASSWORD (an app-specific password). Needs APPLE_WRITE_MODE=all. Asks the user to confirm first: a confirmation prompt where the client supports one; otherwise the first call performs NO write and returns a preview of exactly what would happen plus a confirmToken, and only a repeat call with that token proceeds (see MCP_CONFIRM_MODE).

輸入參數contactId必填confirmToken

apple_mail_list_mailboxes

List iCloud Mail mailboxes

List the iCloud Mail mailboxes (folders): path, name, special use (inbox, sent, drafts, trash, junk, archive) and, by default, message and unread counts. Use the path (or an alias) as `mailbox` in the other apple_mail_* tools. Needs ICLOUD_USERNAME + ICLOUD_APP_PASSWORD (app-specific password), and ICLOUD_MAIL_ADDRESS unless the Apple ID is an @icloud.com/@me.com/@mac.com address.

輸入參數counts

apple_mail_get_message

Read an iCloud Mail message

Read one iCloud Mail message by uid (from apple_mail_search): headers (from, to, cc, reply-to, date, subject, message-id), the body as plain text (HTML converted to readable text when there is no text part), a truncated flag, and attachment names/types/sizes (no attachment contents). Never marks the message read; to do that, use apple_mail_update_flags with seen:true. Needs ICLOUD_USERNAME + ICLOUD_APP_PASSWORD (app-specific password), and ICLOUD_MAIL_ADDRESS unless the Apple ID is an @icloud.com/@me.com/@mac.com address.

輸入參數uid必填mailboxmaxCharstimeZoneuidValidity

apple_mail_download_attachment

Download an iCloud Mail attachment

Download one attachment from an iCloud Mail message as an embedded binary resource. Use the 1-based index shown by apple_mail_get_message. Reads the message without marking it read. Defaults to a 10 MiB attachment limit (maximum 20 MiB). Needs ICLOUD_USERNAME + ICLOUD_APP_PASSWORD (app-specific password), and ICLOUD_MAIL_ADDRESS unless the Apple ID is an @icloud.com/@me.com/@mac.com address.

輸入參數uid必填mailboxmaxBytesuidValidityattachmentIndex必填

apple_mail_send

Send an email from iCloud Mail

Send an email from your iCloud address (to/cc/bcc, subject, text or Markdown body; no attachments). Body ≤ 20,000 chars, all shown for confirmation. inReplyTo {mailbox, uid} threads a reply ("Re:" subject; quoteOriginal quotes it), warning if the original's Reply-To is not a recipient. Saved to Sent. Needs ICLOUD_USERNAME + ICLOUD_APP_PASSWORD. Asks the user to confirm first: a confirmation prompt where the client supports one; otherwise the first call performs NO write and returns a preview of exactly what would happen plus a confirmToken, and only a repeat call with that token proceeds (see MCP_CONFIRM_MODE).

輸入參數ccto必填bccbody必填formatsubjecttimeZoneinReplyToconfirmTokenquoteOriginal

apple_mail_update_flags

Mark iCloud Mail read/unread or flagged

Mark iCloud Mail messages read or unread, and flag or unflag them, by uid (1–100 uids from apple_mail_search, one mailbox). Only messages not already in the requested state are changed; the result is re-read to verify and lists each message's state and any uids that were not found. Needs ICLOUD_USERNAME + ICLOUD_APP_PASSWORD (app-specific password), and ICLOUD_MAIL_ADDRESS unless the Apple ID is an @icloud.com/@me.com/@mac.com address.

輸入參數seenuids必填flaggedmailboxuidValidity

apple_mail_move

Move iCloud Mail messages

Move iCloud Mail messages (1–100 uids from apple_mail_search, one mailbox) to another mailbox: a path from apple_mail_list_mailboxes or an alias (inbox, archive, trash, junk, sent, drafts). Moving to trash is recoverable from Deleted Messages. Returns the new uids and verifies the messages left the source. Needs ICLOUD_USERNAME + ICLOUD_APP_PASSWORD (app-specific password), and ICLOUD_MAIL_ADDRESS unless the Apple ID is an @icloud.com/@me.com/@mac.com address.

輸入參數uids必填mailboxdestination必填uidValidity

apple_maps_geocode

Geocode an address (Apple Maps)

Turn an address or place name into coordinates with Apple Maps (geocoding). Returns matching places with latitude/longitude, a one-line address, country code and a place id (for apple_maps_lookup_place). Use it first when a tool needs coordinates (apple_maps_etas, apple_weather_get). Optional: limit to countries, bias toward a nearby point, response language. Needs an Apple Developer key with MapKit JS enabled: APPLE_TEAM_ID + APPLE_KEY_ID + APPLE_PRIVATE_KEY (or APPLE_MAPS_KEY_ID / APPLE_MAPS_PRIVATE_KEY).

輸入參數langnearviewaddress必填limitToCountries

apple_maps_reverse_geocode

Find the address at coordinates (Apple Maps)

Find the street address at a latitude/longitude with Apple Maps (reverse geocoding) — e.g. "where is 37.33,-122.01?". Returns the place(s) at that point: one-line address, name, country code and place id. Needs an Apple Developer key with MapKit JS enabled: APPLE_TEAM_ID + APPLE_KEY_ID + APPLE_PRIVATE_KEY (or APPLE_MAPS_KEY_ID / APPLE_MAPS_PRIVATE_KEY).

輸入參數langviewlatitude必填longitude必填

apple_maps_directions

Get directions (Apple Maps)

Driving, walking or cycling directions between two places with Apple Maps (addresses or "lat,lng"). Traffic-aware travel time for now or a given departure/arrival time. Returns each route's distance (mi and km), duration, tolls, estimated arrival (or leave-by time) and turn-by-turn steps; view "full" adds route geometry. Options: avoid tolls (a preference, not a guarantee), alternate routes. Needs an Apple Developer key with MapKit JS enabled: APPLE_TEAM_ID + APPLE_KEY_ID + APPLE_PRIVATE_KEY (or APPLE_MAPS_KEY_ID / APPLE_MAPS_PRIVATE_KEY).

輸入參數langnearvieworigin必填timeZoneavoidTollsarrivalDatedestination必填departureDatetransportTypealternateRoutes

apple_maps_etas

Travel times to several destinations (Apple Maps)

Travel time and distance from one point to up to 10 destinations at once with Apple Maps — driving with live traffic, transit, walking or cycling (e.g. "which of these stores is closest by car?"). Coordinates only ("lat,lng"): geocode addresses first with apple_maps_geocode. Returns per destination: distance, travel time with and without traffic, and estimated arrival. Needs an Apple Developer key with MapKit JS enabled: APPLE_TEAM_ID + APPLE_KEY_ID + APPLE_PRIVATE_KEY (or APPLE_MAPS_KEY_ID / APPLE_MAPS_PRIVATE_KEY).

輸入參數vieworigin必填timeZonearrivalDatedestinations必填departureDatetransportType

apple_maps_lookup_place

Look up places by id (Apple Maps)

Look up Apple Maps places by place id — the id field from apple_maps_search, apple_maps_geocode or apple_maps_reverse_geocode results — 1 to 50 at once. Returns each place's name, category, coordinates, address, phone and website; ids Apple could not resolve are listed with the reason. Needs an Apple Developer key with MapKit JS enabled: APPLE_TEAM_ID + APPLE_KEY_ID + APPLE_PRIVATE_KEY (or APPLE_MAPS_KEY_ID / APPLE_MAPS_PRIVATE_KEY).

輸入參數langviewplaceIds必填

apple_maps_snapshot_url

Make a static map image link (Apple Maps)

Make a signed link to a static Apple Maps image (PNG): centred on an address or "lat,lng", and/or with pins (each with an optional label, colour and one-character glyph; the map fits the pins when no center is given). Choose zoom, size (up to 640x640), scale, map type (standard, hybrid, satellite, mutedStandard) and light/dark. Returns the URL only — nothing is downloaded; the link can be made to expire. Uses the same Apple Developer key (MapKit JS): APPLE_TEAM_ID, APPLE_KEY_ID, APPLE_PRIVATE_KEY.

輸入參數langsizezoomscalecentermapTypeannotationscolorSchemeexpiresInMinutesshowPointsOfInterest

apple_weather_get

Get the weather forecast (Apple Weather)

Weather forecast for a place from Apple Weather (WeatherKit): current conditions, hourly (up to 240 h), daily (up to 10 days), next-hour rain, severe-weather alerts (need countryCode). Returns temperature, feels-like, rain/snow chance and amount, wind, humidity, UV, sunrise/sunset. Takes latitude/longitude — use apple_maps_geocode first to turn a place name into coordinates. Days roll over in timeZone: pass the place's own zone when it differs from yours. Needs APPLE_TEAM_ID, APPLE_KEY_ID, APPLE_PRIVATE_KEY and APPLE_WEATHERKIT_SERVICE_ID. Show the returned attribution with the data.

輸入參數dayslangviewhoursunitsdataSetslatitude必填timeZonelongitude必填countryCode

apple_weather_get_alert

Get a severe-weather alert (Apple Weather)

Get one severe-weather alert's full official text from Apple Weather (WeatherKit), unmodified, by its id (the alerts[].id from apple_weather_get called with countryCode). Returns the issuing agency (source), severity, effective/expiry times, detailsUrl and the messages verbatim. Apple serves an alert only while it is active; an expired one is NOT_FOUND. Needs APPLE_TEAM_ID, APPLE_KEY_ID, APPLE_PRIVATE_KEY and APPLE_WEATHERKIT_SERVICE_ID.

輸入參數langviewalertId必填timeZone

apple_itunes_lookup

Look up iTunes Store items by id, UPC, ISBN or bundle id

Look up iTunes Store items (no Apple account or key) by ids — 1–200 trackId/collectionId/artistId values, e.g. from apple_itunes_search or an Apple Music link — or by one UPC/EAN (album), ISBN (book) or bundleId (app). With one item and entity, lists its related items: an album's songs (song), an artist's albums (album), a podcast's episodes (podcastEpisode, newest first; Apple serves at most 200 and fewer for some shows). Ids match Apple Music catalog ids; ids not found are listed. Episode ids cannot be looked up directly.

輸入參數idsupcisbnsortviewlimitentityoffsetcountrybundleId

apple_charts_get

Get Apple top charts

Apple's current top charts (no Apple account or key): most-played songs, albums, music videos and playlists on Apple Music; top podcasts, trending podcast episodes and top subscriber channels; top free/paid apps and books; top audiobooks. Returns ranked entries (rank, id, name, artist, release date, genres, store link) for one storefront (two-letter country code; default APPLE_MUSIC_STOREFRONT, else us), up to the top 100. Song, album and podcast ids work with apple_itunes_lookup and Apple Music.

輸入參數viewchart必填limitoffsetstorefront

版本歷史

13
  1. v0.5.0最新Nov 12, 2026
  2. v0.4.0Nov 4, 2026
  3. v0.3.7Oct 20, 2026
  4. v0.3.6Oct 16, 2026
  5. v0.3.5Oct 11, 2026
  6. v0.3.4Oct 10, 2026
  7. v0.3.3Oct 7, 2026
  8. v0.3.2Oct 5, 2026
  9. v0.3.1Oct 3, 2026
  10. v0.3.0Sep 30, 2026
  11. v0.2.1Sep 29, 2026
  12. v0.2.0Sep 28, 2026
  13. v0.1.0Sep 27, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分