# mcp-apple-music

Connects Apple Music to your AI assistant for catalog searches, library browsing, and playlist editing. Useful for managing tracks directly in chat.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 44
- Author: Cifero74
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Cifero74/mcp-apple-music
- Updated: 2026-10-22
- HTML: https://affpapa.org/en/nevibecode/mcp/mcp-apple-music

## What it 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.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Environment variables: `APPLE_TEAM_ID`, `APPLE_KEY_ID`, `APPLE_PRIVATE_KEY`, `APPLE_MUSIC_USER_TOKEN`, `APPLE_STOREFRONT` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
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-server
```
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>

### Codex

**Platform CLI**
```bash
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-server
```
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>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "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>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "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>

### Gemini CLI

**Platform CLI**
```bash
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-server
```
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>

## When to use it
- 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
- 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 `1440857781` as a favorite and append it to my evening playlist.

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
