marcelmarais/spotify-mcp-server
Lightweight MCP server for Spotify
Spotify MCP Server – What It Is
Spotify MCP Server is a small Node‑JS service that implements the Model Context Protocol (MCP) for Spotify. It lets AI assistants (Claude, Cursor, VS Code’s Cline extension, etc.) talk to your Spotify account: they can query what’s playing, search the catalog, read or edit playlists, control playback, adjust volume, and more – all through a standardized set of “tools” exposed over MCP.
Core Features (as described in the README)
| Category | Operations (examples) | What they do |
|---|---|---|
| Read | searchSpotify, getNowPlaying, getMyPlaylists, getPlaylistTracks, getQueue, getAvailableDevices |
Query Spotify’s catalog, fetch the current track, list your playlists, see the playback queue, discover connected devices, etc. |
| Playback control | playMusic, pausePlayback, resumePlayback, skipToNext, skipToPrevious, addToQueue, setVolume, adjustVolume |
Start/stop music, move through the queue, add items, change volume (Premium required). |
| Album handling | getAlbums, getAlbumTracks, saveOrRemoveAlbumForUser, checkUsersSavedAlbums |
Retrieve album metadata, list tracks, save/remove albums from your library. |
| Playlist handling | createPlaylist, addTracksToPlaylist, removeTracksFromPlaylist, updatePlaylist, reorderPlaylistItems |
Create new playlists, add or delete tracks, edit metadata, reorder items. |
| User library | getUsersSavedTracks, removeUsersSavedTracks, getFollowedArtists |
Read or modify your “Liked Songs” and followed artists. |
All tools return structured JSON (IDs, names, status messages) that an AI can consume directly.
How to Get It Running
- Prerequisites – Node v26+, a Spotify Premium account, and a Spotify developer app.
- Install – Clone the repo, run
npm ci, thennpm run build. - Create a Spotify app – Obtain a client ID/secret and set a redirect URI.
- Configure – Copy
spotify-config.example.jsontospotify-config.jsonand fill in the credentials. - Authenticate – Run
npm run authto complete the OAuth flow; tokens are saved in the config file and refreshed automatically. - Start the server –
node build/index.js(default stdio transport) or, for HTTP‑based clients, setMCP_TRANSPORT=httpand optionallyMCP_AUTH=spotifyfor OAuth‑protected endpoints.
Using It with AI Tools
- Claude Desktop – Add a MCP entry pointing to the built
index.js. - Cursor – Add the same command in the MCP tab of settings.
- VS Code Cline extension – Provide a
cline_mcp_settings.jsonthat lists the server command and any auto‑approved tools.
The server can run as a long‑lived HTTP process (port 3000 by default) so multiple clients can share it. When MCP_AUTH=spotify is set, the endpoint follows RFC 9728, letting OAuth‑aware clients obtain a Spotify token themselves, keeping your personal refresh token out of the server.
Who Might Find This Useful?
- Developers building AI agents that need to control music playback as part of a broader workflow (e.g., “play background music while I code”).
- Power users who want their LLM‑based assistants (Claude, Cursor) to manage playlists or fetch the current song without manual clicks.
- Experimenters exploring MCP as a way to expose third‑party services to LLMs.
Bottom Line
Spotify MCP Server is a genuine, open‑source bridge between the Model Context Protocol and the Spotify Web API, providing a rich toolbox for AI assistants to read and manipulate a Spotify account programmatically. It is fully documented, includes OAuth handling, and can be run locally or behind an HTTP proxy for multiple clients.
Repository: marcelmarais/spotify-mcp-server
License / status: Not specified in the README, but the project appears actively maintained (build scripts, Docker notes, integration guides).
Related
- Project
- Project
- Project
- Project
- Project