Sign In
Share:

Unofficial MCP server by Eric Pheterson that lets AI assistants search Apple Music, edit your library and playlists, and control playback through Music.app, Safari, Chrome or the Apple Music API.

Security Reviewed

Local MCP server that talks only to Apple's servers, runs AppleScript on macOS, stores tokens in your OS keychain and can change your Apple Music library and playlists; no telemetry found.

Install Apple Music in Google Antigravity

Antigravity reads MCP servers from ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (one project) (official docs).

EasiestOption 1: paste this to your Antigravity agent
Install the "Apple Music" MCP server for Google Antigravity.
Follow the steps at https://www.antigravityskills.org/install/apple-music.md (source: https://github.com/epheterson/applemusic-mcp).
Before running anything, show me what you will download and whether it includes scripts, and wait for my OK.
Ask me for any keys or paths it needs. When done, check that it is listed under Installed MCP Servers.

The agent reads the install file, shows you what it will download and waits for your OK.

Option 2: install it yourself
  1. 1. Install the package
    pipx install applemusic-mcp

    README, Setup. Needs Python 3.10+. Off macOS also run playwright install chromium and install Google Chrome.

  2. 2. Add it to Antigravity's mcp_config.json
    {
      "mcpServers": {
        "apple-music": {
          "command": "applemusic-mcp",
          "args": [
            "serve"
          ]
        }
      }
    }

    Global: ~/.gemini/config/mcp_config.json. One project: .agents/mcp_config.json. This is the README's config block; Antigravity uses the same "mcpServers" format.

  3. 3. Sign in once in a terminal
    applemusic-mcp login

    README, Sign in. Optional on macOS for local library and playback; required for catalog adds and on Windows or Linux.

  4. 4. Check that it loaded

    Open Settings, Customizations, Installed MCP Servers: apple-music should be switched on. Then ask "List my Apple Music playlists".

The README does not mention Antigravity (it names Claude, Cursor, Cline and Windsurf); these steps reuse its documented config. MCP servers are not skills: they do not go in .agents/skills/. Antigravity reads them from ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (one project).

Using Claude Code, Cursor or Codex? See other assistants below.

What is Apple Music?

applemusic-mcp is an unofficial community MCP server (its README says it is not affiliated with Apple) for Apple Music subscribers and Mac users who want Claude, Cursor or another MCP client to manage playlists, search the catalog and control playback. It exposes seven action-based tools (playlist, library, catalog, discover, playback, queue and config) with 58 actions between them (we counted the README Tools table), and routes each call to one of four engines: Music.app through AppleScript on macOS, Apple Music's web API on any OS, your signed-in Safari on macOS, or a local Google Chrome window. We counted the code at the reviewed commit (v0.20.1): about 18,500 lines of Python in 14 modules, server.py alone 9,882 lines, and 2,227 test functions in 29 test files. The repository also ships a 919-line SKILL.md that teaches an agent the AppleScript, UI-automation and MusicKit approaches; the README does not mention it.

How to use Apple Music?

Add the server to your client, restart, and talk to it. On macOS your local library and Music.app playback work right away with no Apple account sign-in; catalog adds and other operating systems need a sign-in. applemusic-mcp login reads your Apple Music token from a signed-in Safari on macOS (after you enable Develop, "Allow JavaScript from Apple Events") or opens Chrome on Windows and Linux; applemusic-mcp login --dev uses your own Apple Developer MusicKit key and is the README's preferred path for bulk work. The mode preference picks the engine: auto (default), native, safari, chrome or api. For imports, the README recommends catalog resolve first (exact ISRC matching, 25 per request) and playlist add with dry_run=True to preview matches and duplicates before writing.

Key features of Apple Music

  • ✓playlist (12 actions): list, create, add, copy, move, remove, delete, rename and folder paths
  • ✓library (9) and catalog (8): search, add, favorites, ratings, recently played, album and artist details, ISRC-based resolve
  • ✓discover (7): recommendations, heavy rotation, charts, similar artists and stations
  • ✓playback (6) and queue (8): play songs, albums, playlists or URLs, controls, now playing, AirPlay, and the Up Next queue
  • ✓config (8): status, sign-in, preferences, storefronts and an audit log of every change it made
  • ✓Export list results as text, JSON or CSV files

