Skip to main content
Glama

Apple Music MCP

MCP server for controlling Apple Music on macOS. Uses JXA (JavaScript for Automation) to talk to Music.app directly — no API keys or authentication needed.

Install

Requires Bun and macOS.

Claude Desktop / Claude Code

Add to your MCP config:

{
  "mcpServers": {
    "apple-music": {
      "command": "bunx",
      "args": ["apple-music-mcp"]
    }
  }
}

From source

git clone https://github.com/lucasilverentand/apple-music-mcp.git
cd apple-music-mcp
bun install
bun run src/index.ts

Related MCP server: apple-music-mcp

Tools

Playback

Tool

Description

get_player_state

Current track, position, volume, shuffle & repeat state

play_pause

Toggle play/pause

next_track

Skip to next track

previous_track

Go to previous track

set_volume

Set volume (0–100)

set_shuffle

Enable/disable shuffle

set_repeat

Set repeat mode (off, one, all)

Search & Browse

Tool

Description

search_tracks

Search library by name, artist, or album

get_track_details

Full metadata for a track by persistent ID

get_tracks_by_criteria

Filter tracks by genre, BPM, year, play count, artist, favorites

get_library_stats

Aggregated stats: genres, top artists, most played, decades

Playlists

Tool

Description

list_playlists

List all playlists with track counts

get_playlist_tracks

Get tracks from a playlist (paginated)

create_playlist

Create a playlist or folder

create_smart_playlist

Create a playlist from filter criteria in one step

add_to_playlist

Add tracks to a playlist by persistent ID

remove_from_playlist

Remove tracks from a playlist

delete_playlist

Delete a playlist

move_playlist_to_folder

Move a playlist into a folder

Playback Control

Tool

Description

play_track

Play a specific track by persistent ID

play_playlist

Start playing a playlist by name

Track Actions

Tool

Description

favorite

Favorite/unfavorite a track

dislike

Dislike/un-dislike a track

set_rating

Rate a track (0–5 stars)

add_to_library

Add the currently playing track to your library

set_bpm

Manually tag BPM on a track

Wikidata Lookup

Tool

Description

wikidata_lookup

Look up a song on Wikidata for rich metadata: genres, musical key, BPM, record label, producers, songwriters, ISRC, Spotify/MusicBrainz IDs, and Wikipedia summary

How it works

The server shells out to osascript -l JavaScript (JXA) to control Music.app. Track persistentID is the stable identifier used across all tools. Streaming tracks from Apple Music have bpm: 0 — use set_bpm to tag them manually, or use wikidata_lookup to find the BPM.

Requirements

  • macOS (uses Music.app via JXA)

  • Bun runtime

License

MIT

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Allows controlling Apple Music on macOS through an MCP server that supports playback control, volume adjustment, and music search functionality.
    2
    MIT
  • F
    license
    Not graded
    quality
    A
    maintenance
    Enables MCP clients to search and browse the Apple Music catalog, manage library items, ratings, favorites and playlists with nested folders, and control playback, volume, shuffle, repeat and the Up Next queue. Runs via native Music.app, Safari, Chrome, or the Apple Music web API, so it works on macOS, Windows and Linux with just a Mac or an Apple Music subscription.
    -