Labsco
MCP SERVER

Spotify

by obre10off

Control Spotify playback by asking — play, pause, skip, search, and find out what is playing.

Music & Audio Production
Summary
The setup is heavier than the tools are — plan for that, not the other way round.

Six playback tools is about as simple as an MCP server gets, and it does what it says. The cost is entirely up front: a developer application, a redirect URI, an authorisation script, and tokens pasted by hand into a file. Premium is a hard requirement because the playback endpoints need it. Once past that, the useful pattern is search-then-play, since naming a track exactly is what makes playback land on the right thing.

What it is

A small MCP server over the Spotify Web API that drives playback on your account. Six tools cover the whole remote: start or resume something, pause, move between tracks, ask what is playing, and search the catalogue.

What you get
  • `play` starts a track, album or playlist, or resumes what was paused — it also accepts a Spotify URI directly
  • `pause` stops playback
  • `next` and `previous` move through the queue
  • `get_current_track` returns what is playing right now
  • `search` looks up tracks, albums, artists or playlists so the play call has something to name
Requirements

Bun version 1.0.0 or later, and a Spotify Premium account. You also need your own Spotify developer application: create it in the developer dashboard, take the client ID and secret, and add `http://localhost:8888/callback` to its redirect URIs. Put `SPOTIFY_CLIENT_ID`, `SPOTIFY_CLIENT_SECRET` and `SPOTIFY_REDIRECT_URI` in a `.env`, run `bun run auth` to complete the browser flow, and paste the returned `SPOTIFY_ACCESS_TOKEN` and `SPOTIFY_REFRESH_TOKEN` back into the file. The server runs with `bun run start` and must stay running while the client uses it.