SuperAPI AI Directory

mcp-apple-music

Apple Music integration: search the catalog, browse your library, manage playlists and get personalized recommendations.

Open website

About this tool

mcp-apple-music is an MCP (Model Context Protocol) server that gives Claude full access to an Apple Music account. Through it, users can use natural language to have Claude search the Apple Music catalog, browse their personal music library, manage playlists, and explore listening history and personalized recommendations.

Main Capabilities

  • Search the Apple Music catalog
  • Browse the personal music library
  • Manage playlists (create, add songs, etc.)
  • View listening history and recommendations
  • Supports example prompts, such as:
    • "Based on my recent listening history, recommend 15 songs I don't have yet and add them to a new playlist"
    • "Show me all my playlists and tell me the artist that appears most"
    • "Search for Nick Cave's albums and add my three favorites to a playlist called Dark Picks"

How to Use

Prerequisites

  • uv (recommended) or pip
  • A paid Apple Developer Program membership ($99/year) to create a MusicKit key. A free Apple Developer account cannot create a MusicKit key.
  • An active Apple Music subscription

Steps

  1. Create a MusicKit key:
    • Go to developer.apple.com → Certificates, Identifiers & Profiles
    • Under Keys, click + to create a new key
    • Name it and enable MusicKit, click Continue → Register
    • Download the .p8 file (it can only be downloaded once, so keep it safe)
    • Note the Key ID (e.g. ABC123DEF4) and Team ID (found in Membership Details)
    • Note: The Key ID is the alphanumeric code next to the key name, not the .p8 file name.
  2. Clone and install (the specific commands are not provided in the material).
  3. Run the one-time setup wizard: the wizard will ask for the Team ID, Key ID, and .p8 file path, then open a browser page to click "Authorize Apple Music", use Apple's official MusicKit JS to obtain a Music User Token, and store it securely in ~/.config/mcp-apple-music/config.json (file permissions 600).
  4. Add to Claude Desktop:
    • Open the Claude Desktop configuration: on macOS the path is ~/Library/Application Support/Claude/claude_desktop_config.json
    • Restart Claude Desktop, and you will see the apple-music tool in the toolbar.

Token Mechanism

Apple Music requires two kinds of tokens:

  • Developer Token: a JWT signed locally using the .p8 private key, valid for up to 6 months, and the server automatically regenerates it before expiration. The key never leaves the user's machine.
  • Music User Token: obtained one-time via MusicKit JS OAuth in the browser (handled by the setup wizard), stored locally in ~/.config/mcp-apple-music/config.json.

Limitations

  • Playback control (play/pause/skip) cannot be achieved through the Apple REST API; it requires the native MusicKit framework (iOS/macOS apps) or MusicKit JS in a browser environment.
  • If playback control is needed, see chrome-relay—a companion CLI that lets the MCP server drive an already-open music.apple.com tab in Chrome to achieve play/pause/skip without providing a MusicKit JS shim.

Project Information

  • Built by Cifero74 and Claude (Anthropic) as part of a personal MCP ecosystem for Claude Desktop.
  • Licensed under the MIT License; contributions, issues, and PRs are welcome.
  • The project structure is not described in detail in the material.