The Apple Music MCP server provides a convenient interface for interacting with the Apple Music API through the Model Context Protocol. It offers functionality for searching songs and generating playback links, making it easier to integrate Apple Music content into your applications.
You can install the Apple Music MCP server using Cargo:
# Build the project
cargo install --path .
The server requires authentication credentials to access the Apple Music API. You'll need to provide these through command-line arguments when starting the server.
Start the server with your authentication credentials:
cargo run -- --team-id YOUR_TEAM_ID --key-id YOUR_KEY_ID --private-key-path /path/to/AuthKey.p8
Options:
--team-id <TEAM_ID> Apple Developer Team ID
--key-id <KEY_ID> Apple Music Key ID
--private-key-path <PRIVATE_KEY_PATH> Path to the Apple Music private key file (.p8)
--storefront <STOREFRONT> Storefront for Apple Music (e.g. us, jp) [default: jp]
-h, --help Print help
-V, --version Print version
The searchSongs
function allows you to search for songs by title, album name, or artist name.
Parameters:
query
: (string) - The search query textReturns:
The generatePlaybackLink
function creates deep links for songs or playlists that can be used for playback.
Parameters:
song_id
or playlist_id
(one must be provided)Returns:
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.