Apple Music MCP

Apple Music MCP

Controls Apple Music on macOS via AppleScript, enabling playback, lyrics retrieval, playlist management, and catalog search through an MCP interface.

Category
Visit Server

README

šŸŽµ Apple Music MCP

An MCP (Model Context Protocol) server that lets AI assistants control Apple Music on macOS — play, pause, skip, read lyrics, manage playlists, and search the catalog.

Built for Claude Desktop and Claude Code. Works with any MCP-compatible client.

<p align="center"> <img src="demo.gif" alt="Apple Music MCP demo" width="600" /> </p>

What It Does

Tool Description
get_current_track Now playing info — title, artist, album, progress
get_lyrics Time-synced lyrics via LRCLIB → NetEase Cloud Music fallback
control_playback Play, pause, toggle, next, previous, stop
create_playlist Create a new playlist
add_to_playlist Add the current track to a playlist (works with subscription tracks)
list_playlists List all user playlists
search_tracks Search library + Apple Music catalog
search_and_add Find a track and add it to a playlist in one call

How It Works

The server bridges your AI assistant to Apple Music through three layers:

AppleScript → Music.app — All playback control and playlist operations go through macOS's native AppleScript interface. The server sends commands to Music.app directly — no Apple Music API keys, no web auth, no token management. If Music.app can do it, this server can do it.

Lyrics: LRCLIB → NetEase fallback — When your AI asks for lyrics, the server tries LRCLIB first (strong English coverage), then falls back to NetEase Cloud Music for Chinese and Asian-language songs. Both are free, no API keys required. Results are time-synced and returned with the current playback position so your AI knows which line is playing now.

Architecture — The design was informed by netease-music-mcp's approach to lyrics retrieval. We extended it with Apple Music's native AppleScript integration and a dual-source lyrics fallback for broader language coverage.

Requirements

  • macOS (uses AppleScript under the hood)
  • Python 3.10+
  • Apple Music with an active subscription or local library

Installation

git clone https://github.com/yauyuuue-commits/apple-music-mcp.git
cd apple-music-mcp
python3 -m venv .venv
source .venv/bin/activate
pip install -e .

Setup

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "apple-music": {
      "command": "/ABSOLUTE/PATH/TO/apple-music-mcp/.venv/bin/python",
      "args": ["-m", "apple_music_mcp"]
    }
  }
}

āš ļø Replace /ABSOLUTE/PATH/TO/ with the actual path where you cloned the repo.

Claude Code

claude mcp add apple-music -- /ABSOLUTE/PATH/TO/apple-music-mcp/.venv/bin/python -m apple_music_mcp

Quick Test

After setup, open a new Claude conversation and say "what song is playing?" — if Claude returns track info from Apple Music, you're good to go.

Lyrics

The get_lyrics tool fetches time-synced lyrics with a two-tier fallback:

  1. LRCLIB — community lyrics database, good English coverage
  2. NetEase Cloud Music — fills gaps for Chinese and other Asian-language songs

No API keys needed. Coverage varies — some songs won't have synced lyrics on either source.

Card Display (Optional & Customizable)

This MCP gives your AI the raw tools. What it does with them is up to you.

For example, we built a Tinder-style swipe card UI for music discovery — Claude listens to each song, reads the lyrics, decides if it likes it, and shows an animated card that swipes right (save) or left (skip). See the demo above for what this looks like in action.

The card display is not part of this MCP server. It lives in the AI's conversation as a prompt-driven behavior. If you want something similar, design it together with your Claude — that's half the fun. The data structure is simple: song title, artist, a lyrics snippet, and a verdict. The visual style is yours to create.

Known Limitations

  • macOS only — AppleScript doesn't exist on Windows or Linux
  • Subscription tracks — add_to_playlist works with subscription tracks by copying them to your library first, but there's a brief delay (~4s)
  • Library-only search for search_and_add — if a track isn't in your library, it returns the catalog match but can't add it directly. Play it first, then use add_to_playlist
  • Lyrics coverage — LRCLIB + NetEase covers most popular songs, but niche or very new tracks may not have synced lyrics available

Project Structure

apple-music-mcp/
ā”œā”€ā”€ README.md
ā”œā”€ā”€ LICENSE
ā”œā”€ā”€ pyproject.toml
└── src/
    └── apple_music_mcp/
        ā”œā”€ā”€ __init__.py
        ā”œā”€ā”€ __main__.py
        └── server.py      ← all 8 tools live here

Acknowledgments

Lyrics integration inspired by luuu h's netease-music-mcp — the NetEase fallback approach for Chinese lyrics coverage came from studying that project.

License

MIT — see LICENSE.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured