MCP server connecting LLMs to Spotify, with smart-batching and large-playlist tools

mcp-name: io.github.jamiew/spotify-mcp
A local Python MCP server for searching Spotify, controlling playback, and managing playlists and Liked Songs from your MCP client. Runs over stdio with your Spotify account. This is a supported fork of varunneal/spotify-mcp.
The TypeScript edition supports local and hosted use, with a different MCP surface.
Requires Python 3.12+, uv, and Spotify Premium for playback.
http://127.0.0.1:8888 as its redirect URI, exactly as written.{
"mcpServers": {
"spotify": {
"command": "uvx",
"args": ["spotify-mcp-jamiew"],
"env": {
"SPOTIFY_CLIENT_ID": "your_client_id",
"SPOTIFY_CLIENT_SECRET": "your_client_secret",
"SPOTIFY_REDIRECT_URI": "http://127.0.0.1:8888"
}
}
}
}
Restart the client. On first use, a browser opens for Spotify authorization; the token is cached locally. Keep the client secret and token cache private. Playback needs an available Spotify Connect device, so open Spotify on the device you want to control.
Client-specific setup: Claude Desktop, Claude Code, and Codex. Use the same command and environment variables in each client's format.
The package command above uses the published package, which may lag this README's source changes. To run the current checkout:
git clone https://github.com/jamiew/spotify-mcp.git
cd spotify-mcp
uv sync
In the config above, change command to uv and args to
["--directory", "/absolute/path/to/spotify-mcp", "run", "spotify-mcp"].
Keep the same environment variables. Without cloning, use
uvx --from git+https://github.com/jamiew/spotify-mcp.git spotify-mcp.
Reauthorization: artist-follow checks need user-follow-read. Existing grants do not
receive new scopes automatically. Restart and complete Spotify authorization when prompted;
if access is still denied, review the app's grant in your Spotify account and reauthorize.
Do not automatically delete the auth cache.
28 tools, six resources (user, playback, track, playlist, artist, album), and five prompts. Tools provide typed outputs and behavior annotations; large playlist reads report progress. Playlist removal asks for confirmation where supported, reordering uses snapshot guards, and playback control attempts best-effort read-after-write confirmation, not guaranteed success.
| Tool | Does |
|---|---|
get_me | Read your profile |
search_music | Search tracks, albums, artists, or playlists with filters and pagination |
get_tracks | Read up to 50 tracks; individual reads when batching is unavailable |
get_artist | Read up to 50 artists; top tracks for a single artist |
get_album | Read up to 20 albums; track list for a single album |
get_playback_state | Read current track, device, progress, shuffle, and repeat |
control_playback | Play, pause, skip, seek, volume, shuffle, and repeat |
list_devices | List Spotify Connect devices |
transfer_playback | Move playback to another device |
get_queue | Read now playing and upcoming tracks |
add_to_queue | Queue a track |
list_playlists | List your playlists with pagination |
get_playlist | Read playlist metadata without tracks |
get_playlist_tracks | Read playlist tracks with pagination |
create_playlist | Create a private playlist; set public=true to publish |
update_playlist_details | Change name, description, or visibility |
add_tracks_to_playlist | Add up to 100 tracks |
remove_tracks_from_playlist | Remove tracks with confirmation where supported |
reorder_playlist | Move a block of tracks |
unfollow_playlist | Unfollow a playlist, including your own |
get_saved_tracks | Read Liked Songs with pagination |
save_tracks | Like tracks |
remove_saved_tracks | Unlike tracks |
check_saved_tracks | Check up to 50 tracks against Liked Songs |
check_saved_albums | Check up to 20 saved albums |
check_following_artists | Check up to 50 followed artists |
get_top_items | Read top artists or tracks over a time range |
get_recently_played | Read recently played tracks with timestamps |
offset + limit, not
the requested size. Individual-track fallback can make up to 50 Spotify requests.id: null. Local files also set is_local; positions remain valid for reordering.QUOTA_EXCEEDED and ordinary
rate limits with Retry-After when provided. No guaranteed quota reset time is specified.Shared versions and tool names do not imply drop-in compatibility with other implementations. Check arguments, limits, and result shapes before switching. Preserve any workflow that relies on this server's resources, five prompts, snapshot guards, removal confirmation, or playback confirmation; those behaviors are not universal.
MIT license, copyright 2025 Varun Neal Srivastava. Thanks to @varunneal for the original project, @jamiew, @jonico, @tedeuxx, and @karimStekelenburg.
Banner made with Glif.
Source-derived launch command. Check the maintainer’s required arguments and credentials before running:
uvx spotify-mcp-jamiewMerge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.
{
"mcpServers": {
"io-github-jamiew-spotify-mcp": {
"command": "uvx",
"args": [
"spotify-mcp-jamiew"
]
}
}
}Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.
Claude Desktop setup referenceSpotify works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.