mcp-apple-music — Claude Code MCP server: how to install
Connects Apple Music to your AI assistant for catalog searches, library browsing, and playlist editing. Useful for managing tracks directly in chat.
claude mcp add --env APPLE_TEAM_ID=<APPLE_TEAM_ID> --env APPLE_KEY_ID=<APPLE_KEY_ID> --env APPLE_PRIVATE_KEY=<APPLE_PRIVATE_KEY> --env APPLE_MUSIC_USER_TOKEN=<APPLE_MUSIC_USER_TOKEN> --env APPLE_STOREFRONT=<APPLE_STOREFRONT> --transport stdio mcp-apple-music -- uvx mcp-apple-music-serverWhat mcp-apple-music does
Built with FastMCP, this server provides 14 tools to interact with the Apple Music REST API. It allows your assistant to inspect saved tracks and search catalog albums directly in your conversation.
Playback actions like pausing or skipping songs are unsupported because the Apple Music REST API lacks playback endpoints. The server focuses strictly on library data and catalog metadata. Running it demands a paid Apple Developer Program membership at 99 USD per year, as free developer accounts cannot issue MusicKit keys.
Authentication relies on two credentials. A local Developer Token is generated from your .p8 private key and renews automatically before expiration. A separate Music User Token comes from a one-time browser OAuth flow handled by the setup script, which stores it in your local configuration directory.
What it helps with
- generate playlists from recent listening history
- search albums and artists across the catalog
- save catalog tracks directly to the library
- update favorite status for selected songs
Example prompts for the agent
- Check my recent listening history and create a playlist with ten recommended tracks not in my library.
- Find all albums by Joni Mitchell and list which ones are already saved in my collection.
- Mark track
1440857781as a favorite and append it to my evening playlist.
How to install mcp-apple-music
Platform CLI
claude mcp add --env APPLE_TEAM_ID=<APPLE_TEAM_ID> --env APPLE_KEY_ID=<APPLE_KEY_ID> --env APPLE_PRIVATE_KEY=<APPLE_PRIVATE_KEY> --env APPLE_MUSIC_USER_TOKEN=<APPLE_MUSIC_USER_TOKEN> --env APPLE_STOREFRONT=<APPLE_STOREFRONT> --transport stdio mcp-apple-music -- uvx mcp-apple-music-serverReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from mcp-apple-music-server <command>
Platform CLI
codex mcp add mcp-apple-music --env APPLE_TEAM_ID=<APPLE_TEAM_ID> --env APPLE_KEY_ID=<APPLE_KEY_ID> --env APPLE_PRIVATE_KEY=<APPLE_PRIVATE_KEY> --env APPLE_MUSIC_USER_TOKEN=<APPLE_MUSIC_USER_TOKEN> --env APPLE_STOREFRONT=<APPLE_STOREFRONT> -- uvx mcp-apple-music-serverReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from mcp-apple-music-server <command>
Config file
{
"mcpServers": {
"mcp-apple-music": {
"command": "uvx",
"args": [
"mcp-apple-music-server"
],
"env": {
"APPLE_TEAM_ID": "<APPLE_TEAM_ID>",
"APPLE_KEY_ID": "<APPLE_KEY_ID>",
"APPLE_PRIVATE_KEY": "<APPLE_PRIVATE_KEY>",
"APPLE_MUSIC_USER_TOKEN": "<APPLE_MUSIC_USER_TOKEN>",
"APPLE_STOREFRONT": "<APPLE_STOREFRONT>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from mcp-apple-music-server <command>
Config file
{
"servers": {
"mcp-apple-music": {
"type": "stdio",
"command": "uvx",
"args": [
"mcp-apple-music-server"
],
"env": {
"APPLE_TEAM_ID": "<APPLE_TEAM_ID>",
"APPLE_KEY_ID": "<APPLE_KEY_ID>",
"APPLE_PRIVATE_KEY": "<APPLE_PRIVATE_KEY>",
"APPLE_MUSIC_USER_TOKEN": "<APPLE_MUSIC_USER_TOKEN>",
"APPLE_STOREFRONT": "<APPLE_STOREFRONT>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from mcp-apple-music-server <command>
Platform CLI
gemini mcp add -e APPLE_TEAM_ID=<APPLE_TEAM_ID> -e APPLE_KEY_ID=<APPLE_KEY_ID> -e APPLE_PRIVATE_KEY=<APPLE_PRIVATE_KEY> -e APPLE_MUSIC_USER_TOKEN=<APPLE_MUSIC_USER_TOKEN> -e APPLE_STOREFRONT=<APPLE_STOREFRONT> mcp-apple-music uvx mcp-apple-music-serverReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from mcp-apple-music-server <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about mcp-apple-music
How to install mcp-apple-music in Claude Code?
Run `claude mcp add mcp-apple-music -e APPLE_TEAM_ID=<APPLE_TEAM_ID> -e APPLE_KEY_ID=<APPLE_KEY_ID> -e APPLE_PRIVATE_KEY=<APPLE_PRIVATE_KEY> -e APPLE_MUSIC_USER_TOKEN=<APPLE_MUSIC_USER_TOKEN> -- uvx mcp-apple-music-server` in your terminal with your credential values.
Does mcp-apple-music support playback controls?
No. Apple Music REST API endpoints do not support playback operations, making pause and skip actions unavailable.
Why is a paid Apple Developer membership required?
A paid Apple Developer Program subscription costing 99 USD per year is mandatory because free developer tiers cannot create MusicKit keys.