Apple Music
About
Integrates with Apple Music on macOS using Python and AppleScript to enable music playback control, library searching, playlist creation, and metadata retrieval.
Details
- Author
- kennethreitz
- Repository
- kennethreitz/mcp-applemusic
- GitHub stars
- 59
- Downloads
- 19,495
- License
- MIT License
- Categories
- AI, Design, Developer Tools, Search, Infrastructure, Automation, Other
- Tags
- #mobile, #integration
Jump to
- Start, pause, skip, and go to previous track
- Search library for tracks by query
- Play a specific song by name
- Create new playlists from a list of songs
- Get library statistics (counts, metadata)
- macOS-only; requires Apple Music app
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Apple MusicCommand (node, npx, python, etc.)uvxArguments-
Argument 1
-p -
Argument 2
3.13 -
Argument 3
-n -
Argument 4
mcp-applemusic
Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
-
Argument 1
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Start the server:
python server.py
Example interactions:
```python
itunes_play
Start playback of the current track.
itunes_pause
Pause the playback of the current track.
itunes_next
Skip to the next track in the playback queue.
itunes_previous
Go to the previous track in the playback queue.
itunes_search
Search the library for tracks based on the provided query. Parameters: query (string)
itunes_play_song
Play a specific song from the library. Parameters: song (string)
itunes_create_playlist
Create a new playlist with the specified name and songs. Parameters: name (string), songs (list of strings)
itunes_library
Get statistics about the music library.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"apple music": {
"cwd": "optional",
"env": {},
"args": [
"-p",
"3.13",
"-n",
"mcp-applemusic"
],
"shell": false,
"command": "uvx"
}
}
}
Linux
{
"cwd": "optional",
"env": [],
"args": [
"-p",
"3.13",
"-n",
"mcp-applemusic"
],
"shell": false,
"command": "uvx"
}
Macos
{
"cwd": "optional",
"env": [],
"args": [
"-p",
"3.13",
"-n",
"mcp-applemusic"
],
"shell": false,
"command": "uvx"
}
Windows
{
"cwd": "optional",
"env": [],
"args": [
"-p",
"3.13",
"-n",
"mcp-applemusic"
],
"shell": false,
"command": "uvx"
}
MCP-AppleMusic
A FastMCP server implementation for controlling Apple Music (formerly iTunes) on macOS through AppleScript commands.
Requirements
- Python 3.13+
- macOS with Apple Music app installed
- MCP library ≥1.2.1
Installation
First, ensure you have uv installed:
$ brew install uv
Then, with Claude Desktop, add the following to claude_desktop_config.json:
{
"mcpServers": {
"iTunesControlServer": {
"command": "uvx",
"args": ["-p", "3.13", "-n", "mcp-applemusic"]
}
}
}
Available Commands
The following commands are available through the MCP server:
itunes_play() # Start playback
itunes_pause() # Pause playback
itunes_next() # Skip to next track
itunes_previous() # Go to previous track
itunes_search(query) # Search library for tracks
itunes_play_song(song) # Play specific song
itunes_create_playlist(name, songs) # Create new playlist
itunes_library() # Get library statistics
Usage
Start the server:
python server.py
Example interactions:
# Search for a song
results = itunes_search("Hey Jude")
Create a new playlist
itunes_create_playlist("Beatles Favorites", ["Yesterday", "Hey Jude", "Let It Be"])
Play a specific song
itunes_play_song("Hey Jude")
Development
1. Clone the repository:
git clone https://github.com/yourusername/mcp-applemusic.git
cd mcp-applemusic
2. Install development dependencies:
pip install -e ".[dev]"
Contributing
1. Fork the repository
2. Create your feature branch (git checkout -b feature/amazing-feature)
3. Commit your changes (git commit -m 'Add amazing feature')
4. Push to the branch (git push origin feature/amazing-feature)
5. Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Notes
- This tool only works on macOS systems due to its AppleScript dependency
- Requires Apple Music (formerly iTunes) to be installed
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





