apple-music-mcp
Provides tools for interacting with Apple Music, including catalog search, fetching catalog resources, library playlist management, adding tracks to playlists, and retrieving recently played and heavy rotation items.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@apple-music-mcpsearch the catalog for 'The Beatles' and show top 10 albums"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
apple-music-mcp
An MCP server for the Apple Music API: search the catalog, build playlists, manage a library.
Status
Shipped — catalog search is verified; library writes need a user token from npm run auth.
Related MCP server: Apple Music
License
Not licensed for reuse.
Status
Built: 2026-04-20
Dev token generation + catalog search: verified working
Library writes (playlists): require user token — run
npm run authonce
Setup
Already done on Mac Mini:
Apple Developer portal → Identifiers → Media ID (
media.com.alexpriest.applemusicmcp)Keys → MusicKit enabled → downloaded
.p8tokeys/AuthKey_68R3STY9CA.p8.envpopulated with Team ID, Key ID, Media ID, key pathnpm install && npm run buildRegistered in
~/.claude.jsonas "Apple Music"
Authorizing the user token
Writes to the library (creating playlists, etc.) require a Music User Token.
cd ~/Code/tools/apple-music-mcp
npm run authOpen http://localhost:7788, click "Sign in with Apple Music", complete the Apple auth flow. The token is saved to .env automatically and the auth server shuts down.
Restart Claude Code after auth to pick up the new env var.
Tools
Tool | Auth | Notes |
| dev only | Full Apple Music catalog |
| dev only | Fetch by type + ID |
| user | User's library |
| user | Library playlists |
| user | By ID — metadata only, no tracks |
| user | Every track in a playlist (auto-pages past Apple's 100/request cap) |
| user | Optional seed tracks |
| user | Append tracks; returns |
| user | Recent tracks |
| user | Most-played |
Troubleshooting
401 on writes → user token expired or missing; rerun
npm run auth.403 on reads → dev token bad; check Team ID / Key ID / Media ID in
.envmatch the Apple Developer portal.Developer tokens expire after 180 days but are auto-regenerated from the
.p8on each server start.Apple returns
204 No Contenton successful playlist writes. Handlers must not feed that empty body toJSON.stringify— it yieldsundefined, not a string, and the MCP result schema then rejects a write that actually succeeded.add_to_playlistsynthesizes its own success object for this reason.A library playlist with zero tracks 404s on
/tracksrather than returning an empty collection.get_playlist_trackstreats that as empty.
This server cannot be deployed
Maintenance
Related MCP Connectors
iTunes Search MCP — Apple's public catalog search
Full Spotify Web API coverage - albums, artists, playlists, player controls, and more.
Search, analyze, and discover commercially released music using sonic intelligence.
Search MusicBrainz artists, releases, works, labels; resolve ISRC/ISWC/barcode; fetch cover art.
Related MCP Servers
- AlicenseAqualityAmaintenanceEnables MCP clients to manage Apple Music playlists end-to-end, including search, playlist creation and editing, metadata and flow auditing, track ordering optimization, and listening statistics, without an Apple Developer account.1465 PyPI2MIT
- FlicenseNot gradedqualityAmaintenanceGives MCP clients control of Apple Music playlists, library, catalog, discovery, playback, and the Up Next queue across macOS, Windows, and Linux, using Music.app, Safari, the Apple Music API, or Chrome.-
- FlicenseNot gradedqualityAmaintenanceEnables MCP clients to search the catalog, manage playlists, folders, and library items, and control playback, ratings, and the Up Next queue across macOS, Windows, and Linux. It selects among native Music.app, Safari, Chrome, and web API engines so an assistant can drive Apple Music with or without a subscription.-
- FlicenseNot gradedqualityAmaintenanceEnables MCP clients to manage Apple Music playlists, library, catalog, discovery, playback, and the Up Next queue across macOS, Windows, and Linux using native Music.app, the Apple Music API, Safari, or Chrome engines.-