
Product
Socket for Jira Is Now Available
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.
@pedrocid/music-mcp
Advanced tools
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.
npx @pedrocid/music-mcp@latest
git clone https://github.com/pedrocid/music-mcp.git
cd music-mcp
npm install
npm run build
If you want to create a Desktop Extension (.dxt) for distribution:
# Install the DXT CLI tool
npm install -g @anthropic-ai/dxt
# Initialize Desktop Extension (if not already done)
dxt init
# Build the project
npm run build
# Package the extension
dxt pack
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.
Add this to your Claude Desktop MCP configuration:
{
"mcpServers": {
"music": {
"command": "npx",
"args": ["@pedrocid/music-mcp@latest"]
}
}
}
All environment variables are optional. The server uses stderr logging by default and works without any configuration.
| Variable | Default | Description |
|---|---|---|
MUSIC_MCP_LOG_LEVEL | info | Log level (debug, info, warn, error) |
MUSIC_MCP_FILE_LOGGING | false | Enable file logging (disabled by default) |
MUSIC_MCP_LOG_FILE | ~/Library/Logs/music-mcp.log | Log file location (only used if file logging enabled) |
MUSIC_MCP_CACHE_TTL | 300 | Cache timeout in seconds |
MUSIC_MCP_MAX_SEARCH_RESULTS | 50 | Maximum search results |
MUSIC_MCP_TIMEOUT_SECONDS | 30 | Default timeout for operations |
MUSIC_MCP_ARTWORK_EXPORT | true | Enable album artwork export |
MUSIC_MCP_LENIENT_PARSING | true | Accept variations in parameter names |
infoGet diagnostic information about the MCP server status.
{
"command": "info"
}
Returns version information, Music app availability, and configuration status.
execute_music_commandExecute music playback control commands.
{
"command": "play|pause|next|previous|toggle_playback",
"volume": 75,
"position": 30,
"shuffleMode": true,
"repeatMode": "all",
"rating": 4
}
get_music_infoRetrieve information about current playback or library.
{
"infoType": "current_track|playback_status|queue|library_stats",
"format": "simple|detailed"
}
search_musicSearch the music library.
{
"query": "artist name or song title",
"searchType": "all|track|album|artist|playlist",
"limit": 25
}
manage_playlistCreate and manage playlists.
{
"action": "create|add_track|remove_track|rename|delete|list|get_tracks",
"playlistName": "My Playlist",
"trackId": "search term for track",
"newName": "New Playlist Name"
}
queue_music ✨ NEWEnhanced queue management and playlist control.
{
"action": "view_queue|add_to_queue|play_queue|clear_queue|play_playlist",
"trackSearchTerm": "song or artist name",
"playlistName": "My Playlist",
"shuffle": true
}
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)When first using the MCP server, macOS will prompt you to grant automation permissions. You need to:
npx @pedrocid/music-mcp@latest
# Then use the info tool to check status
"Music app is not running"
"AppleScript execution failed"
"No tracks found"
The server logs to stderr by default, which Claude Desktop captures. For additional debugging, you can:
MUSIC_MCP_FILE_LOGGING=true environment variableinfo tool to check server diagnosticsHere are some example interactions you can have with Claude using this MCP server:
Basic Playback:
Library & Search:
Playlist Management:
Queue Management (NEW):
npm run build
npm test # Unit tests
npm run test:e2e # Integration tests
npm run lint
npm run prepare-release
git checkout -b feature-namenpm testnpm run prepare-releasegit commit -am 'Add feature'git push origin feature-nameMIT License - see the LICENSE file for details.
FAQs
MCP server for controlling Apple Music on macOS (v1.0.5)
The npm package @pedrocid/music-mcp receives a total of 20 weekly downloads. As such, @pedrocid/music-mcp popularity was classified as not popular.
We found that @pedrocid/music-mcp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.