spotify-mcp
Allows building and editing Spotify playlists from natural language descriptions, including searching tracks, understanding the user's listening taste, listing and reading playlists, and creating, adding to, or removing tracks from 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-mcpMake a playlist of upbeat indie rock for running."
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.
An MCP server that lets MCP clients build and edit Spotify playlists from a description. "Moody 90s trip-hop for a rainy commute", "add three more like the last one", "drop anything over five minutes", etc. This is just a personal project intended for personal use, if you find it useful, that's a side effect, and you're welcome to use it.
How it works
Spotify deprecated /recommendations, /audio-features, /audio-analysis and related-artists
for every app created after 2024-11-27, they return 403 and have no replacement. So the model
itself is the recommendation engine. These seven tools give it the three things it can't do itself:
Tool | Purpose | |
Resolve |
| Turn "Massive Attack – Teardrop" into a track URI. Supports |
Ground |
| Your real top tracks/artists, so "music like I listen to" means something |
Read |
| Find a playlist by name; see what's in it before editing |
Write |
| Build and edit. Batched past Spotify's 100-track-per-request cap automatically |
There's a similar project named spotify-mcp-server by Marcel Marais that exposes many more functionalities. If you want to use this tool but find that the current list of exposed functions aren't enough for what you want to do, I'd recommend looking at his MCP server instead.
Related MCP server: spotify-mcp
Setup
1. Create a Spotify app
At developer.spotify.com/dashboard → Create app.
Footgun 1 — the redirect URI. Spotify rejects
localhost. Register the IP literal, exactly:http://127.0.0.1:8888/callback
Footgun 2 — the allowlist. New apps are in development mode: capped at 5 users, and each one must be added under Settings → User Management by their Spotify account email — including your own. Miss this and every API call 403s despite a perfectly valid token. (Extended quota has been organizations-only since 2025-05-15 and requires 250k+ monthly actives, so 5 users is the practical ceiling.)
Copy the Client ID and Client secret.
2. Build and log in
npm install && npm run build
export SPOTIFY_CLIENT_ID=...
export SPOTIFY_CLIENT_SECRET=...
npm run loginnpm run login prints an authorization URL (and tries to open your browser), catches the callback
on 127.0.0.1:8888, and writes a refresh token to ~/.config/spotify-mcp/token.json with mode
0600. One time only — the server refreshes access tokens itself from then on.
Scopes requested: playlist-modify-public, playlist-modify-private, playlist-read-private,
playlist-read-collaborative, user-top-read. No playback scopes — this server doesn't control
playback.
3. Register with your MCP client
claude mcp add spotify \
--env SPOTIFY_CLIENT_ID=... \
--env SPOTIFY_CLIENT_SECRET=... \
-- node /absolute/path/to/spotify-mcp/dist/index.jsOr in a client config file:
{
"mcpServers": {
"spotify": {
"command": "node",
"args": ["/absolute/path/to/spotify-mcp/dist/index.js"],
"env": {
"SPOTIFY_CLIENT_ID": "...",
"SPOTIFY_CLIENT_SECRET": "..."
}
}
}
}Then just ask: "Make me a 20-track playlist of moody 90s trip-hop for a rainy commute."
Development
npm test # node:test, no framework — chunking, pagination, token refresh, error handling
npm run build
npx @modelcontextprotocol/inspector node dist/index.js # poke the tools by handSet SPOTIFY_MCP_TOKEN_FILE to override the token location.
Stack: @modelcontextprotocol/server v2 + zod. Everything else is a Node built-in — no express,
no axios, no dotenv, no Spotify client library.
Notes
Auth flow: authorization code with client secret, not PKCE. Spotify doesn't rotate refresh tokens on this flow, so there's no lose-the-write-lose-the-account failure mode. Everything stays on loopback.
Not included: playback control, playlist rename/reorder, saved-library reads. Add when wanted.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceIntegrates Apple Music with MCP clients to search the global catalog, manage personal playlists, and access library data. It enables users to perform actions like creating playlists, adding tracks, and viewing recommendations through natural language commands.1
- AlicenseBqualityBmaintenanceAn MCP server that enables users to control Spotify playback, search music, and manage playlists through natural conversation. It is updated for the February 2026 Spotify Web API changes and supports full playlist CRUD operations.568MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to create, manage, and populate Spotify playlists using the Spotify Web API.3MIT
- FlicenseBqualityDmaintenanceEnables creating and searching Spotify playlists through natural language using the Model Context Protocol.21
Related MCP Connectors
Spotify MCP — Web API via client_credentials OAuth
Generate AI music via the Lacuna Music API from MCP clients like Claude Desktop & Code.
MCP server for generating rough-draft project plans from natural-language prompts.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/seenws/spotify-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server