spotify-mcp
Allows interacting with Spotify's Web API to search music, control playback via Spotify Connect, manage playlists and Liked Songs, get audio analysis, and create snapshot-safe DJ plans.
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-mcpsearch for 'lofi' and play the first result"
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 local-first Spotify MCP server written in Python. It gives MCP clients typed tools for music discovery, Spotify Connect playback, Liked Songs, playlists, audio analysis, and snapshot-safe DJ planning.
The server uses the official MCP Python SDK v2 and Spotify Authorization Code with PKCE. Spotify tokens stay outside the repository, so the server never needs a client secret.
What it does
Searches tracks, albums, artists, playlists, shows, and podcast episodes.
Reads recent listening, top tracks and artists, playback state, devices, and queue.
Samples the full history of Liked Songs instead of considering only the newest page.
Creates and edits playlists with exact Spotify IDs or URIs and explicit mutation states.
Compares Spotify and ReccoBeats audio measurements while retaining provenance and conflicts.
Creates deterministic DJ plans, checks Spotify snapshots before mutation, and records restore receipts locally.
Related MCP server: spotify-direct-mcp
Quick start
Requirements:
Python 3.11 or newer
A Spotify Web API application and its client ID
git clone https://github.com/martin-gomola/spotify-mcp.git
cd spotify-mcp
cp .env.example .env
# Edit .env and set SPOTIFY_CLIENT_ID, then:
make runRegister http://127.0.0.1:8888/callback as the Spotify application's redirect URI. Use the
literal IP address, not localhost. See Setup for the complete Spotify and Codex
configuration. On the first make run, Spotify MCP opens the browser authorization flow; later
runs reuse the private saved token and start the stdio server directly.
The bundled Codex plugin starts the server directly through
plugins/spotify-mcp/.mcp.json. It expects the checkout at
~/dev/spotify-mcp unless SPOTIFY_MCP_REPO points somewhere else; run make auth once before
enabling it.
Install the public Git-backed marketplace and plugin with:
codex plugin marketplace add martin-gomola/spotify-mcp --ref main
codex plugin add spotify-mcp@spotify-mcpCodex can then refresh the marketplace from main with
codex plugin marketplace upgrade spotify-mcp.
Safety model
OAuth tokens and local DJ state use OS-appropriate private data directories, not the checkout.
The Spotify HTTP adapter retries safe reads, but never blindly retries a write whose outcome is uncertain.
Library and playlist mutations return verification or ambiguity states instead of hiding a mismatch.
DJ apply and restore default to
dry_run=true, require snapshot evidence, and record mutation receipts.Liked Songs removal and playlist removal/unfollow operations are marked destructive in MCP tool metadata.
Playback commands still depend on Spotify Connect and an available device. Spotify's Development Mode restrictions also apply; see Setup.
Documentation
Development
make checkThis runs Ruff formatting and lint checks, strict mypy, the test suite, repository-owned release contract checks, and a source/wheel build. See Development for targeted commands and repository boundaries.
License
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
- Alicense-qualityCmaintenanceAn MCP server for Spotify control and synchronized lyrics retrieval that enables playback management, queue navigation, and music search capabilities. It also features perception tools for real-time track analysis, including BPM, key detection, and timestamped lyrics.933Apache 2.0
- Flicense-qualityCmaintenanceA FastMCP server that exposes Spotify's catalog and user context as tools for Claude, enabling track search, audio features, artist discography, recommendations, currently playing, and playlist creation.
- FlicenseAqualityDmaintenanceA lightweight MCP server that enables AI assistants like Cursor and Claude to control Spotify playback, playlists, and manage tokens via OAuth.152
- AlicenseAqualityBmaintenanceMCP server to control Spotify conversationally from Claude, Cursor, and other AI clients.1160MIT
Related MCP Connectors
Spotify MCP — Web API via client_credentials OAuth
The everything Zotero MCP server — Web API v3 + local API, safe writes, citations, search.
MCP server for interacting with the Supabase platform
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'
If you have feedback or need assistance with the MCP directory API, please join our Discord server