spotify-mcp
Interacts with the Spotify Web API on the user's behalf: syncs the user's playlists and Liked Songs into a local copy for listing, reading and searching, searches and browses the wider Spotify catalog (tracks, albums, artists, playlists, podcasts), creates and edits playlists (tracks, ordering, metadata, cover images, deletion), saves and removes items from the library, and controls playback (play, pause, skip, volume, shuffle, repeat, seek, queue, device transfer) on the user's active devices.
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 unofficial, personal Spotify MCP server. It keeps a local copy of your playlists and Liked Songs, so it knows every one of them (your own, collaborative and followed), and it can edit playlists, search and browse Spotify, and control playback.
This is an independent project, not affiliated with or endorsed by Spotify.
Setup
You need uv and a Spotify Premium account.
Create an app at https://developer.spotify.com/dashboard. Spotify requires Premium for this.
Give the app the redirect URI
http://127.0.0.1:8888/callbackand select the Web API.Copy the app's client ID. No client secret is used.
Log in and make the first copy of your library:
uvx --from git+https://github.com/duffey/spotify-mcp spotify-mcp syncThis asks for the client ID, then opens Spotify's login page in your browser.
Register the server with your MCP host. For Claude Code:
claude mcp add --scope user spotify -- uvx --from git+https://github.com/duffey/spotify-mcp spotify-mcpFor Claude Desktop, in
claude_desktop_config.json:{ "mcpServers": { "spotify": { "command": "uvx", "args": ["--from", "git+https://github.com/duffey/spotify-mcp", "spotify-mcp"] } } }Use the absolute path to
uvxif the host cannot find it.
uvx fetches the code from GitHub the first time and reuses it afterwards; add --refresh after
uvx to pick up a newer version.
To work on the code instead, clone the repository and use uv run spotify-mcp in place of the
uvx --from ... spotify-mcp part.
Related MCP server: Spotify MCP
Sync
uvx --from git+https://github.com/duffey/spotify-mcp spotify-mcp syncThe first run asks for the client ID, then opens Spotify's login page in your browser. Later runs
reuse the saved login. The server's sync_library tool does the same from inside a chat.
Sync copies every playlist in your library, and your Liked Songs, into a local SQLite database. A
playlist's tracks are fetched again only when the playlist has changed, and Liked Songs only when
they have, so repeat syncs are quick. --full fetches everything again.
Tools
Your library
Tool | What it does |
| Every playlist in your library with owner, track count, description and link, plus Liked Songs and when the copy was last synced. Optional word filter. |
| One playlist by name, id, URI or link, or |
| Tracks across all playlists and Liked Songs by words, artist, album or playlist, each with the playlists it is in. Ignores case and accents. |
| Saved albums, podcast shows and episodes, and followed artists. |
| The last tracks played, or your most played tracks or artists over about 4 weeks, 6 months or a year. |
| Runs the sync from inside the server, using the login saved by the sync command. |
All of Spotify
Tool | What it does |
| Searches Spotify for tracks, albums, artists or playlists, and marks tracks already in your playlists. |
| Opens an album (its tracks), an artist (their releases) or a podcast show (its episodes). |
Changing things
Tool | What it does |
| Creates a playlist, optionally filled with tracks. |
| Adds tracks at the end or at a position, skipping ones the playlist already has. With |
| Removes tracks from a playlist. With |
| Moves a track, or a run of tracks in a row, to a new position. |
| Changes a playlist's name, description, public or collaborative setting. |
| Replaces a playlist's cover with a picture from a file on this computer or an https link, converted and shrunk to fit Spotify's limit. |
| Deletes one of your playlists, or unfollows someone else's. |
| Likes tracks, saves albums and podcasts, follows playlists. |
| Unlikes tracks, removes saved albums and podcasts. |
These update the local copy as they go, so no sync is needed afterwards.
Playback
Tool | What it does |
| What is playing, on which device, with shuffle and repeat, every available device, and optionally the queue. |
| Plays tracks, a playlist from your library by name, Liked Songs, or any album, artist or playlist; with nothing given, resumes. |
| Pause, resume, next, previous. |
| Volume, shuffle, repeat and position in the track. |
| Queues tracks after the current one. |
| Moves playback to another device. |
Playback needs Spotify open on some device. When no device is active and exactly one is available, that one is used; otherwise name the device.
What Spotify does not allow
Tracks of playlists you only follow. Spotify shares contents only for playlists you own or collaborate on. The others are stored with their name and details but without tracks.
Private playlists. Spotify makes playlists created through its API public whatever is asked, and ignores a later request to make them private. The tools report what Spotify applied.
Following artists. Followed artists can be listed, not followed or unfollowed.
Removing one copy of a duplicate. Removal is by track, so every copy in the playlist goes.
Editing the queue. Tracks can be added, not removed or reordered.
Search results. At most 10 of each kind per request.
Layout
spotify_mcp/server.py: the entry point.app.pyholds the server object and the instructions it gives the model.spotify_mcp/tools/: the tools, one module per thing they work on (playlists,library,catalog,playback,history), with what they share incommon.py.spotify_mcp/api.py: the Spotify Web API client.auth.pyis the login,refs.pyreads URIs and links,cover.pyprepares cover pictures.spotify_mcp/store.py,queries.py,sync.py: the local database (schema and writes, reads, and copying from Spotify).spotify_mcp/describe.py: the compact descriptions tools return.tests/: pytest suite against a fake Spotify (fakes.py); no network.
Where things are kept
The client ID, login token and database live in your per-user data folder
(%LOCALAPPDATA%\spotify-mcp on Windows), never in this repository. Set SPOTIFY_MCP_HOME to use
another folder, and SPOTIFY_CLIENT_ID to supply the client ID from the environment.
Tests
uv run pytestLicense
MIT No Attribution: do anything with it, no credit needed, no warranty.
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
Spotify play counts for any track, album, artist or playlist, plus monthly listeners and followers.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables control of Spotify through natural language by searching the catalog, managing playback and devices, controlling playlists, and managing saved songs. Includes OAuth authentication and streamable HTTP transport for remote connectivity.85MIT
- AlicenseAqualityDmaintenanceEnables searching and managing Spotify playlists, tracks, and user information through the Spotify Web API.10MIT
- AlicenseBqualityBmaintenanceEnables AI assistants to control Spotify playback, search the full catalog including podcasts and audiobooks, manage libraries and playlists, and understand listening taste.131204 npm1MIT
- AlicenseBqualityCmaintenanceEnables free Spotify accounts to read Liked Songs, search the full catalog, and control playback across any Spotify Connect device such as Chromecast, TV, phone, or desktop without Premium.2044 npmMIT