epheterson/applemusic-mcp

View on GitHub ↗

Apple Music MCP server: playlists, library, catalog, playback and the Up Next queue, on macOS, Windows and Linux. A Mac or an Apple Music subscription is all you need.

83 ★15 forksPythonUpdated 18d ago

What you need to know

MCP server that gives MCP clients control of Apple Music — playlists, library, catalog, discovery, playback, and the Up Next queue — across four per-call engines (Music.app, Apple Music API, Safari, Chrome) on macOS, Windows, and Linux.

Install

uvx applemusic-mcp serve
pipx install applemusic-mcp
pipx install 'applemusic-mcp[browser]'

Usage

  • macOS lightweight path: applemusic-mcp login harvests credentials from signed-in Safari (needs the Safari 'Allow JavaScript from Apple Events' developer toggle), then play via Music.app — no Chrome/Playwright.
  • Cross-platform: install 'applemusic-mcp[browser]' and run playwright install chromium for the Chrome web player (DRM requires a real Chrome install).
  • Prefer the sanctioned route for bulk work: applemusic-mcp login --dev with an Apple Developer MusicKit key (.p8).
  • Set the mode preference (auto/native/safari/chrome/api) conversationally or override a single call with engine=.

Key features

  • Four engines chosen per call: native Music.app (AppleScript), Apple Music API (any OS), Safari MusicKit, and Chrome web player.
  • Seven action-based tools (playlist, library, catalog, discover, playback, queue, config) keep the MCP context small.
  • Catalog search/browse, library management, playlist and folder management, 1-5 star ratings, favorites, and AirPlay (macOS).
  • Up Next queue management, library export to CSV, and an audit log.
  • Native mode works with no Apple account on macOS.

Best for

Controlling your own Apple Music library and playback from Claude, Cursor, Cline, or Windsurf on any OS.

Caveats

  • Requires a Mac or an Apple Music subscription; native playback needs macOS with Accessibility permission and an unlocked screen.
  • Web sign-in uses Apple's shared public web-player token — bulk work hits HTTP 429 with a rolling ~60-minute window and no Retry-After (use --dev for your own quota).
  • Only the client that created a playlist can edit it, so Music.app-made playlists can't be written by the API or web path.
  • Safari playback needs one real click to start (autoplay rule); brand-new playlists take a moment before the API can add tracks.
  • Unofficial community project, not affiliated with Apple; DRM audio needs a real Chrome install because bundled Chromium can't decode it.
Platforms: macOS · Windows · LinuxClients: Claude Desktop · Claude Code · Cursor · Cline · Windsurf

Reviewed 2026-08-18

Topics

apple-musicapplescriptclaudeclaude-codeclaude-desktopcursormacosmcpmcp-servermodel-context-protocolmusicmusickitplaylistpythonwindsurf
Stars
83★
Forks
15
Language
Python
License
MIT
Created
2025-12-19
Last push
2026-08-17