spotify-mcp
The spotify-mcp server integrates Spotify's Web API with Claude, enabling comprehensive Spotify control through natural conversation.
Playback Control (
SpotifyPlayback): Get current playback status, start/resume (optionally with a specific URI), pause, or skip tracks (with configurable skip count)Music Search (
SpotifySearch): Find tracks, albums, artists, or playlists by query, up to 10 results per Spotify API constraintsQueue Management (
SpotifyQueue): View the current playback queue or add specific tracks by IDItem Info Lookup (
SpotifyGetInfo): Retrieve detailed information about any Spotify item (track, album, artist, playlist) via its URIPlaylist Management (
SpotifyPlaylist): Full CRUD — list playlists, get tracks, add/remove tracks, update name/description/visibility, create, or delete playlistsLiked Songs Access (
SpotifyLikedSongs): Retrieve your saved songs with optional genre enrichment and configurable result limit
Authentication uses OAuth with auto-refreshing tokens after initial setup via --auth.
Provides tools to control music playback, search for tracks, albums, and artists, manage the play queue, and perform full playlist management including creating, updating, and deleting playlists.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@spotify-mcpplay my 'Deep Focus' playlist and skip to the next track"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
spotify-mcp
A Model Context Protocol (MCP) server that connects Claude with Spotify. Control your Spotify playback, search music, manage playlists, and more -- all through natural conversation with Claude.
Fork Notice: This project is forked from varunneal/spotify-mcp and updated for the Spotify Web API February 2026 changes. Built and maintained with Claude Code.
What's Changed (v0.4.0)
Architecture Rewrite
Dropped
spotipy-- useshttpxasync directly (native async, noasyncio.to_threadwrapping)Single module --
server.py,spotify_api.py,utils.pyconsolidated into one fileFastMCP -- clean
@mcp.tool()decorators instead of manual ToolModel + match/case routing2 dependencies -- only
mcp+httpx(wasmcp+spotipy+python-dotenv)Explicit OAuth --
spotify-mcp --authfor initial setup, auto-refresh on subsequent use
Features (preserved from v0.3.0)
Start, pause, and skip playback
Search for tracks, albums, artists, and playlists
Get detailed info about any Spotify item
Manage the playback queue
Full playlist CRUD (create, read, update, delete tracks)
Retrieve liked/saved songs with optional genre enrichment
Adapted for Spotify Feb 2026 API changes
How It Works
Claude <--MCP (stdio)--> spotify-mcp <--httpx async--> Spotify Web APIClaude sends tool calls via the MCP protocol
The server translates them into Spotify Web API requests using
httpxOAuth tokens auto-refresh; initial auth via
spotify-mcp --authResults are parsed into concise JSON and returned to Claude
Available Tools
Tool | Actions | Description |
|
| Control music playback |
| -- | Search tracks, albums, artists, playlists |
|
| View and manage play queue |
| -- | Get detailed item info by Spotify URI |
|
| Full playlist management |
|
| Retrieve saved songs with optional genres |
Architecture
src/spotify_mcp/
__init__.py # Entry point (stdio / --auth)
server.py # FastMCP server, API client, parsers — all in onePrerequisites
Python 3.12+
Spotify Premium account (required for Dev Mode API access since Feb 2026)
Spotify Developer App credentials
Configuration
1. Create Spotify Developer App
Create a new app
Set redirect URI to
http://127.0.0.1:8080/callbackNote your Client ID and Client Secret
Important (Feb 2026): Dev Mode apps are limited to 5 authorized users and require the app owner to have Spotify Premium.
2. Initial Authentication
Run the auth flow once to get your OAuth token:
SPOTIFY_CLIENT_ID=your_id SPOTIFY_CLIENT_SECRET=your_secret uv run spotify-mcp --authThis opens a browser for Spotify login, then saves the token to ~/.spotify_mcp_cache.json.
3. Add to MCP Client
Run locally (recommended)
git clone https://github.com/verIdyia/spotify-mcp.gitAdd to your MCP config (Claude Desktop, Cursor, etc.):
{
"mcpServers": {
"spotify": {
"command": "uv",
"args": [
"--directory",
"/path/to/spotify-mcp",
"run",
"spotify-mcp"
],
"env": {
"SPOTIFY_CLIENT_ID": "your_client_id",
"SPOTIFY_CLIENT_SECRET": "your_client_secret",
"SPOTIFY_REDIRECT_URI": "http://127.0.0.1:8080/callback"
}
}
}
}Run with uvx
{
"mcpServers": {
"spotify": {
"command": "uvx",
"args": [
"--python", "3.12",
"--from", "git+https://github.com/verIdyia/spotify-mcp",
"spotify-mcp"
],
"env": {
"SPOTIFY_CLIENT_ID": "your_client_id",
"SPOTIFY_CLIENT_SECRET": "your_client_secret",
"SPOTIFY_REDIRECT_URI": "http://127.0.0.1:8080/callback"
}
}
}
}Environment Variables
Variable | Required | Default | Description |
| Yes | -- | Spotify app Client ID |
| Yes | -- | Spotify app Client Secret |
| No |
| OAuth redirect URI |
| No |
| Token cache file path |
Troubleshooting
First run: Run
spotify-mcp --authto complete the OAuth flow before using with an MCP clientToken expired: Tokens auto-refresh. If issues persist, re-run
--authNo active device: Make sure Spotify is open and playing on at least one device
Make sure
uvis updated -- version>=0.54recommended
Debugging
Launch the MCP Inspector:
npx @modelcontextprotocol/inspector uv --directory /path/to/spotify-mcp run spotify-mcpSpotify API Feb 2026 Changes Summary
Change | Impact | Status |
Search | Fewer results per search | Adapted |
Playlist endpoints | Endpoint URLs changed | Adapted |
Response field | Parsing updated | Adapted |
Batch GET endpoints removed | Must fetch individually | Adapted |
| No longer available | Handled |
Dev Mode: 5 user limit, Premium required | Access restriction | Documented |
Credits
Original project: varunneal/spotify-mcp by Varun Srivastava (MIT License)
Original contributors: @jamiew, @davidpadbury, @manncodes, @hyuma7, @aanurraj, @JJGO and others
Maintained with: Claude Code (Anthropic)
License
MIT License -- see LICENSE for details.
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/verIdyia/spotify-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server