- Home
- MCP servers
- Apple Music
Apple Music
- typescript
0
GitHub Stars
typescript
Language
4 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"popand-applemusicmcp": {
"command": "node",
"args": [
"/absolute/path/to/AppleMusicMCP/dist/index.js"
],
"env": {
"APPLE_MUSIC_KEY_ID": "YOUR_KEY_ID",
"APPLE_MUSIC_TEAM_ID": "YOUR_TEAM_ID",
"APPLE_MUSIC_CONFIG_DIR": "~/.apple-music-mcp/",
"APPLE_MUSIC_STOREFRONT": "us",
"APPLE_MUSIC_PRIVATE_KEY_PATH": "/absolute/path/to/AuthKey.p8"
}
}
}
}You can run an MCP server that integrates with Apple Music to let Claude and other MCP clients search the catalog, manage playlists, access your library, and receive personalized recommendations. This server handles authentication, token management, and communicates with Apple Music APIs to expose a practical set of MCP endpoints for your workflows.
How to use
Once you have the server running, you can connect MCP clients to perform common Apple Music actions. You can search the catalog for songs, albums, artists, and playlists; list and browse your playlists; create new playlists with optional initial tracks; add or remove tracks from playlists; browse your library songs; view recently played tracks; and get personalized recommendations. Before using library-related features, you need to authorize your Apple Music account so the server can access your library and personalized data. Catalog search works without authorization, but library, recently played, and recommendations require authorization.
How to install
# Clone the repository
git clone https://example.com/AppleMusicMCP.git
cd AppleMusicMCP
# Install dependencies
npm install
# Build the TypeScript code
npm run build
# Start the server (example runtime after build)
node dist/index.js
Configuration and running notes
Before starting, set up environment variables for Apple Music integration and server configuration. The following variables are required or optional depending on your setup.
# Required
APPLE_MUSIC_TEAM_ID=YOUR_TEAM_ID
APPLE_MUSIC_KEY_ID=YOUR_KEY_ID
APPLE_MUSIC_PRIVATE_KEY_PATH=/absolute/path/to/AuthKey.p8
# Optional (defaults apply if omitted)
APPLE_MUSIC_STOREFRONT=us
APPLE_MUSIC_CONFIG_DIR=~/.apple-music-mcp/
APPLE_MUSIC_AUTH_PORT=7829
Starting the server with environment configuration
After building, start the server with the required environment variables in place. You can run it from your project root, ensuring the path to the built entry file is correct.
APPLE_MUSIC_TEAM_ID=YOUR_TEAM_ID \
APPLE_MUSIC_KEY_ID=YOUR_KEY_ID \
APPLE_MUSIC_PRIVATE_KEY_PATH=/absolute/path/to/AuthKey.p8 \
node dist/index.js
Available tools
search_music
Search the Apple Music catalog for songs, albums, artists, or playlists with optional type filtering and result limits.
get_user_playlists
List your playlists with paging control to fetch more results as needed.
get_playlist_tracks
Retrieve tracks from a specific playlist by its ID with pagination options.
create_playlist
Create a new playlist with an optional initial set of track IDs.
add_tracks_to_playlist
Append tracks to an existing playlist by ID, up to the maximum limit.
remove_tracks_from_playlist
Remove tracks from a playlist when supported by the API.
get_library_songs
Fetch songs from your Apple Music library with paging controls.
get_recently_played
Retrieve recently played tracks for the authorized user.
get_recommendations
Obtain personalized music recommendations for the authorized user.