spotify-mcp
Provides tools to control Spotify playback, search the catalog, manage the user's library and playlists, and retrieve listening stats through the Spotify Web API.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
spotify-mcp
An MCP server that lets an AI assistant control Spotify: playback,
search, your library, and full playlist management. It is built against the Spotify Web API as it
stands after the February 2026 changes
(/me/library, /me/playlists, /playlists/{id}/items), which broke most older Spotify MCP servers.
Login uses OAuth PKCE: you only need a Client ID, no client secret.
Everything it stores lives in one directory (
~/.spotify-mcp), so removing it is one command.
Tools
Area | Tools |
Login |
|
Catalog |
|
Playback |
|
Library |
|
Playlists |
|
Stats |
|
Tools accept Spotify URIs (spotify:track:…) and open.spotify.com links interchangeably.
Related MCP server: Spotify MCP Server
Requirements
Node.js 22.18 or newer
Spotify Premium (Spotify requires it for playback control and for developer apps)
A Spotify developer app (free, takes two minutes):
Open the developer dashboard and create an app.
Add the Redirect URI
http://127.0.0.1:8888/callbackexactly (Spotify rejectslocalhost).Tick Web API, save, and copy the Client ID.
Setup
Add the server to your MCP client. It runs straight from GitHub; nothing is installed globally.
Claude Code
claude mcp add spotify -e SPOTIFY_CLIENT_ID=<your-client-id> -- npx -y github:coconutbird/spotify-mcpClaude Desktop, Cursor, and other clients
{
"mcpServers": {
"spotify": {
"command": "npx",
"args": ["-y", "github:coconutbird/spotify-mcp"],
"env": { "SPOTIFY_CLIENT_ID": "<your-client-id>" }
}
}
}Then ask the assistant to connect Spotify: the authenticate tool opens the browser for approval.
Alternatively, log in from a terminal first:
npx -y github:coconutbird/spotify-mcp auth --client-id <your-client-id>Configuration
Variable | Default | Purpose |
| stored by | Client ID of your Spotify app |
|
| Must match the URI registered for your app |
|
| Where the config and the refresh token live |
Removing it
Delete the stored token and config:
npx -y github:coconutbird/spotify-mcp reset(or delete~/.spotify-mcp).Remove the server from your client, e.g.
claude mcp remove spotify.Optionally delete the app in the Spotify dashboard, or revoke access under Manage apps.
CLI
spotify-mcp [serve] Run the MCP server on stdio (default)
spotify-mcp auth [--client-id ID] Log in to Spotify in the browser
spotify-mcp status Show the configuration and login state
spotify-mcp logout Delete the stored token
spotify-mcp reset Delete all stored dataDevelopment
The repository pins its toolchain with mise (Node LTS).
mise install # Node LTS
mise run install # npm ci
mise run check # typecheck, lint, format check, tests
mise run build # compile to dist/
mise run fix # eslint --fix and prettierLayout:
src/
index.ts CLI entry point
cli/commands.ts serve, auth, status, logout, reset
server.ts MCP server: registers every tool group
app-context.ts composition root (storage, login flow, Spotify client)
config/ settings resolution and validated JSON storage
auth/ PKCE login flow, callback listener, token refresh
spotify/
api-client.ts axios instance: auth header, retry on 401/429, error mapping
services/ one service class per API area (*.service.ts)
types.ts, uri.ts response types, URI/URL parsing
tools/ one module per tool group (*.tools.ts) plus shared params/resolvers
format/ plain-text renderings returned to the model
test/ unit suites (node:test, run directly from TypeScript)
integration/ MCP client → server → services → axios → a local fake Spotify over HTTP
support/ the fake Spotify server and the integration harnessLicense
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Full Spotify Web API coverage - albums, artists, playlists, player controls, and more.
Spotify: Spotify Data API for Millions of songs & podcasts, artists, albums, playlists and more.
Spotify MCP server for ChatGPT, Claude and any AI agent: search songs and artists, list playlists, read playlist songs, create playlist, add songs to playlist, remove songs from playlist, set playlist public or private and save to Liked Songs in your own Spotify account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Spotify yourself; Cotlet does not store your password and you need no Spotify API key. About the official Spotify API: Spotify has a full Web API and, since 23 Apr 2026, an official connector for Claude (checked 5 Nov 2026). The API needs an app you register, and in development mode the app owner must have Premium and the app allows 5 users; unlimited users need a registered business with at least 250,000 monthly users. Setup and FAQ: https://cotlet.dev/integrations/spotify-api-mcp-server
Personal context and preferences for AI via OAuth-approved profile sections and taste data.
Related MCP Servers
- FlicenseBqualityDmaintenanceEnables AI assistants to control Spotify playback, search for music, manage playlists, and interact with your Spotify library through natural language commands.19-
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to control Spotify playback, search music, manage playlists and library, and access user listening insights via the Spotify Web API.-
- AlicenseBqualityBmaintenanceEnables AI assistants to control Spotify playback, search the full catalog including podcasts and audiobooks, manage libraries and playlists, and understand listening taste.131209 npm1MIT
- AlicenseAqualityBmaintenanceEnables AI assistants to search Spotify, manage playlists, control playback, and access personal listening data via the Spotify Web API.271MIT