
Spotify Mcp
io.github.XavierFabregatPublished by GitHub account XavierFabregatv0.1.2Updated Oct 24, 2026
Conversational Spotify control from AI clients: play, queue, devices, playlists, and library.
Overview
Local MCP server that lets an AI assistant control Spotify: play music, manage the queue, devices, playlists and library.
- What you can do
- Play music by free-text query or Spotify URI, and control playback (pause, resume, next, previous, seek, volume, shuffle, repeat)
- Check what is currently playing, including progress, device and mode
- Add tracks to the queue and see what is up next
- List and transfer between Spotify devices
- Search tracks, albums, artists and playlists, and list your playlists and their tracks
- Create playlists, add tracks, and save, remove or check library items
- When to use it
- Useful when you want to drive Spotify conversationally from Claude Desktop, Claude Code, Cursor or another MCP client — for example asking for music by description, queueing an album, or saving a track — without switching apps.
- Requirements
- Runs locally via npx with Node.js 20 or newer. Needs a Spotify Premium account and your own Spotify developer app (Client ID), created through the init wizard; login uses OAuth PKCE with no client secret. The app's redirect URI must be exactly and port 8888 must be free during login. Tokens are stored in ~/.spotify-mcp/.
Installation
In SourceWeft
- Open Spotify Mcp in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
[Image] spotify-mcp
Control Spotify by talking to your AI. An MCP server for Claude Desktop, Claude Code, Cursor, and any other MCP client.
You: play something like early Bill Evans AI: ▶ Now playing: "Peace Piece" — Bill Evans · Everybody Digs Bill Evans
You: perfect, queue the whole album and save this one AI: ➕ Queued Everybody Digs Bill Evans · ❤️ Saved "Peace Piece" to your library
Built against the current (post-February-2026) Spotify Web API — many older Spotify MCP servers predate those changes and are partially broken.
Requirements
- Spotify Premium — Spotify requires it for playback control and (since Feb 2026) for creating the developer app you'll use.
- Node.js ≥ 20
Quick start
The wizard walks you through creating your own (free) Spotify developer app, asks for its Client ID, and opens a browser to connect your account — about 2 minutes total.
Why your own app? Spotify caps third-party apps at a handful of users, so every user
brings their own; the wizard makes that painless. No client secret is involved (PKCE).
Tokens stay in ~/.spotify-mcp/ on your machine and refresh silently.
The one detail that must be exact — your app's Redirect URI:
Add to your MCP client
Claude Code
Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json)
or Cursor (~/.cursor/mcp.json):
Restart the client and start talking.
Claude Desktop extension (one-click)
Prefer not to edit config files? Install the .mcpb bundle instead: download
spotify-mcp.mcpb from the latest release,
open it (or drag it into Claude Desktop → Settings → Extensions), and paste your Spotify
app's Client ID when prompted. Then ask Claude to connect Spotify — the authenticate
tool opens the browser login. You still need the developer app and Redirect URI from
the quick start, but not the init wizard.
Tools
Design
- Tools are intents, not endpoints. "Play some Radiohead" is one tool call — the server searches, picks the best match, starts playback, and reports what it chose so you can correct it. No search → choose → play round trips.
- Small surface. 11 tools instead of one per API endpoint keeps tool selection accurate across different AI clients and context lean.
- Responses are compact text with Spotify URIs, so follow-ups ("queue that") chain without re-searching. Raw API payloads never reach the model.
- Errors are instructions. No active device? The response lists your devices and
says how to pick one. Not logged in? It points at the
authenticatetool. The model relays the fix instead of a stack trace.
Troubleshooting
- "No active Spotify device" — Spotify's API can only steer a running app. Open Spotify anywhere; if it just woke up, tap play/pause once. With exactly one device online, the tools target it automatically.
INVALID_CLIENT: Invalid redirect URIduring login — the Redirect URI in your app settings isn't exactlyhttp://127.0.0.1:8888/callback(localhostis rejected by Spotify).- Port 8888 in use during login — set
SPOTIFY_REDIRECT_PORTto a free port and register the matching redirect URI. - "Token refresh failed" — run
npx -y @xavifabregat/spotify-mcp authto log in again (e.g. after changing the Client ID). - Config precedence — the
SPOTIFY_CLIENT_IDenv var overrides~/.spotify-mcp/config.json(written byinit).
Development
Layout: src/auth.ts (OAuth PKCE + token store) · src/spotify.ts (typed API
client) · src/tools/ (tool implementations) · src/format.ts (compact output).
License
MIT © Xavi Fabregat
Source: README.md at commit 05b1c5d
Tools
0Version history
1- v0.1.2LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts