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: Sound
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 MusicBrainz artists, releases, works, labels; resolve ISRC/ISWC/barcode; fetch cover art.
Read products, sales, subscribers and offer codes; verify, enable and disable product licenses.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceIntegrates Apple Music with MCP clients to search the global catalog, manage personal playlists, and access library data. It enables users to perform actions like creating playlists, adding tracks, and viewing recommendations through natural language commands.1-
- AlicenseNot gradedqualityCmaintenanceApple Music playback control, library search, playlist management, and queue operations via MCP.2MIT
- AlicenseNot gradedqualityDmaintenanceEnables control of Apple Music on macOS, including playback, track info, volume, and more.5MIT
- AlicenseAqualityBmaintenanceEnables searching and managing Spotify playlists, tracks, and user information through the Spotify Web API.10MIT