mcpField
A
applemusic-mcp

applemusic-mcp

Local
github.com/ephetersonGames & Entertainment123Updated 5d ago

About applemusic-mcp

applemusic-mcp is an MCP server for managing Apple Music from MCP clients, including libraries, playlists, playback, and queues. It offers selectable access levels across the Mac app, Apple Music API, and web player, and runs on macOS, Windows, and Linux.

Key features

  1. 01Manage playlists, folders, and tracks
  2. 02Search the library and Apple Music catalog
  3. 03Get recommendations, charts, and listening history
  4. 04Control playback, volume, and the Up Next queue
  5. 05Limit accessible features by permission level

Use cases

  1. 01Organize or migrate Apple Music playlists
  2. 02Find tracks and add them to a library
  3. 03Play an album and adjust the Up Next queue

MCP support

Exposes tools to MCP clients for working with Apple Music catalogs, playlists, libraries, playback, and the Up Next queue. Depending on its configured access level, it uses Music.app, the Apple Music API, or a web player.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"epheterson-applemusic": {
"command": "uvx",
"args": [
"applemusic-mcp"
]
}
}
}
Run commanduvx applemusic-mcp

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
pypiapplemusic-mcp0.21.0

Tools

7

Saved tool list · updated 5d ago

ParameterTypeRequiredDescription
fullbooleanNo
namestringNo
albumstringNo
limitintegerNo
querystringNo
trackstringNo
actionstringNo
artiststringNo
exportstringNo
filterstringNo
folderstringNo
formatstringNo
offsetintegerNo
sourcestringNo
verifybooleanNo
dry_runbooleanNo
replacestringNo
auto_addanyNo
new_namestringNo
playliststringNo
descriptionstringNo
fetch_explicitanyNo
allow_duplicatesbooleanNo

Details

From the project README

applemusic-mcp

Release License macOS Python Downloads MCP

MCP server for Apple Music. It gives any MCP client (Claude, Cursor, Cline, Windsurf) control of your playlists, library, catalog, discovery, playback, and the Up Next queue. Runs on macOS, Windows, and Linux.

A Mac or an Apple Music subscription is all you need.

"Create a playlist called Road Trip and fill it with upbeat 90s alternative." · "Play my workout playlist on shuffle, and queue up Bohemian Rhapsody next." · "What have I been listening to lately, and what's topping the charts?"

Choose how much it can reach

You decide what this server may touch, in your MCP client's config. The assistant can't change it, and tools that need more than you allowed aren't offered to it at all.

--levelIt can reachGood for
musicOnly the Music app on your Mac. No network, no browser.Your library, playlists, playback, ratings, AirPlay
api+ Apple's music service over the internetSearching and adding from the full catalog, recommendations, Windows and Linux
web+ a Safari or Chrome web playerThe Up Next queue, and playback off the Mac
fullEverything, including clicking inside the Music appEvery feature, nothing to decide
--allow-ui (with any level)+ clicking inside the Music app (macOS Accessibility)Playing catalog songs with no sign-in

Start with music and move up when you want a feature that needs more. Leaving --level off is the same as full for now, as before 0.21.

For a Mac app with a guided setup instead of a terminal command, consider the community fork secure-applemusic-mcp-for-osx.

Features

What each engine can do, and the level that turns it on. ✓ supported, ✗ not possible there, — not applicable.

CapabilityMusic.app (macOS) · musicApple Music API (any OS) · apiWeb player (Safari / Chrome) · web
Catalog search / browse✓✓ (+ tokenless resolve)—
Recommendations / charts / suggestions✗✓—
Library search / browse✓✓—
Genre search✓✗—
Recently played / added✓✓—
Add catalog → library✓✓✓ (in-page POST)
Remove from library✓✓—
Love / dislike✓✓—
1–5 star ratings✓✗✗
Favorites list✓✗✗
Playlist create / add / remove / rename✓✓—
Playlist copy✓✗—
Playlist delete✓✓ (web token)—
Folders: single level + move in/out✓✓—
Folders: nested paths / tree / path✓✗✗
Playback: play song / album / playlist / URL✓—✓
Controls: pause / stop / next / prev / seek✓—✓
Settings: volume / shuffle / repeat✓—✓
now_playing✓—✓
Up Next queue: view / next / last / remove / jump / clear / autoplay✗—✓
Reveal in app✓—✓ (navigates page)
AirPlay device select✓✗✗
Library snapshot / integrity✓✗✗
Works with no Apple account✓✗✗
Cross-platform (Win/Linux)✗✓✓

