Skip to main content

spotify-play-count-mcp (Python)

Python version of the spotify-play-count-mcp stdio MCP server, built on the official mcp Python SDK. Same tool, same APIFY_TOKEN env var, same hosted endpoint as the Node.js server.

Spotify play counts for any track, album, artist or playlist link, plus an artist's monthly listeners and followers. Optional streams over the last 1, 7 and 30 days for tracks in daily tracking; those fields are empty on a track's first day and fill in after the first day of history.

It answers initialize and tools/list locally from the bundled tools.json (no token, no network). tools/call is forwarded to Apify's hosted MCP endpoint (mcp.apify.com) with your own APIFY_TOKEN, so each run uses your Apify account. Without a token a call returns a clear error instead of running anything. The token is only sent in the Authorization header and is never logged.

Install

Requires Python 3.10+. With uv:

uvx spotify-play-count-mcp

With pip:

pip install spotify-play-count-mcp
spotify-play-count-mcp

To run the latest unreleased code from GitHub: uvx --from "git+https://github.com/GeminiGeorge22/spotify-play-count-mcp#subdirectory=python" spotify-play-count-mcp.

MCP client config:

{
  "mcpServers": {
    "spotify-play-count": {
      "command": "uvx",
      "args": ["spotify-play-count-mcp"],
      "env": { "APIFY_TOKEN": "YOUR_APIFY_TOKEN" }
    }
  }
}

Optional env: APIFY_ACTORS (comma-separated subset of the Actors) and APIFY_MCP_URL (full endpoint override).

Tests

Tests use an in-process mock server, with no network and no token. They fail if APIFY_TOKEN is set.

cd python && pip install -e ".[test]"
env -u APIFY_TOKEN python -m pytest

python scripts/build_tools.py --check compares the bundled tools.json with each Actor's live public input schema and exits 1 on any mismatch.

Metadata

Release files for spotify-play-count-mcp 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for spotify-play-count-mcp 0.1.0
File Size Uploaded Provenance Actions
spotify_play_count_mcp-0.1.0.tar.gz 12.9 kB With provenance Details for spotify_play_count_mcp-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for spotify-play-count-mcp 0.1.0
File Interpreter ABI Platform Actions
spotify_play_count_mcp-0.1.0-py3-none-any.whl Python 3 none any Details for spotify_play_count_mcp-0.1.0-py3-none-any.whl

Total release size: 23.2 kB

Release files / spotify_play_count_mcp-0.1.0.tar.gz

Download URL spotify_play_count_mcp-0.1.0.tar.gz
Size 12.9 kB
Tags Source
SHA-256 checksum
How to use checksums
7652b82ccf20f998944522b0c6852136902464567ceaaf4b339b4ff15e18da23
BLAKE2b-256 checksum
How to use checksums
5450ad48de0da2dd14e84e63ff6bf45d3663c273538cd0a62a9cc00da139fbbd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Release files / spotify_play_count_mcp-0.1.0-py3-none-any.whl

Download URL spotify_play_count_mcp-0.1.0-py3-none-any.whl
Size 10.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2c9715aaf55e3f8dc9594f3fea20d6984633f4223c6257f36ec49fa610a448d4
BLAKE2b-256 checksum
How to use checksums
f2099469dd0a984406db2a5331daa5066bdb352d1cce974bfd9dd5ed54bb1a3c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Security for spotify-play-count-mcp 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for spotify_play_count_mcp-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page