apple-music

apple-music

Enables control of Apple Music on macOS, including playback, track info, volume, and more.

Category
Visit Server

README

Apple Music MCP Server

A Model Context Protocol (MCP) server that provides tools to control Apple Music via AppleScript on macOS.

Features

This MCP server provides comprehensive control over Apple Music, including:

Playback Control

  • Play, pause, and toggle play/pause
  • Skip to next/previous track
  • Play specific tracks, albums, or playlists
  • Search and play tracks

Player Information

  • Get current track details (name, artist, album, duration, year, genre)
  • Get player state (playing, paused, stopped)
  • Get current volume and position

Player Settings

  • Set volume (0-100)
  • Set track position
  • Enable/disable repeat and shuffle
  • Get repeat and shuffle status

Track Interaction

  • Like/dislike current track
  • Get liked status of current track

Quick Start

For Claude Users

  1. Clone the repository:

    git clone https://github.com/thebarbican19/AppleMusic-MCP.git
    cd AppleMusic-MCP
    
  2. Install dependencies:

    npm install
    
  3. Make the script executable:

    chmod +x index.js
    
  4. Configure Claude Desktop:

    • Open Claude Desktop
    • Go to Settings (gear icon)
    • Navigate to "Model Context Protocol" section
    • Add a new MCP server with:
      • Name: apple-music
      • Command: node
      • Arguments: ["/path/to/your/AppleMusic-MCP/index.js"]
      • Environment: Leave empty
  5. Restart Claude and start using Apple Music commands!

For Other MCP Clients

Add this to your MCP client configuration (e.g., .cursorrules for Cursor):

{
  "mcpServers": {
    "apple-music": {
      "command": "node",
      "args": ["/path/to/your/AppleMusic-MCP/index.js"],
      "env": {}
    }
  }
}

Replace /path/to/your/AppleMusic-MCP/ with the actual path to this directory.

Available Tools

apple_music_play

Resume playback.

apple_music_pause

Pause playback.

apple_music_playpause

Toggle play/pause.

apple_music_next_track

Skip to the next track.

apple_music_previous_track

Skip to the previous track.

apple_music_play_track

Start playback of a track by name and artist.

Parameters:

  • track_name (string, required): The name of the track to play
  • artist_name (string, required): The artist of the track to play

apple_music_play_album

Start playback of an album by name and artist.

Parameters:

  • album_name (string, required): The name of the album to play
  • artist_name (string, required): The artist of the album to play

apple_music_play_playlist

Start playback of a playlist by name.

Parameters:

  • playlist_name (string, required): The name of the playlist to play

apple_music_get_current_track

Get information about the current playing track.

apple_music_get_player_state

Get the current player state (playing, paused, stopped).

apple_music_set_volume

Set the sound output volume.

Parameters:

  • volume (integer, required): Volume level (0-100)

apple_music_get_volume

Get the current volume.

apple_music_set_position

Set the player position within the current track.

Parameters:

  • position (number, required): Position in seconds

apple_music_get_position

Get the player position within the current track.

apple_music_set_repeat

Turn repeat on or off.

Parameters:

  • enabled (boolean, required): Enable or disable repeat

apple_music_get_repeat

Get repeat status.

apple_music_set_shuffle

Turn shuffle on or off.

Parameters:

  • enabled (boolean, required): Enable or disable shuffle

apple_music_get_shuffle

Get shuffle status.

apple_music_like_track

Like the current track.

apple_music_dislike_track

Dislike the current track.

apple_music_get_liked_status

Get the liked status of the current track.

apple_music_search_and_play

Search for a track and play it.

Parameters:

  • query (string, required): Search query for track, artist, or album

Usage Examples

Once configured, you can use these tools in your MCP client. For example, in Cursor you might say:

  • "Play the next track"
  • "What's currently playing?"
  • "Set volume to 50%"
  • "Play the album 'Abbey Road' by The Beatles"
  • "Search for and play 'Bohemian Rhapsody'"

Requirements

  • macOS (required for AppleScript support)
  • Apple Music app installed
  • Node.js (version 14 or higher)

Troubleshooting

  1. Permission Issues: Make sure the script has execute permissions (chmod +x index.js)

  2. Apple Music Not Found: Ensure Apple Music is installed and running on your Mac

  3. AppleScript Errors: Some AppleScript commands may fail if Apple Music is not in the expected state. The server will return error messages for debugging.

  4. Timeout Issues: The server has a 30-second timeout for AppleScript execution. If operations take longer, they will fail.

License

MIT License - feel free to modify and distribute as needed.

Contributing

Feel free to submit issues and enhancement requests!

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
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

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