Provides comprehensive Spotify integration with tools for searching the music catalog, reading player status, controlling playback and devices, managing playlists, and managing saved songs. Supports fuzzy search queries, voice control, and mood-based playlist creation.
Spotify MCP Server
Streamable HTTP MCP server for Spotify — search music, control playback, manage playlists and saved songs.
Author: overment
This warning applies only to the HTTP transport and OAuth wrapper included for convenience. They are intended for personal/local use and are not production‑hardened.
The MCP tools and schemas themselves are implemented with strong validation, slim outputs, clear error handling, and other best practices.
If you plan to deploy remotely, harden the OAuth/HTTP layer: proper token validation, secure storage, TLS termination, strict CORS/origin checks, rate limiting, audit logging, and compliance with Spotify's terms.
Motivation
At first glance, a "Spotify MCP" may seem unnecessary—pressing play or skipping a song is often faster by hand. It becomes genuinely useful when you don't know the exact title (e.g., "soundtrack from [movie title]"), when you want to "create and play a playlist that matches my mood", or when you're using voice. This MCP lets an LLM handle the fuzzy intent → search → selection → control loop, and it returns clear confirmations of what happened. It works well with voice interfaces and can be connected to agents/workflows for smart‑home automations.
Demo


Claude Desktop
Related MCP server: Spotify MCP Server
Features
✅ Search — Find tracks, albums, artists, playlists
✅ Player Control — Play, pause, skip, seek, volume, shuffle, repeat, queue
✅ Device Transfer — Move playback between devices
✅ Playlists — Create, edit, add/remove tracks, reorder
✅ Library — Save/remove tracks, check if saved
✅ OAuth 2.1 — Secure PKCE flow with RS token mapping
✅ Dual Runtime — Node.js/Bun or Cloudflare Workers
✅ Production Ready — Encrypted token storage, rate limiting, multi-user support
Design Principles
LLM-friendly: Tools don't mirror Spotify's API 1:1 — interfaces are simplified and unified
Batch-first: Operations use arrays (
queries[],operations[]) to minimize tool callsClear feedback: Every response includes human-readable
_msgwith what succeeded/failedBest-effort verification: Player control verifies device, context, and current track
Quick Start
1. Install
2. Configure
Edit .env:
3. Configure Spotify Dashboard
Add redirect URIs in Spotify Developer Dashboard:
4. Run
Server Instructions (What the Model Sees)
Tools
search_catalog
Search songs, artists, albums, and playlists.
Input:
Output:
player_status
Read current player state, devices, queue, and current track.
Input:
Output:
spotify_control
Control playback with batch operations.
Input:
Output:
spotify_playlist
Manage playlists.
Input:
spotify_library
Manage saved tracks.
Input:
Example Session
A complete walkthrough showing all tools working together.
1. "What's playing?"
Tool: player_status
Response:
2. "Play Protected from this playlist"
First, get playlist items to find the track position:
Tool: spotify_playlist
Response:
Then play at position #7:
Tool: spotify_control
Response:
3. "Add this to my favorites"
Tool: spotify_library
Response:
4. "Turn volume up to 100%"
Tool: spotify_control
Response:
HTTP Endpoints
POST /mcp— MCP JSON-RPC 2.0 endpointGET /mcp— SSE stream (Node.js only)GET /health— Health checkGET /.well-known/oauth-authorization-server— OAuth AS metadataGET /.well-known/oauth-protected-resource— OAuth RS metadata
OAuth (PORT+1):
GET /authorize— Start OAuth flowGET /oauth/callback— Provider callbackPOST /token— Token exchangePOST /revoke— Revoke tokens
Client Configuration (Claude Desktop)
Cloudflare Workers
Setup
Create KV namespace:
Update
wrangler.toml:
Set secrets:
Note:
TOKENS_ENC_KEYencrypts OAuth tokens stored in KV (AES-256-GCM). Without it, tokens are stored in plaintext (not recommended for production).
Deploy:
Development
Architecture
Troubleshooting
Issue | Solution |
"Device not found" | You used device name instead of device_id. Get the actual ID from
|
"No active device" | Open Spotify on a device, then use
to list devices |
"Unauthorized" | Complete OAuth flow. Tokens may have expired. |
"Rate limited" | Wait a moment and retry |
License
MIT