-
Purpose Spotify Play Count MCP provides AI assistants with Spotify play data query capabilities. Users can paste track, album, artist, or playlist links, or spotify: URIs, and ask the assistant to return the play count for the corresponding object; for artists, it can also query monthly listeners, follower count, world ranking, and top cities. It does not require Spotify login, nor does it require proxy configuration.
-
Main capabilities
- Tracks, albums, playlists: return the play count of each track in them.
- Artists: return monthly listeners, follower count, world ranking, and top cities.
- Optional daily tracking: after enabling addDailyStreams, supplement tracks under daily tracking with streaming data for the last 1, 7, and 30 days (streamsLast1d, streamsLast7d, streamsLast30d). For a track seen for the first time, the value is empty on that day and is only filled after there is first-day history; the last 1 day becomes visible after one day, and the last 7 days become visible after one week.
- Data source: based on Spotify public web pages, implemented through the Apify Actor “Spotify Play Count & Monthly Listeners Scraper”; not affiliated with Spotify.
- Input schema: the complete definition is located in tools.json, generated from the Actor's public input schema, and checked daily for drift.
-
Usage
-
Hosted MCP (Streamable HTTP) Endpoint:https://mcp.apify.com?tools=publicrecords/spotify-play-count-scraper Documentation:https://docs.apify.com/mcp Apify Store:https://apify.com/publicrecords/spotify-play-count-scraper When prompted by the client, log in with Apify OAuth, or send Authorization: Bearer <APIFY_TOKEN>, where <APIFY_TOKEN> is replaced with your own Apify API token. Do not commit real tokens to the code repository. Claude Desktop / claude.ai: Settings → Connectors → Add custom connector, paste the above MCP endpoint URL. Cursor: the configuration file is ~/.cursor/mcp.json; VS Code: the configuration file is .vscode/mcp.json. The materials do not provide the specific JSON contents in these two files. If using a token instead of OAuth, you can add an Authorization header to requests in the configuration, with the value being Bearer plus your Apify API token. This server also provides a one-click installation entry and is listed in the Official MCP Registry; Zed and VS Code can read from this Registry.
-
Local stdio server (Node.js) The repository's src/ provides a small MCP server suitable for clients that only run local stdio. It locally responds to initialize and tools/list from tools.json, so any client or directory can inspect tools without a token; tools/call forwards to the above Apify-hosted MCP endpoint and uses your own APIFY_TOKEN; without a token it returns a clear error and performs no operation. The token is placed only in the Authorization header and is not logged. Optional environment variables: APIFY_ACTORS (a comma-separated subset of the above Actor) and APIFY_MCP_URL (full endpoint override). Test command: npm test Requires Node.js 18+; tests use an in-memory mock server, with no network and no token. The materials do not provide the specific installation command for the Node local server.
-
Python version (uvx/pip) The python/ directory provides the corresponding Python server, based on the official mcp Python SDK, the tools, APIFY_TOKEN, and hosted endpoint are the same. Requires Python 3.10+. Install: pip install spotify-play-count-mcp Run: spotify-play-count-mcp Before the first PyPI release, you can run from GitHub: uvx --from "git+https://github.com/GeminiGeorge22/spotify-play-count-mcp#subdirectory=python" spotify-play-count-mcp Python tests: cd python && pip install -e ".[test]" && env -u APIFY_TOKEN python -m pytest
-
Use Cases
- Query the play count of each song in an album.
- Compare the monthly listeners and follower counts of multiple artists.
- Find the track with the highest play count in a playlist.
- Track artist pages weekly and view daily streaming data for each song.
- Provide Spotify play and audience data context for AI assistants.
- Limitations and Notes
- Data comes from Spotify public web pages and third-party Apify Actors, not an official Spotify product; it is not affiliated with Spotify.
- Hosted MCP calls require Apify OAuth or an Apify API token; local stdio tools/list does not require a token, but tools/call does.
- Daily tracking fields are empty on the day a track first appears, then filled based on accumulated history.
- Charges, prices, plans, and quotas are not currently provided.
- Other platform support is not currently provided beyond the clients and transport methods above.
- Do not submit a real APIFY_TOKEN before use.