SuperAPIAI Directory

spotify-play-count-mcp

github.com · AI developer platforms

Spotify Play Count MCP is an MCP server for AI assistants that can query play counts for Spotify tracks, albums, artists, and playlists; for artists, it can also return monthly listeners, follower count, world ranking, and top cities. It supports pasting links or spotify: URIs, with no Spotify login or proxy required. Optional daily tracking supplements tracks with streaming data for the last 1, 7, and 30 days. It is implemented based on Spotify public web pages and an Apify Actor, and is not affiliated with Spotify. It provides an Apify-hosted Streamable HTTP endpoint, as well as local stdio servers for Node.js and Python.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsAPI

About this tool

  1. 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.

  2. 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.
  1. Usage

  2. 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.

  3. 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.

  4. 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

  5. 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.
  1. 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.
Up/Down to navigate · Enter to open · ESC to closeBrowse all tools