Back to MCP Servers

Spotify MCP Server

Community MCP server for the Spotify Web API. Search, playback control, queue management, and full playlist and album operations.

Entertainment by marcelmarais (community) OAuth2 active
Overview

Spotify does not publish an official MCP server. The most actively maintained community implementation is marcelmarais/spotify-mcp-server, a lightweight Node.js MCP server that wraps the Spotify Web API and lets AI assistants like Claude Desktop, Cursor, and VS Code (via Cline) control playback and manage music libraries through natural language.

The server exposes roughly 30 tools across four categories: read operations (search, now playing, playlists, recently played, saved tracks, queue, devices), playback and create operations (play, pause, skip, queue, volume, create playlist, add tracks), album operations (get album, get album tracks, save/remove album, check saved), and playlist operations (get, update, remove tracks, reorder). Authentication uses Spotify OAuth 2.0 with automatic refresh token rotation handled by the server.

Because it relies on Spotify's standard Web API, a Spotify Premium account is required for most playback control endpoints (volume, transfer playback, etc.) and a registered Spotify Developer application is needed for OAuth credentials.

Tools

Tool Description
searchSpotify Search Spotify for tracks, albums, artists, or playlists
getNowPlaying Return the currently playing track for the authenticated user
getMyPlaylists List playlists owned or followed by the user
getPlaylistTracks Get tracks in a specific playlist
getRecentlyPlayed List recently played tracks
getUsersSavedTracks Get the user's Liked Songs
removeUsersSavedTracks Remove tracks from Liked Songs (max 40 per call)
getQueue Return the current playback queue
getAvailableDevices List Spotify Connect devices available for playback
playMusic Start or transfer playback of a track, album, artist, or playlist
pausePlayback Pause current playback
resumePlayback Resume paused playback
skipToNext Skip to the next track
skipToPrevious Skip to the previous track
addToQueue Add a track to the playback queue
setVolume Set playback volume (Premium only)
adjustVolume Increase or decrease volume by a delta (Premium only)
createPlaylist Create a new playlist for the user
addTracksToPlaylist Add tracks to an existing playlist
getAlbums Get details for one or more albums (max 20)
getAlbumTracks List tracks for a given album
saveOrRemoveAlbumForUser Save or remove an album from the user's library
checkUsersSavedAlbums Check whether albums are saved in the user's library
getPlaylist Get details for a specific playlist
updatePlaylist Update playlist name, description, or visibility
removeTracksFromPlaylist Remove tracks from a playlist (max 100 per call)
reorderPlaylistItems Reorder tracks within a playlist
Setup Guide

Prerequisites

  • Node.js v16 or higher
  • Spotify Premium account (required for playback control endpoints)
  • A registered Spotify Developer application at developer.spotify.com to obtain a Client ID, Client Secret, and Redirect URI

Install

git clone https://github.com/marcelmarais/spotify-mcp-server.git
cd spotify-mcp-server
npm install
npm run build

Configure credentials

Create spotify-config.json in the repo root:

{
  "clientId": "your-client-id",
  "clientSecret": "your-client-secret",
  "redirectUri": "http://127.0.0.1:8888/callback"
}

Run the auth helper, log in to Spotify in the browser, and tokens will be written back into the config file:

npm run auth

Claude Desktop config

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "spotify": {
      "command": "node",
      "args": ["/absolute/path/to/spotify-mcp-server/build/index.js"]
    }
  }
}

The server automatically refreshes access tokens using the stored refresh token. Re-running npm run auth is only needed if the refresh token is revoked.

Use Cases
  • Voice-style playback control: "play the new Bon Iver album on my Living Room speaker," "skip this track," "set volume to 30%"
  • Build and curate playlists from natural language prompts, including creating a playlist, searching for matching tracks, and adding them in one flow
  • Programmatically clean up the music library: remove duplicates from Liked Songs, prune old playlists, or reorder a playlist by energy
  • Discover what is currently playing and queue follow-up tracks via the AI assistant without leaving the editor or chat
  • Audit listening behavior by pulling recently played tracks and summarizing patterns over time
Example Prompts
  • "Search Spotify for lo-fi study playlists and start playing the top result on my laptop."
  • "Create a playlist called Morning Focus and add 20 instrumental tracks from artists similar to Nils Frahm."
  • "What's currently playing, and what are the next three tracks in the queue?"
  • "Remove every track by Artist X from my Liked Songs."
  • "Reorder my Workout playlist so the highest-tempo tracks come first."
Pros
  • Broad tool coverage (about 30 tools) spanning search, playback, queue, library, albums, and playlist editing
  • Automatic OAuth refresh token handling, so re-auth is rarely needed
  • Works with Claude Desktop, Cursor, and VS Code (Cline) out of the box
  • Actively maintained relative to other community Spotify MCP projects
Limitations
  • Not an official Spotify project; community maintained with no SLA
  • Volume and several playback endpoints require a Spotify Premium account
  • Hard per-call limits inherited from the Spotify API (40 tracks per Liked Songs removal, 20 albums per lookup, 100 tracks per playlist removal)
Alternatives