Music.app's catalog search and catalog play click inside the app, so at a set level they also need --allow-ui. Playback and the queue in a web player need a desktop session: Safari on a Mac (nothing to install) or Google Chrome elsewhere. How the engines are picked and overridden: configuration.

Setup

Requirements: Python 3.10+, plus a Mac or an Apple Music subscription. On a Mac nothing else is needed. The Chrome web player (Windows, Linux, or opt-in on a Mac) needs Google Chrome.

Claude Code, one line:

claude mcp add "Apple Music" -- uvx applemusic-mcp serve --level music

Claude Desktop / Cursor / Cline / Windsurf, install once, then add the config block:

pipx install applemusic-mcp        # or: pip install applemusic-mcp
playwright install chromium        # the Chrome web player: Windows/Linux, or a Mac with the [browser] extra
{
  "mcpServers": {
    "Apple Music": {
      "command": "applemusic-mcp",
      "args": ["serve", "--level", "music"]
    }
  }
}

Change music to api or web to unlock more; on Windows or Linux start at api, since music needs a Mac. Config file locations, the Chrome web player on a Mac, and source installs: configuration.

Restart your client and try "List my Apple Music playlists" or "Play my favorites." On macOS the local library and playback work immediately. To add catalog music or run on any OS, sign in.

Sign in

Needed for api and web. Your password never touches this tool, and sign-in persists.

applemusic-mcp login            # Mac: reads your signed-in Safari. Windows/Linux: opens Chrome
applemusic-mcp status           # verify

On a Mac, sign in at music.apple.com in Safari first and turn on Safari's Develop → Allow JavaScript from Apple Events once; login tells you exactly what's missing. For bulk work (playlist imports, library migrations), use your own Apple developer token to avoid the shared rate limit. Details, the Chrome and developer-token paths, and which API each write uses: signing in.

Tools

Seven action-based tools keep the MCP context small. Each takes an action and routes to the right engine.

ToolActions
playlistlist, folders, tracks, search, create, add, copy, move, remove, delete, rename, path (playlists and folders)
librarysearch, add, browse, favorites, recently_played, recently_added, rate, remove, snapshot
catalogsearch, resolve, album_tracks, album_details, song_details, artist_details, genres, suggestions
discoverrecommendations, heavy_rotation, charts, top_songs, similar_artists, personal_station, song_station
playbackplay (track / album / playlist / URL), control, now_playing, settings, reveal, airplay
queuelist, set, play_next, play_last, remove, jump, clear, autoplay (Up Next — Safari on macOS, Chrome elsewhere; engine= to pick)
configstatus, signin, logout, reset, set-pref, audit-log, clear-audit-log, list-storefronts

Batching, importing playlists, dry runs, export formats and storefronts: usage patterns.

CLI

applemusic-mcp serve --level music   # run the MCP server (your client calls this)
applemusic-mcp login                 # web sign-in (macOS: Safari; Windows/Linux: Chrome)
applemusic-mcp login --chrome        # use the Chrome web player on a Mac
applemusic-mcp login --dev           # your own Apple developer token (.p8)
applemusic-mcp logout                # sign out (switch accounts)
applemusic-mcp status                # auth status and permission level
applemusic-mcp reset --force         # wipe credentials (keeps your .p8 key file)
applemusic-mcp reset --all --force   # full uninstall: also removes the .p8, profile, and cache

Good to know

  • Playing catalog songs in Music.app needs --allow-ui, an unlocked screen and Accessibility permission. It clicks Play inside the app. Songs already in your library don't need any of this. Or, at --level web, set mode="safari" to play in Safari instead.
  • Safari playback needs one real click to start. The first time you play in a freshly-opened or reloaded Safari tab, the browser requires a genuine click before it will start audio (a standard autoplay rule — we don't fake it). Click ▶ once in the Apple Music tab, then play/pause/next all work hands-free. If a play command reports the queue is ready but the track sits at 0:00, that's this — give the tab one click.
  • Brand-new playlists take a moment to be addable over the API (cloud propagation). Existing ones are immediate.
  • If catalog actions start failing, re-run applemusic-mcp login. A handful of user playlists silently revert AppleScript edits (known Music.app bug); the server detects and surfaces the rollback.

Star History

Star History Chart


License

MIT · Unofficial community project — not affiliated with or endorsed by Apple. Uses your own Apple Music account for personal use; follow Apple's terms.

mcp-name: io.github.epheterson/applemusic-mcp

Credits

FastMCP · Apple MusicKit · Model Context Protocol


Built with ❤️ in California by @epheterson and Claude Code.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.