
Apple Music
Controls Apple Music on macOS through AppleScript commands, enabling playback control and library management from within Claude conversations.
Integrates with Apple Music on macOS using Python and AppleScript to enable music playback control, library searching, playlist creation, and metadata retrieval.
What it does
- Control music playback (play, pause, skip tracks)
- Search Apple Music library by track name
- Create playlists and add songs to them
- Get current song information and library statistics
- Play specific songs by name
- Browse entire music library
Best for
About Apple Music
Apple Music is a community-built MCP server published by kennethreitz that provides AI assistants with tools and capabilities via the Model Context Protocol. Control Apple Music on macOS using Python and the Apple Music API: manage playback, search the library, and create playl It is categorized under other, developer tools. This server exposes 10 tools that AI clients can invoke during conversations and coding sessions.
How to install
You can install Apple Music in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.
License
Apple Music is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.
Tools (10)
Start playback in Music (iTunes).
Pause playback in Music (iTunes).
Skip to the next track.
Return to the previous track.
Search the Music library for tracks whose names contain the given query. Returns a list of tracks formatted as "Track Name - Artist".
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
- Clone the repository:
git clone https://github.com/yourusername/mcp-applemusic.git
cd mcp-applemusic
- Install development dependencies:
pip install -e ".[dev]"
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - 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
Alternatives
Related Skills
Browse all skillsTools, patterns, and utilities for creating music with code. Output as a .mp3 file with realistic instrument sounds. Write custom compositions to bring creativity to life through music. This skill should be used whenever the user asks for music to be created. Never use this skill for replicating songs, beats, riffs, or other sensitive works. The skill is not suitable for vocal/lyrical music, audio mixing/mastering (reverb, EQ, compression), real-time MIDI playback, or professional studio recording quality.
Use when working with the OpenAI API (Responses API) or OpenAI platform features (tools, streaming, Realtime API, auth, models, rate limits, MCP) and you need authoritative, up-to-date documentation (schemas, examples, limits, edge cases). Prefer the OpenAI Developer Documentation MCP server tools when available; otherwise guide the user to enable `openaiDeveloperDocs`.
AI music prompt templates and best practices for generating music with AI tools like Suno, Udio, Mureka, and others. Use when user needs to create music prompts, song ideas, or wants guidance on writing effective prompts for AI music generation. Includes bilingual prompt templates for various genres, mood descriptors, instrumentation guidance, and lyric writing tips. Also provides techniques for crafting specific musical outcomes and examples of well-structured prompts in Chinese and English.
UI design system toolkit for Senior UI Designer including design token generation, component documentation, responsive design calculations, and developer handoff tools. Use for creating design systems, maintaining visual consistency, and facilitating design-dev collaboration.
Syncs Claude Skills with other AI coding tools like Cursor, Copilot, and Codeium by creating cross-references and shared knowledge bases. Invoke when user wants to leverage skills across multiple tools or create unified AI context.
Answer questions about the AI SDK and help build AI-powered features. Use when developers: (1) Ask about AI SDK functions like generateText, streamText, ToolLoopAgent, embed, or tools, (2) Want to build AI agents, chatbots, RAG systems, or text generation features, (3) Have questions about AI providers (OpenAI, Anthropic, Google, etc.), streaming, tool calling, structured output, or embeddings, (4) Use React hooks like useChat or useCompletion. Triggers on: "AI SDK", "Vercel AI SDK", "generateText", "streamText", "add AI to my app", "build an agent", "tool calling", "structured output", "useChat".
