Spotify MCP Server
A Spotify MCP server: the agent searches music, controls playback, queue and volume, and builds and edits playlists and the library
- 490 ★ on the repository
- Last commit
- MIT
Broad access
Why this level
- Spotify access and refresh tokens are stored in spotify-config.json next to the Client Secret
- The agent can create and edit playlists, remove liked tracks and change playback on your devices
- Requests 15 Spotify scopes, including profile data and follows
Install
- Works in
Manual install
git clone https://github.com/marcelmarais/spotify-mcp-server.git && cd spotify-mcp-server && npm ci && npm run buildNeeds Node.js Current, a Premium account and an app in the Spotify Developer Dashboard. Then create spotify-config.json from the example and run npm run auth.
Access and checks
How we reviewBroad accessThe tool can change data, run commands or handle secrets.
- Spotify access and refresh tokens are stored in spotify-config.json next to the Client Secret
- The agent can create and edit playlists, remove liked tracks and change playback on your devices
- Requests 15 Spotify scopes, including profile data and follows
This is third-party code. Review the repository files before installing.
What it does
The server gives an agent 28 Spotify tools. Read: search for tracks, albums, artists and playlists, the current track with device and volume, the queue, recently played, liked tracks, followed artists and the list of Spotify Connect devices. Control: play a track, album, artist or playlist, pause and resume, skip, add to the queue, set or adjust volume. For playlists there is create, rename, add, remove and reorder. For albums the agent reads details and tracks, saves them to the library and checks whether they are saved. Liked tracks are removed by ID, up to 40 per request, and up to 100 from a playlist. By default the server runs over stdio and keeps tokens in spotify-config.json, refreshing them itself. MCP_TRANSPORT=http starts one process for several clients at 127.0.0.1:3000/mcp. With MCP_AUTH=spotify it takes a Spotify token from the request header and writes nothing to disk.
Who it is for. For Spotify Premium listeners who want to run music and playlists with plain requests in Claude Desktop, Cursor or Cline.
Good fit when
- You want a playlist built from a description, such as a blend of two artists, with matching tracks added
- You need to move tracks from one playlist to another, for example techno from a workout list to a work list
- You want to change volume and queue by request through the agent: "turn it down a bit", "queue this album next"
- You need to know what is playing and on which device, and move playback to another one
- One server should serve several clients, so run it in Streamable HTTP mode
Not a fit when
- You have no Spotify Premium: volume and some playback control require it
- You need to work with other people's accounts: the server uses your sign-in and your playlists
- You are not ready to register an app in the Spotify Developer Dashboard and store a Client Secret
- The agent must not be allowed to remove liked tracks and change playlists, and you cannot limit its tool set
Example request
Create a playlist blending Taylor Swift and Slipknot and add the five best-known tracks by eachMCP
- Transport
- stdio, http
- Authentication
- OAuth
Environment variables
MCP_TRANSPORT- Set to http to use Streamable HTTP instead of stdio
MCP_HTTP_PORT- HTTP mode port, 3000 by default
MCP_AUTH- Set to spotify to require a Spotify Bearer token on requests
Limitations
- A Spotify Premium account and a registered app in the Spotify Developer Dashboard with Client ID, Client Secret and Redirect URI are required.
- Building needs the latest Node.js Current release; older lines are unsupported.
- Install is from source: clone, npm ci and npm run build; there is no package to run through npx in the README.
- Spotify's availability from Russia is not covered in the repository.
How to disable. Remove the spotify block from the MCP client config and stop the server process. Tokens live in spotify-config.json inside the project folder; delete that file. App access can be revoked in Spotify account settings.
FAQ
How do I connect Spotify to Claude Desktop through MCP?
Build the server (npm ci, npm run build), create an app in the Spotify Developer Dashboard and run npm run auth. Then add a spotify block with command node and the path to build/index.js to claude_desktop_config.json, as the README shows, and restart Claude Desktop.
Does the Spotify MCP server need Premium?
Setting and adjusting volume needs Premium, as the setVolume and adjustVolume tool descriptions say. The README's prerequisites list it as a requirement for the whole setup.
What can the agent do with playlists through this server?
Create a playlist, change its name, description and visibility, add and remove tracks, reorder a range of tracks and read the contents. For safe edits, removal and reordering accept a snapshotId of the intended playlist version.
How do I run the server for several clients at once?
Set MCP_TRANSPORT=http and a port in MCP_HTTP_PORT, and clients connect to http://127.0.0.1:3000/mcp. With MCP_AUTH=spotify the server acts as an OAuth-protected endpoint, and the repository ships a Dockerfile and docker-compose.yml for that mode.
Where does the Spotify MCP server keep tokens?
In spotify-config.json in the project root. The server refreshes the access token itself, typically hourly. If a refresh fails, run npm run auth again. In MCP_AUTH=spotify mode nothing is written to disk.
Discussion
No questions or reviews yet.
Related
MCP serversA Python library and MCP server that give an agent public Spotify data, lyrics and transcripts with no API key
Yandex Music MCP server with a native macOS player
yandex-music-mcp
A browser-free Yandex Music MCP server: the agent queues a playlist, a local daemon plays it via mpv with Now Playing in Control Center
Yandex Music MCP server with genre analysis
Yandex Music MCP Server
An unofficial Yandex Music MCP server: likes, genre analysis, search and playlist management over HTTP or stdio
An MCP server for Ableton Live: the agent creates tracks, places clips and builds arrangements straight in the open project
MCP Music Forge: track download and processing
MCP Music Forge
A Redis-backed queue MCP server that downloads tracks from SoundCloud, YouTube, Yandex Music and Spotify, transcodes them and tags them with cover art
Yandex Music MCP for taste analysis
Yandex Music MCP
A single-file, zero-install Yandex Music MCP server via uv: likes, playlists, search and taste analysis
Comparison with similar tools
Entries that share the main search query, and how they differ.
| Entry | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| Spotify MCP Server (this entry) | no | OAuth | 490 | |
| aurlune Yandex Music player MCP server | no | API key | 0 | an MCP server for a local Yandex Music player on Linux: a different service and platform |
| SpotifyScraper | no | not required | 322 | a Python library and MCP server that give an agent public Spotify data |
README in short
The README opens with four example requests and a list of 28 tools split into read, playback control and create, albums and playlists. Prerequisites, install from source, Spotify app registration and the OAuth procedure with automatic token refresh follow. The last sections cover connecting to Claude Desktop, Cursor and Cline, Streamable HTTP mode, OAuth for MCPHub and running in Docker.