When to use Apple Music

  1. 1README example: "Create a playlist called Road Trip and fill it with upbeat 90s alternative." The agent searches the catalog and calls playlist create and add; the README says adds skip duplicates and each write tells you which path (API, web player or Music.app) made each write.
  2. 2README example: "Play my workout playlist on shuffle, and queue up Bohemian Rhapsody next." On a Mac this uses Music.app for playback and Safari for the Up Next queue in the default auto mode.
  3. 3Our example: "Preview adding these 40 tracks from my Spotify export to Road Trip, don't write anything yet." The agent should use catalog resolve with the ISRCs and playlist add with dry_run=True, then show matches and duplicates for you to approve.

Installation & Setup Guide

MCP Server Integration

Follow these steps (taken from the project's own docs) to configure Apple Music in your development environment.

Step 1: Claude Code, one lineClaude Code
claude mcp add "Apple Music" -- uvx applemusic-mcp serve

README, Setup. uvx fetches the newest PyPI release, which may be newer than the v0.20.1 we reviewed.

Step 2: Install the package (Claude Desktop, Cursor, Cline, Windsurf)Claude Desktop / Cursor
pipx install applemusic-mcp

README, Setup. Off macOS also run playwright install chromium and install Google Chrome; macOS needs neither for Safari sign-in and Music.app playback.

Step 3: Add the config blockClaude Desktop / Cursor
{
  "mcpServers": {
    "Apple Music": {
      "command": "applemusic-mcp",
      "args": [
        "serve"
      ]
    }
  }
}

README, Setup. Claude Desktop: ~/Library/Application Support/Claude/claude_desktop_config.json or %APPDATA%\Claude\claude_desktop_config.json. The README says Cursor, Cline and Windsurf use the same mcpServers shape (for Cursor, ~/.cursor/mcp.json per Cursor's docs).

Step 4: Sign inAll
applemusic-mcp login

README, Sign in. macOS reads the token from a signed-in Safari; Windows and Linux open Chrome. Use applemusic-mcp login --dev with an Apple Developer MusicKit key for bulk work.

Step 5: Codex CLI (not in the README)Codex
codex mcp add apple-music -- uvx applemusic-mcp serve

The README does not cover Codex. Syntax from the Codex CLI itself (openai/codex, codex mcp add <NAME> -- <COMMAND>).

Usage Example & Verification

Prompt / Request Example
"Create a playlist called Road Trip and fill it with upbeat 90s alternative." (README Usage example)
Expected Output / Response
The agent calls the catalog tool to find matching songs, then playlist(action="create") and playlist(action="add", track=[...]). The server reports which engine performed each write and records it in the audit log under ~/.cache/applemusic-mcp.
Installation Confirmation Method

README: restart your client and try "List my Apple Music playlists" or "Play my favorites." Run applemusic-mcp status in a terminal to check sign-in.

Security Review

Static review
Reviewed Date
2026-10-13
Audited Ref / Commit
v0.20.1 (commit ca94ca2630cfd721ecf3ff008637c84ae60b0ea0)
Reviewer
antigravityskills.org (static code review)

Local MCP server that talks only to Apple's servers, runs AppleScript on macOS, stores tokens in your OS keychain and can change your Apple Music library and playlists; no telemetry found.

Full review: scope, findings, risks
Audit Scope:At commit ca94ca2 (v0.20.1): README.md, pyproject.toml, SKILL.md (frontmatter and outline), src/applemusic_mcp/paths.py, audit_log.py (header), auth.py (token storage and the localhost authorization server), browser.py (Playwright and Chrome handling), plus a grep of all 14 modules for URLs, subprocess, eval/exec and telemetry; test files counted, not read. scripts/ and .github/workflows/ were not reviewed.
Key Findings:Network: only Apple hosts (music.apple.com, amp-api.music.apple.com, api.music.apple.com, js-cdn.music.apple.com, itunes.apple.com) plus a short-lived authorization page on localhost during login --dev that accepts only its own localhost host and origin. Shell: osascript via subprocess.run on macOS (applescript.py), pgrep and, only when run in an interactive terminal, a one-time python -m playwright install chromium (browser.py). Files: ~/.config/applemusic-mcp (config, credentials, .p8 key), ~/.applemusic-mcp (Chrome profile), ~/.cache/applemusic-mcp (track cache, exports, snapshots, JSONL audit log), all relocatable with APPLEMUSIC_MCP_HOME. Tokens use the OS keychain via keyring, else a 0600 file. No eval/exec and no telemetry found.
Identified Operational Risks & Permissions:It acts in your Apple Music account: it can delete playlists and remove library items when asked (each change is written to the audit log). Safari sign-in needs you to enable "Allow JavaScript from Apple Events", which the README says you can switch off again afterwards. Web sign-in uses Apple's web-player backend, which the README calls a community path rather than the sanctioned API. Static review only; nothing was run.

Static review on 2026-10-13 of epheterson/applemusic-mcp at commit ca94ca2630cfd721ecf3ff008637c84ae60b0ea0 (v0.20.1, MIT). The server (applemusic-mcp serve) exposes seven FastMCP tools. Outbound requests go only to Apple: music.apple.com, amp-api.music.apple.com (web player API), api.music.apple.com (official API with a developer token), js-cdn.music.apple.com (MusicKit JS) and itunes.apple.com. auth.py starts a localhost HTTP server for the developer-token flow with host and origin checks, and writes secrets with mode 0600 or to the OS keychain through keyring. applescript.py runs osascript through subprocess.run; browser.py drives Chrome through Playwright, uses pgrep to find its own profile, and auto-installs Playwright's Chromium only when a terminal is attached. audit_log.py appends every modifying action (library adds and removals, playlist create, delete, rename, ratings, preference changes) to a JSONL file. Persistent state lives under ~/.config/applemusic-mcp, ~/.applemusic-mcp and ~/.cache/applemusic-mcp. No telemetry, eval or exec was found. Dependencies (pyproject.toml): mcp, pyjwt[crypto], requests, cryptography, keyring, Playwright off macOS and pyobjc-framework-Quartz on macOS. Static inspection only: we did not install or run it.

Operational Notes & Known Limitations

Known Limitations

  • •README: native macOS playback needs an unlocked screen and Accessibility permission, because it drives Music.app through System Events and moves the cursor to click Play; mode="safari" avoids that.
  • •README: Safari playback needs one real click in the Apple Music tab the first time; the tool does not fake it.
  • •README: off macOS, playback and the queue need Google Chrome plus Playwright (about 500 MB) and a desktop session, so it is not for headless servers.
  • •README: web sign-in shares Apple's public web-player quota; a few hundred catalog searches in an hour can hit HTTP 429 with a rolling window of about 60 minutes. Use login --dev for imports.
  • •README: star ratings, favorites, library snapshots, AirPlay and nested folders are macOS-only, and only the app that created a playlist can edit it.
  • •Version drift (we checked): we reviewed v0.20.1 (commit ca94ca2, 2026-08-27); the repository HEAD on 2026-10-13 is 0.20.3, and uvx or pipx install the newest release.

Frequently Asked Questions

Is the Apple Music MCP server safe?

In our static review it only contacts Apple hosts (music.apple.com, amp-api.music.apple.com, api.music.apple.com, js-cdn.music.apple.com, itunes.apple.com) and has no telemetry. It runs osascript on macOS, can delete playlists or remove library items when asked, and logs every change to an audit file.

Do I need an Apple Developer account?

No. On macOS, Music.app works with no sign-in, and web sign-in works with a normal Apple Music subscription. A developer MusicKit key is optional and gives you your own API quota.

Does it work on Windows and Linux?

Yes, through the Apple Music API and a local Chrome web player. Music.app-only features such as star ratings and AirPlay are not available there.

How do I add Apple Music to Antigravity?

pipx install applemusic-mcp, add {"command": "applemusic-mcp", "args": ["serve"]} under mcpServers in ~/.gemini/config/mcp_config.json, run applemusic-mcp login, then check Installed MCP Servers.

What does it store on my computer?

Config, credentials and your .p8 key in ~/.config/applemusic-mcp, the Chrome profile in ~/.applemusic-mcp, and cache, exports and the audit log in ~/.cache/applemusic-mcp. Tokens go to the OS keychain when one is available, otherwise to a file readable only by you.

Supported Platforms

claudecursorantigravitycodex