Connect PrimaryAPI’s MCP server and your agent can look up Spotify tracks, albums, artists and podcasts and read their play counts, with one key.
Server URL
claude mcp add --transport http primaryapi \
https://api.primaryapi.com/mcp \
--header "Authorization: Bearer $PRIMARYAPI_API_KEY"Run it in a terminal. Your shell fills in the key from the environment.
Ask your agent
How many plays does this track have, and how does it compare with the artist’s top tracks? <track URL>
Look up this album on Spotify and rank its tracks by plays: <album URL>
Who publishes this podcast, and in which languages is it available? <show URL>
Spotify APIs
Your agent runs each one with run_api and its name. Prices are in credits, from 2 credits per call, and a call that fails costs nothing.
Spotify is a trademark of its owner. PrimaryAPI is not affiliated with Spotify.
How it works
Connected to the server, the agent lists the Spotify APIs or searches for what it needs, reads the chosen API’s input schema, and runs it with your key. You set the key’s spend limit, so it can only spend what you allow.
What an MCP server is, and every tool it has · Spotify in the API reference
// Find every Spotify API. No key needed.
{
"name": "list_apis",
"arguments": {
"platform": "spotify"
}
}
// Run one with your key.
{
"name": "run_api",
"arguments": {
"sku": "spotify.play_count",
"input": {
"url": "https://open.spotify.com/track/0VjIjW4GlUZAMYd2vXMi3b"
}
}
}Yes. It returns lifetime play counts for a track, for every track of an album, or for an artist’s top tracks, from one link.
No. These APIs read public Spotify catalog data, such as tracks, albums, artists and podcasts, not your account.
No. PrimaryAPI runs this MCP server and is not affiliated with Spotify. It gives your agent public Spotify data through PrimaryAPI’s APIs, next to every other platform in the catalog.
No. Your agent uses one PrimaryAPI key for every Spotify API on this page and for the rest of the catalog. There is no Spotify app to register.
Connecting and browsing are free. Each Spotify API above has its own price in credits, and you only pay when data comes back.
Create an account, make a key with a spend limit, and add one URL to your MCP client.