spotify-llm-mcp
Controls Spotify playback (play, pause, next, previous, shuffle, repeat, volume, seek), searches tracks, manages devices and queue, retrieves playlists and track lists, and creates/extends playlists from LLM-reasoned music recommendations.
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-llm-mcp recommend music like my On Repeat playlist"
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-llm-mcp
Control Spotify and build LLM-reasoned playlists from any MCP client (Claude Code, Claude Desktop, Cursor, …).
It wraps the spotify_player CLI as the control plane, so it needs no Spotify Developer app and no OAuth of its own — it reuses the session you already logged into. The recommendation engine is the calling LLM itself: it reasons over your real playlist tracks and the server resolves its picks to Spotify tracks via search. (Spotify removed its audio-features/recommendations endpoints for new apps in Nov 2024 — this design sidesteps that entirely.)
Why this design
Zero new credentials.
spotify_playeralready holds your session; this server just shells out to it.Immune to Spotify Web-API deprecations. Control flows through librespot, not
api.spotify.com.The LLM is the recsys. Its music knowledge replaces Spotify's dead recommendation endpoints; the server turns song names into playable Spotify tracks.
Portable. One MCP server, usable by every MCP-speaking client.
Related MCP server: Spotify MCP Server
Requirements
spotify_playerinstalled, authenticated once, and running as an active device. Spotify Premium is required for playback control.Python ≥ 3.10.
Install
git clone https://github.com/rachittshah/spotify-llm-mcp
cd spotify-llm-mcp
uv pip install -e .Register with Claude Code:
claude mcp add spotify -- spotify-llm-mcpOr in settings.json / claude_desktop_config.json:
{ "mcpServers": { "spotify": { "command": "spotify-llm-mcp" } } }Tools
Control: now_playing · control (play/pause/next/previous/shuffle/repeat/volume/seek) · play · search · list_devices · switch_device · get_queue
Recsys inputs & delivery: list_playlists · get_playlist_tracks · taste_profile · resolve_tracks · create_playlist_from_tracks · append_to_playlist
Features (MCP prompts / slash-commands)
/recommend-from-playlist <name>— read a playlist, let the LLM extend it in-vibe, build & play the result./vibe-playlist <description>— "late-night coding, downtempo instrumental" → a fresh playlist./more-like-this— recommendations seeded from what's playing now./my-taste— a summary of your listening profile.
How the recsys works
LLM client ──► get_playlist_tracks("On Repeat") # real tracks, via spotify_player
│ (LLM reasons over them using its music knowledge)
└─► create_playlist_from_tracks(name, [{title, artist}, ...])
│ server resolves each name → Spotify track via search
└─► play(new_playlist_uri) # on your spotify_player deviceClaude Code skill
This repo also ships a Claude Code skill (skill/spotify-dj/) that teaches Claude the recsys workflows on top of the MCP tools. Install it:
cp -r skill/spotify-dj ~/.claude/skills/spotify-djThen in Claude Code: "recommend music like my On Repeat playlist" or /spotify-dj.
Known limitations
Playback control needs Spotify Premium. Free accounts can read state but not control it.
spotify_player's search errors on some queries (an upstream JSON-deserialization bug — exit 0 but non-JSON output). The recsys is resilient to this: an unresolvable pick is skipped and reported underunresolved, never aborting the batch.Delivery is a playlist, not an ephemeral queue —
spotify_player's CLI has no "add to queue" verb, so recommendations are delivered as a (revisitable) playlist.
Development
uv pip install -e ".[dev]"
.venv/bin/python -m pytest # unit tests (no Spotify needed)
.venv/bin/python scripts/smoke_live.py # end-to-end against a live spotify_player
.venv/bin/python scripts/smoke_mcp.py # MCP-protocol smoke over stdioLicense
MIT © Rachitt Shah
Available Tools
14 toolsappend_to_playlistA
Append LLM-proposed {title, artist} picks to an existing playlist by id.
Inputs: tracks (required), playlist_id (required). Returns: object
controlB
Control playback. action ∈ {play, pause, play_pause, next, previous, shuffle, repeat, volume, seek}. For 'volume' pass 0-100; for 'seek' pass milliseconds.
Inputs: action (required), value. Returns: object
create_playlist_from_tracksA
Create a playlist from LLM-proposed {title, artist} picks. The server searches each on Spotify, adds the confident matches, and reports any it couldn't find under 'unresolved'. Returns the new playlist_id + uri.
Inputs: name (required), tracks (required), public, description. Returns: object
get_playlist_tracksA
Get a playlist's tracks by name (case-insensitive) or by Spotify id. Use this to read a playlist before recommending music in its vibe.
Inputs: playlist (required).
get_queueB
Get the current playback queue.
Inputs: no named parameters.
list_devicesA
List available Spotify Connect devices.
Inputs: no named parameters.
list_playlistsA
List the user's playlists (id, name, description, owner).
Inputs: no named parameters.
now_playingA
Get the current playback state: track, artist, device, progress, shuffle/repeat.
Inputs: no named parameters. Returns: object
playA
Search Spotify and play the top matching track. query is free text, e.g. 'redbone childish gambino'.
Inputs: query (required). Returns: object
play_playlistB
Start playback of a playlist by its Spotify id (optionally shuffled).
Inputs: playlist_id (required), shuffle. Returns: object
resolve_tracksA
Resolve a list of {title, artist} picks to real Spotify tracks. Returns {resolved: [...], unresolved: [...]}. Use to preview before building.
Inputs: tracks (required). Returns: object
searchA
Search Spotify tracks; returns up to limit simplified track objects.
Inputs: query (required), limit.
switch_deviceB
Transfer playback to the device with the given name.
Inputs: name (required). Returns: object
taste_profileA
Get the user's top tracks, to reason about their taste.
Inputs: no named parameters. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 14 tools
Most tools have a clear resource+action distinction, but search, play, and resolve_tracks overlap in their underlying lookup/resolution behavior, and the playlist creation/append tools both resolve track picks. Descriptions are usually enough to pick the right one.
Names are mostly readable but inconsistent: verb_noun forms like play_playlist and list_devices coexist with bare verbs like play and control, plus noun phrases like now_playing and taste_profile. The generic name control is particularly vague.
14 tools is a reasonable size for a Spotify assistant covering playback, queue, devices, search, and playlist management. Some search/resolve and playback-control functionality could be consolidated, but the count is not excessive.
Core workflows are covered: playback control, queue, devices, search, taste profile, and creating/appending playlists. However, there is no way to remove tracks or delete/replace playlists, nor any queue editing or recommendation tool, leaving notable playlist-lifecycle gaps.
Maintenance
Related MCP Connectors
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables control of Spotify playback, search, and playlist management through MCP tools and Apple Shortcuts/Siri integration via HTTP bridge.12MIT
- AlicenseNot gradedqualityDmaintenanceEnables control of Spotify playback, track search, and user profile retrieval via MCP tools with automatic OAuth token management.3MIT
- AlicenseAqualityCmaintenanceMCP server to control Spotify conversationally from Claude, Cursor, and other AI clients.11382 npm2MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to search Spotify and manage playlists, library, and playback via a remote MCP server running on Cloudflare Workers.127 npm1MIT