Spotify MCP Server
This server provides a comprehensive MCP interface for controlling Spotify playback, managing playlists and libraries, and performing advanced audio analysis for professional DJ set planning.
Playback Control: Play, pause, resume, skip tracks, adjust volume, and manage the playback queue. Get current playback state and available Spotify Connect devices.
Search & Discovery: Search for tracks, albums, artists, playlists, podcast episodes, and shows with pagination.
Playlist Management: Create, update, delete/unfollow playlists; add, remove, reorder tracks; retrieve playlist details and tracks.
Library & History: Save or remove albums/tracks; check saved albums; get recently played tracks, saved tracks, top tracks/artists (over different time ranges), and the playback queue.
Audio Analysis: Obtain detailed audio features (BPM, key, energy, danceability, etc.) for up to 100 tracks from multiple providers (Spotify, SoundNet, ReccoBeats) with field-level provenance. Compare analyses across providers to detect conflicts and tempo ambiguities.
DJ Set Planning: Audit playlists for data coverage, duplicates, tempo issues, and provider conflicts; analyze playlists to extract snapshot-bound BPM, Camelot key, and relative energy; generate optimized set orders using harmonic mixing, energy curve shaping, artist spacing, and user-defined constraints; apply, dry-run, or restore set plans with snapshot verification and rollback support.
Controls Spotify playback, searches music, manages playlists and albums, and plans DJ sets using BPM, key, and energy data.
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 MCP ServerReorder my house playlist into a set that warms up, peaks, then cools down"
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.
Works with Codex, Cursor, Claude, Cline, and other MCP clients. The repository also ships the agent skills that guide setup, playlist curation, and DJ set planning.
Started from marcelmarais/spotify-mcp-server and since rewritten from scratch. Follow this repository's setup, not upstream's. MIT licensed.
Start here
Codex
Install the plugin with two commands:
codex plugin marketplace add martin-gomola/spotify-mcp-server --ref main
codex plugin add spotify-controller@spotify-mcp-serverThen tell Codex:
Set up Spotify for me. Do the technical parts yourself and tell me only what you need from my Spotify account.
The setup skill handles the local install and authentication, asking only for the Client ID and Client Secret from your Spotify app. See the Spotify Controller guide for the two-minute walkthrough.
Other MCP clients
You need Node.js 18+, a Spotify Premium account, and a Spotify Developer app with http://127.0.0.1:8888/callback registered as a Redirect URI. Spotify's current Development Mode requires the app owner to have Premium; playback also needs Spotify open on an available device.
git clone https://github.com/martin-gomola/spotify-mcp-server.git
cd spotify-mcp-server
npm install && npm run build
cp spotify-config.example.json spotify-config.json # add your client ID and secret
npm run authThen point your client at build/index.js. The setup guide has configuration for Claude Desktop, Cline, and Cursor. BPM and key need nothing extra: they come from ReccoBeats, which takes no key.
Related MCP server: Spotify MCP Server
Try asking
"Play Elvis's first song"
"Create a Taylor Swift / Slipknot fusion playlist"
"Copy the techno tracks from my workout playlist into my work playlist"
"Reorder my house playlist into a set that warms up, peaks, then cools down"
"What's the BPM and key of everything in this playlist?"
What it does
The server covers playback control, search, playlist and album editing, and listening history through a focused MCP toolset. See the core tool reference; audio analysis and DJ tools are documented separately under DJ sets.
Its DJ workflow goes further:
analyzeDjPlaylistreads BPM, Camelot key, and playlist-relative energy, naming the source behind every value.planDjSetcreates a reviewable set order with harmonic mixing, a shaped energy curve, artist spacing, and anchors you pin by hand.applyDjSetPlanwrites the approved order. It defaults to a dry run, checks the playlist snapshot before and after, and keeps a receipt so a half-applied reorder rolls back.
See DJ sets for the full analyze, plan, apply, and restore flow.
Documentation
Guide | Covers |
Spotify app, credentials, OAuth, connecting a client | |
Read, playback, playlist, and album tools with parameters | |
Where BPM and key come from, the analyze/plan/apply flow, set shaping, restore | |
The bundled skills and how to use them outside this repo | |
Shipping the server and skills as a plugin that tracks | |
Scripts, layout, the Spotify API rules, local data |
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
- FlicenseBqualityDmaintenanceEnables AI assistants to control Spotify playback, search for music, manage playlists, and interact with your Spotify library through natural language commands.19
- FlicenseAqualityDmaintenanceEnables AI assistants to control Spotify playback, search for music, manage playlists, and access library information through the Spotify API. Requires Spotify Premium for playback control features.4
- AlicenseBqualityDmaintenanceEnables AI assistants to control Spotify playback, manage playlists, search music, and access listening history. Requires Spotify Premium and uses secure OAuth 2.0 with PKCE authentication.13109MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to control Spotify playback, search music, manage playlists and library, and access user listening insights via the Spotify Web API.
Related MCP Connectors
Privacy-first audio intelligence: BPM, key, waveform. Audio never stored. Pay per second.
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Create and track AI music videos and audio-reactive visuals from songs.
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/martin-gomola/spotify-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server