convez.ai
MCP ServerIntegração & APIsIntermediário
davenadkarni

Apple Music MCP

davenadkarni/apple-music-mcp

Controle Apple Music via Claude — criar playlists, importar de Spotify

Ver no GitHub
InicialPluginScore · de 0 a 100

Servidor MCP que permite controlar sua biblioteca do Apple Music via Claude — criar playlists, importar de Spotify e setlist.fm, e gerenciar músicas conversando. Usa Playwright para automação no navegador sem necessidade de chaves de API.

Instalação

$npx convez-ai davenadkarni/apple-music-mcp

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
0
Forks
0
Acompanhando
0
Saúde
42%
Último commit
há 3 meses
Versão
—
Issues abertas
0
Contribuidores
3

Casos de uso

  • Criar e gerenciar playlists conversando com Claude
  • Importar playlists do Spotify automaticamente para Apple Music
  • Gerar playlists a partir de setlists de shows do setlist.fm
  • Buscar e adicionar músicas à biblioteca por comando de voz/texto

Veredito

Integração funcional e bem-documentada com Apple Music via MCP, oferecendo automação prática de playlists. Exige Apple Music ativo e configuração inicial de autenticação, mas funciona sem dependências de API oficial — abordagem criativa usando Playwright.

README

A tradução para o português deste README ainda está na fila.

Apple Music MCP

A Model Context Protocol server that lets Claude control your Apple Music library — search songs, create playlists, import from Spotify or setlist.fm, and more.

What it does

  • Search for songs in the Apple Music catalog
  • Create, rename, and delete playlists
  • Add songs to playlists
  • Get your playlists and folders, move playlists into folders
  • Import from Spotify — paste a Spotify playlist URL and it recreates it in Apple Music
  • Import from setlist.fm — paste a setlist URL and it builds the playlist from the concert setlist

How it works

The server uses Playwright to drive a headless Chromium browser authenticated as you on music.apple.com. It calls MusicKit JS APIs directly from within the page, just like the web player does — no Apple Developer account or API keys needed.

For Spotify imports, it intercepts the Spotify GraphQL API responses to extract track listings, then searches Apple Music for each song.

Setup

Prerequisites

  • Python 3.12+
  • uv (recommended) or pip
  • A valid Apple Music subscription

Install

git clone https://github.com/davenadkarni/apple-music-mcp.git
cd apple-music-mcp
uv sync
uv run playwright install chromium

Authorize

Run this once to sign into Apple Music and save your browser session:

uv run python auth.py

A browser window will open. Sign into Apple Music, then press Enter in the terminal. Your session is saved to ~/.config/apple-music-mcp/browser_state.json and never committed to git.

Configure Claude Code

Add to your claude_desktop_config.json (or Claude Code MCP settings):

{
  "mcpServers": {
    "apple-music": {
      "command": "uv",
      "args": ["run", "python", "server.py"],
      "cwd": "/path/to/apple-music-mcp"
    }
  }
}

Then restart Claude Code.

Available tools

ToolDescription
search_songsSearch the Apple Music catalog
get_my_playlistsList all your library playlists
get_foldersList your playlist folders
create_playlistCreate a new playlist
rename_playlistRename a playlist
delete_playlistDelete a playlist
get_playlist_tracksGet the tracks in a playlist
add_songs_to_playlistAdd songs to a playlist by search query
move_playlists_to_folderMove playlists into a folder
import_from_spotifyImport a Spotify playlist by URL
import_from_setlistfmImport a concert setlist from setlist.fm by URL
set_playlist_artworkAttempt to set playlist artwork (experimental — Apple's web API does not officially support this)

Notes

  • Rate limiting: Apple Music search has a per-session rate limit. Large imports (500+ songs) may hit it; the server will report how many songs were successfully matched.
  • Session expiry: If tools stop working, re-run auth.py to refresh your browser session.
  • Spotify matching: Track matching uses fuzzy search — remaster/edition suffixes are stripped automatically. Expect ~90–95% match rates on typical playlists.
  • move_playlists_to_folder — UI refresh: The tool works correctly, but occasionally the Apple Music web player sidebar won't update immediately. If a playlist doesn't appear in the folder right away, try dragging any one playlist manually in the Music desktop app to trigger a sync.

Security

browser_state.json contains your Apple Music session cookies. It is excluded from git via .gitignore and stored only at ~/.config/apple-music-mcp/browser_state.json on your machine.

Ver o original no GitHub

Bom para

Relacionados