spotify-dj
Provides tools for interacting with Spotify's Web API, enabling track search, playlist creation and editing, playback control, queue management, library access, and DJ-focused metadata such as BPM, key, and energy.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@spotify-djScore a transition from Dua Lipa's 'Houdini' to The Weeknd's 'Blinding Lights'."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
spotify-dj MCP
A Spotify DJ MCP server: real DJ metadata plus full playlist control, in one
local server. Spotify removed audio-features in 2024, so pure Spotify MCPs
cannot give BPM anymore. This one rebuilds it from free sources, with
per-field provenance, and pairs it with staged playlist writes.
What it does
DJ metadata for any track: BPM, key plus Camelot, energy, danceability, valence. Multi-tier free chain (cache, ReccoBeats, Deezer, AcousticBrainz, TheAudioDB, optional local analysis), every value tagged with provider.
Transition scoring 0-100 (harmonic plus octave-aware tempo plus energy), next-track suggestions, energy-arc setlist planning, Rekordbox-friendly export.
Full Spotify control: search, playlists (list, read, create, edit, add, remove, reorder with snapshot rollback), playback, queue, devices, library, top items, history.
Safety first: every stored-data mutation stages a preview with an
operation_id, then a single-use commit revalidates before applying. Writes need resolved Spotify IDs, never guesses.
Related MCP server: dj-music-metadata-mcp
Quick start
Requires Python 3.14, a Spotify account with Premium (app owner), and uv.
git clone https://github.com/cikeyz/spotify-dj.git
Set-Location spotify-dj
uv venv --python 3.14
.\.venv\Scripts\Activate.ps1
uv pip install -r requirements.txtCreate a Spotify app (2 min, free): open the
dashboard, Create app, add exactly
http://127.0.0.1:8888/callback to Redirect URIs, check Web API only, then add
yourself under User Management. Copy the Client ID, then:
$env:SPOTIFY_DJ_HOME = "$env:LOCALAPPDATA\spotify-dj"
.\.venv\Scripts\python.exe setup\setup.py --client-id '<your-client-id>'
.\.venv\Scripts\python.exe setup\setup.py --auth-url
# open the printed URL, approve, then:
.\.venv\Scripts\python.exe setup\setup.py --auth-code '<pasted-redirect-url>'
.\.venv\Scripts\python.exe setup\tests\verify_server.pyExpect RESULT: ALL CHECKS PASSED. Full walkthrough in docs/SETUP.md.
MCP client config (stdio only)
{
"mcpServers": {
"spotify-dj": {
"command": "C:\\path\\to\\.venv\\Scripts\\python.exe",
"args": ["C:\\path\\to\\server.py"],
"env": { "SPOTIFY_DJ_HOME": "C:\\path\\to\\state" }
}
}
}Launch the .venv Python directly, never through uv's runner. Tokens, cache, and
audit logs live in SPOTIFY_DJ_HOME, never in this repo.
Tools (31) and prompts (3)
Family | Tools |
Search and library |
|
Playlists |
|
Playback |
|
DJ intelligence |
|
Infra |
|
Prompts: build-set (crate to ordered setlist), audit-crate (drift and
duplicate report), organize-playlist (dedupe, sort, split).
Reads return cursor envelopes (items, next_page_token, has_more) capped
at 30KB. Mutations stage first, commit once. Details and live API discoveries
in docs/ARCHITECTURE.md.
Optional: local analysis tier
Without it the server uses keyless catalogs only. To measure BPM and key from audio as a last resort (proves out at ~5s per track):
.\.venv\Scripts\python.exe -m pip install librosa
$env:SPOTIFY_DJ_LOCAL_ANALYSIS = "1"Tests
.\.venv\Scripts\python.exe setup\tests\verify_server.py
.\.venv\Scripts\python.exe setup\tests\test_server.pyverify_server.py is offline plus static. test_server.py runs live against
your account with self-cleaning SPOTIFYDJ-TEST- playlists and must end with
RESULT: ALL CHECKS PASSED and zero residue.
Layout
server.py: thin shell (tools, registration, stdio entry)core.py: state, staged store, Spotify client, envelopesplaylists.py,collection.py,dj.py,prompts.py: feature modulessetup/setup.py: PKCE grant, refresh, statussetup/tests/: verify plus live batteriesdocs/:SETUP.mdguide,ARCHITECTURE.mddesign plus discoveries
Released under the MIT License.
This server cannot be deployed
Maintenance
Related MCP Connectors
Builds narrated, playable music stories, explores sample lineage, and saves verified playlists.
Full Spotify Web API coverage - albums, artists, playlists, player controls, and more.
Spotify: Spotify Data API for Millions of songs & podcasts, artists, albums, playlists and more.
Privacy-first audio intelligence: BPM, key, waveform. Audio never stored. Pay per second.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables AI assistants to control Spotify playback, manage playlists, and plan DJ sets using BPM, key, and energy data.37MIT
- FlicenseNot gradedqualityBmaintenanceMCP server for DJs to scan music folders, validate and suggest metadata via MusicBrainz/iTunes/Spotify, and batch write metadata to audio files with confidence scoring.1-
- AlicenseBqualityBmaintenanceA local-first Spotify MCP server providing typed tools for music search, playback, playlists, audio analysis, and snapshot-safe DJ planning, with OAuth PKCE and no client secret stored.531MIT
- AlicenseBqualityBmaintenanceEnables DJs to calculate set runtime from cue points and transitions in provided track JSON, and to rank next-track candidates with explainable bpm, key, genre, energy scoring and warnings.21AGPL 3.0