Control Apple Music on macOS with MCP server commands for playback, search, playlists, and library management
MCP-AppleMusic is an advanced MCP (Model Context Protocol) server designed to facilitate AI applications in controlling and interacting with the Apple Music application on macOS. By leveraging AppleScript commands, it allows for seamless integration between AI applications and the music library, enabling a wide array of functionalities such as playback control, song searches, playlist creation, and more.
MCP-AppleMusic operates by connecting to the Apple Music application through standardized AppleScript commands, which can be controlled via the MCP protocol. This allows it to act as both a server and a data source/interaction point for various AI applications that support MCP.
The implementation of MCP-AppleMusic involves setting up the server to listen for MCP client requests using Python 3.13+, running on macOS systems where Apple Music is installed. The server uses uv
as the underlying command runner and handles different commands through a series of function definitions.
MCP-AppleMusic adheres to the latest MCP protocol, ensuring seamless integration with various AI applications such as Claude Desktop, Continue, and Cursor. It provides real-time communication between these applications and Apple Music, allowing for dynamic interactions through scripted commands.
To deploy MCP-AppleMusic, ensure the following prerequisites are met:
Install uv via Homebrew:
$ brew install uv
Configure Claude Desktop: Add the following to claude_desktop_config.json
:
{
"mcpServers": {
"iTunesControlServer": {
"command": "uvx",
"args": ["-n", "mcp-applemusic"]
}
}
}
Start the Server:
python server.py
Imagine a scenario where an AI-based creative tool is integrated with MCP-AppleMusic to provide real-time music suggestions based on the user's project context. The tool uses machine learning algorithms to analyze the project data and sends appropriate commands to MCP-AppleMusic, such as "itunes_play()". This integration enhances the user experience by providing relevant musical cues that align with their current creative workflow.
A mood-based application can utilize MCP-AppleMusic to create dynamic playlists based on the user's current emotional state or activity. By sending commands like "itunes_search(query)" and "itunes_create_playlist(name, songs)", it can automatically generate playlists tailored to specific moods, enhancing the user experience with personalized music.
MCP-AppleMusic supports integration with key MCP clients such as:
MCP Client | Resources | Tools | Prompts | Status |
---|---|---|---|---|
Claude Desktop | ✅ | ✅ | ✅ | Full Support |
Continue | ✅ | ✅ | ✅ | Full Support |
Cursor | ❌ | ✅ | ❌ | Tools Only |
MCP-AppleMusic performs optimally on macOS systems and provides reliable interactions with Apple Music. The server is designed to handle multiple commands simultaneously, ensuring smooth user experience.
graph TD;
A[AI Application] -->|MCP Client| B[MCP Protocol];
B --> C[MCP Server];
C --> D[AppleMusic];
style A fill:#e1f5fe;
style C fill:#f3e5f5;
style D fill:#e8f5e8;
{
"mcpServers": {
"iTunesControlServer": {
"command": "uvx",
"args": ["-n", "mcp-applemusic"],
"env": {
"API_KEY": "your-api-key"
}
}
}
}
uvx
.Q: Does MCP-AppleMusic support all macOS versions?
Q: Can I use this server on a Windows machine?
Q: How do I ensure secure communication between MCP clients and servers?
Q: Can I add more commands beyond the predefined ones?
Q: Is there a limit to the number of commands MCP-AppleMusic can handle simultaneously?
If you wish to contribute or enhance the capabilities of MCP-AppleMusic:
git checkout -b feature/new-feature
.git push origin feature/new-feature
.By integrating MCP-AppleMusic into your AI application, you can significantly enhance user experience through seamless control over Apple Music, making it a valuable addition to any development ecosystem.
RuinedFooocus is a local AI image generator and chatbot image server for seamless creative control
Learn to set up MCP Airflow Database server for efficient database interactions and querying airflow data
Simplify MySQL queries with Java-based MysqlMcpServer for easy standard input-output communication
Build stunning one-page websites track engagement create QR codes monetize content easily with Acalytica
Access NASA APIs for space data, images, asteroids, weather, and exoplanets via MCP integration
Explore CoRT MCP server for advanced self-arguing AI with multi-LLM inference and enhanced evaluation methods