Provides control over Apple Music on macOS, enabling playback management, library searching, playlist creation, and retrieval of track information.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Music MCPplay my 'Morning Coffee' playlist on shuffle and set the volume to 40%"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Music MCP
A Model Context Protocol (MCP) server for controlling Apple Music on macOS using AppleScript. This connector provides a structured interface for AI assistants like Claude to interact with the Music app, enabling playback control, library management, and music information retrieval.
Features
Playback Control: Play, pause, skip tracks, and control volume
Current Track Information: Get detailed track metadata and playback status
Library Management: Search tracks, albums, artists, and browse your library
Playlist Management: Create, manage, modify, and play playlists
Enhanced Queue Management: Add tracks to play next, view queue status, and control playback order
Smart "Play Next" Feature: Queue tracks to play after the current song using temporary playlists
Diagnostic Tools: Built-in info command for troubleshooting
Requirements
macOS (required for Apple Music and AppleScript)
Node.js 18.0.0 or higher
Apple Music app installed and accessible
Automation permissions granted to your terminal/app
Installation
Via npm (Recommended)
For Development
Building as Desktop Extension
If you want to create a Desktop Extension (.dxt) for distribution:
This creates a music-mcp.dxt file that can be installed directly in Claude Desktop or submitted to the Anthropic extension directory.
Note: The .dxt file is not included in the repository as it's a build artifact. Users who want the Desktop Extension should build it themselves using the instructions above.
Configuration
Claude Desktop Configuration
Add this to your Claude Desktop MCP configuration:
Environment Variables (Optional)
All environment variables are optional. The server uses stderr logging by default and works without any configuration.
Variable | Default | Description |
|
| Log level (debug, info, warn, error) |
|
| Enable file logging (disabled by default) |
|
| Log file location (only used if file logging enabled) |
|
| Cache timeout in seconds |
|
| Maximum search results |
|
| Default timeout for operations |
|
| Enable album artwork export |
|
| Accept variations in parameter names |
Available Tools
info
Get diagnostic information about the MCP server status.
Returns version information, Music app availability, and configuration status.
execute_music_command
Execute music playback control commands.
get_music_info
Retrieve information about current playback or library.
search_music
Search the music library.
manage_playlist
Create and manage playlists.
queue_music ✨ NEW
Enhanced queue management and playlist control.
Queue Actions:
view_queue: See current track, playlist context, and playback statusadd_to_queue: Add tracks to a temporary "Up Next" queue for sequential playbackplay_queue: Play the tracks you've added to the queueclear_queue: Clear all tracks from the up next queueplay_playlist: Play a specific playlist (with optional shuffle)
Permissions
When first using the MCP server, macOS will prompt you to grant automation permissions. You need to:
Allow your terminal app (Terminal.app, iTerm2, etc.) to control "Music"
Go to System Preferences > Security & Privacy > Privacy > Automation
Ensure your terminal app has permission to control "Music"
Troubleshooting
Check Server Status
Common Issues
"Music app is not running"
The server automatically launches the Music app when needed
If issues persist, manually open the Music app first
"AppleScript execution failed"
Grant automation permissions in System Preferences
Ensure Music app is accessible and not restricted
"No tracks found"
Check that you have music in your library
Verify your Apple Music subscription is active
Debugging
The server logs to stderr by default, which Claude Desktop captures. For additional debugging, you can:
Check Claude Desktop's MCP logs
Enable file logging by setting
MUSIC_MCP_FILE_LOGGING=trueenvironment variableUse the
infotool to check server diagnostics
Example Usage
Here are some example interactions you can have with Claude using this MCP server:
Basic Playback:
"Play my music and set the volume to 50%"
"What song is currently playing?"
"Skip to the next track"
Library & Search:
"Search for songs by Taylor Swift"
"Show me my library statistics"
Playlist Management:
"Create a playlist called 'Road Trip' and add some upbeat songs"
"Play my 'Chill' playlist with shuffle enabled"
"Remove all tracks by [artist] from my 'Favorites' playlist"
Queue Management (NEW):
"Add 'Bohemian Rhapsody' to play next"
"Show me what's in my up next queue"
"Clear my queue and add these 3 songs to play after the current track"
"Play my 'Party Mix' playlist next"
Development
Building
Testing
Linting
Release Preparation
Contributing
Fork the repository
Create a feature branch:
git checkout -b feature-nameMake your changes and add tests
Run the test suite:
npm testRun the release preparation:
npm run prepare-releaseCommit your changes:
git commit -am 'Add feature'Push to the branch:
git push origin feature-nameSubmit a pull request
License
MIT License - see the LICENSE file for details.