spotify-mcp
Exposes the Spotify Web API as MCP tools: control playback (play, pause, skip, seek, volume, shuffle, repeat, transfer between devices), manage the queue, search the catalog, fetch tracks/albums/artists and recommendations, create and edit playlists, manage saved tracks and albums in the user's library, and browse featured playlists, categories and new releases.
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
A self-hosted Model Context Protocol (MCP) server that exposes the Spotify Web API as tools for assistants such as Claude (Desktop, Code, or any MCP client). Control playback, search, playlists, library, and browse features through natural language.
OAuth 2.0 with PKCE — no client secret; safe for installed / server apps
Streamable HTTP transport at
/mcp(MCP SDK)Small web UI — connect Spotify and copy-paste Claude config
Optional shared secret — restrict access to
/mcpwhen exposed on a network
Not affiliated with Spotify AB. This project uses Spotify’s public Web API under Spotify’s terms.
Requirements
Node.js 20+ (local) or Docker
A Spotify Developer app with your redirect URI registered
HTTPS in production (Spotify requires it for non-
localhostredirect URIs)
Related MCP server: Spotify MCP Server
Quick start (local)
cp .env.example .env
# Edit .env: SPOTIFY_CLIENT_ID and SPOTIFY_REDIRECT_URI
npm install
npm run devOpen http://127.0.0.1:3000, click Connect to Spotify, then use the shown MCP URL with your client (see below).
Quick start (Docker)
cp .env.example .env
# Edit .env — for remote access set SPOTIFY_REDIRECT_URI to your public https://.../auth/callback
docker compose up -d --buildDefault HTTP port: 3000 (override with PORT in .env and in docker compose if you change the mapping).
Reverse proxy (optional)
Put nginx, Caddy, or NPM in front for TLS. Your SPOTIFY_REDIRECT_URI must match the public URL (e.g. https://spotify.example.com/auth/callback).
To attach the container to an existing Docker network and avoid binding a host port, use the bundled overlay (edit the network name inside the file if needed):
docker compose -f docker-compose.yml -f docker-compose.homelab.example.yml up -d --buildSpotify app setup
Open the Spotify Developer Dashboard and create an app.
Under Redirect URIs, add the exact value of
SPOTIFY_REDIRECT_URIfrom your.env.Copy the Client ID into
SPOTIFY_CLIENT_ID.
Claude / MCP client configuration
The server speaks Streamable HTTP at:
https://your-server.example.com/mcp(or http://127.0.0.1:3000/mcp for local dev)
The web UI generates ready-to-copy snippets. Typical pattern uses mcp-remote so Desktop/Code can talk to your HTTP endpoint:
Claude Code
claude mcp add spotify --command npx -- -y mcp-remote https://your-server.example.com/mcpClaude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"spotify": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://your-server.example.com/mcp"]
}
}
}If you set MCP_SECRET, pass it to mcp-remote per that tool’s docs (or send X-Mcp-Secret / ?secret= on requests).
Self-signed HTTPS
Prefer a real certificate. If you must use self-signed TLS, configure your MCP client / mcp-remote to trust it — do not disable TLS verification in production.
Environment variables
Variable | Required | Description |
| Yes | Spotify app Client ID |
| Yes | Must match dashboard redirect URI |
| No | HTTP port (default |
| No | If set, required to call |
Tokens are stored under ./data/tokens.json (or /app/data in Docker); keep that directory private.
MCP tools (42)
get_playback_state · get_currently_playing · play · pause · next_track · previous_track · seek · set_volume · set_shuffle · set_repeat · get_devices · transfer_playback
get_queue · add_to_queue
search · get_track · get_tracks · get_recommendations · get_available_genre_seeds
get_album · get_album_tracks · get_saved_albums · save_albums · remove_saved_albums · check_saved_albums
get_artist · get_artist_top_tracks · get_artist_albums · get_related_artists
get_user_playlists · get_playlist · get_playlist_tracks · create_playlist · add_tracks_to_playlist · remove_tracks_from_playlist
get_saved_tracks · save_tracks · remove_saved_tracks · check_saved_tracks
get_user_profile · get_top_tracks · get_top_artists · get_recently_played
get_featured_playlists · get_categories · get_category_playlists · get_new_releases
Stack
Node.js 20 + TypeScript
@modelcontextprotocol/sdk — MCP server, Streamable HTTP
Express — HTTP + static setup UI
Zod — tool parameter schemas
Scripts
Command | Description |
| Dev server with |
| Compile to |
| Run |
License
MIT — see LICENSE.
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
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
Full Spotify Web API coverage - albums, artists, playlists, player controls, and more.
Spotify MCP — Web API via client_credentials OAuth
Generate AI music via the Lacuna Music API from MCP clients like Claude Desktop & Code.
Related MCP Servers
- AlicenseBqualityBmaintenanceConnects Claude with Spotify, allowing users to control playback, search for content, get music information, and manage the Spotify queue.4868 PyPI13MIT
- FlicenseAqualityDmaintenanceConnects Claude with Spotify, allowing users to control playback, search for music, get track/artist information, and manage the queue via the Spotify API.51-
- FlicenseDqualityDmaintenanceEnables Claude to interact with Spotify by searching songs, creating playlists, getting recommendations, and managing your music through your Spotify account.73-
- AlicenseNot gradedqualityDmaintenanceEnables Claude to control Spotify features including playback control, playlist management, search, and accessing user's listening history and preferences through the Spotify API.1ISC