SuperAPI AI Directory

spotify-mcp

Conversational Spotify control: play by description and manage the queue, devices, playlists and library, with a guided setup wizard.

Open website

About this tool

spotify-mcp is a server for MCP (Model Context Protocol) clients, whose core purpose is to let users control Spotify through conversation with an AI. It works with Claude Desktop, Claude Code, Cursor, and any other MCP client.

Main capabilities

  • Request music in descriptive language: for example, tell the AI "play something like early Bill Evans", and the server will search, pick the best match, start playback, and report what it chose, making it easy for the user to correct.
  • Manage the playback queue and music library: for example, "queue the whole album and save this one", which can add an entire album to the queue and save the specified track to the music library.
  • Manage devices, playlists, and the music library.
  • Tools are designed as "intents" rather than "endpoints": a single tool call can complete search, selection, and playback, without the multi-round back-and-forth of "search -> select -> play".
  • A streamlined number of tools: 11 tools in total, rather than one per API endpoint, so that tool selection remains accurate and context stays lean across different AI clients.
  • Responses are compact text and include Spotify URIs, making it easy to chain follow-up instructions directly (such as "queue that") without searching again; raw API payloads are not passed to the model.
  • Error messages are operational guidance: when there is no active device, the response lists devices and explains how to select one; when not logged in, it points to the authenticate tool, and the model can relay the fix rather than stack information.

How to use

  • Prerequisite: Spotify Premium is required. Spotify requires Premium to control playback, and as of February 2026, creating a developer app also requires Premium.
  • The setup wizard guides you through creating your own (free) Spotify developer app, requires entering its Client ID, and opens a browser to connect your account; the whole process takes about 2 minutes.
  • Why you need your own app: Spotify has a cap on the number of users for third-party apps, so each user brings their own app; the wizard makes this process easy. No client secret is involved (PKCE is used). Tokens are stored locally in the ~/.spotify-mcp/ directory and are refreshed silently.
  • Details that must be set exactly: the app's redirect URI must be http://127.0.0.1:8888/callback(Spotify rejects localhost).
  • Add to an MCP client: Claude Desktop's config file is located at ~/Library/Application Support/Claude/claude_desktop_config.json, and Cursor's config file is located at ~/.cursor/mcp.json. Restart the client and you can start the conversation.
  • Authentication command: npx -y @xavifabregat/spotify-mcp auth.
  • Configuration priority: the SPOTIFY_CLIENT_ID environment variable overrides ~/.spotify-mcp/config.json (written by init).

Use cases

  • Users who want to quickly play, queue, and save music via natural language.
  • Users who use MCP clients such as Claude Desktop, Claude Code, and Cursor and want to integrate Spotify control into their AI conversation workflow.

Limitations and notes

  • A Spotify Premium account is required.
  • Built on the Spotify Web API after February 2026; many earlier Spotify MCP servers predate these changes and may partially fail.
  • Common issue: when prompted with "No active Spotify device", the Spotify API can only control a running app, so you need to open Spotify somewhere; if it was just woken up, tap play/pause once; when only one device is online, the tool will automatically point to it. If INVALID_CLIENT: Invalid redirect URI appears during login, it means the redirect URI in the app settings is not the exact http://127.0.0.1:8888/callback。登录时端口 If 8888 is occupied, you can set SPOTIFY_REDIRECT_PORT to an available port and register a matching redirect URI. When "Token refresh failed" occurs, run npx -y @xavifabregat/spotify-mcp auth to log in again (for example, after changing the Client ID).
  • Code structure: src/auth.ts (OAuth PKCE + token storage), src/spotify.ts (typed API client), src/tools/ (tool implementations), src/format.ts (compact output).
  • License: MIT © Xavi Fabregat.