mcp-spotify
Provides tools for interacting with the Spotify Web API, enabling playlist building and management (create, add/remove tracks, follow/unfollow), music discovery (search tracks/artists/albums, get album tracks), library access (saved tracks), personalization (top tracks/artists), and playback control (play, pause, queue, now playing).
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., "@mcp-spotifySearch for rock songs by Queen"
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.
mcp-spotify
MCP server for Spotify, focused on playlist building and music discovery. 19 granular tools designed for use with Claude and other LLM agents.
Prerequisites
Python 3.14+
A Spotify Premium account (required by Spotify for Web API access)
A Spotify Developer application
Related MCP server: spotify-mcp
Setup
1. Create a Spotify Developer App
Go to the Spotify Developer Dashboard
Click Create App
Under Which API/SDKs are you planning to use?, select Web API
Set the Redirect URI to
http://127.0.0.1:8888/callbackNote your Client ID and Client Secret
2. Install
cd mcp-spotify
uv sync3. Configure Environment Variables
Set these before running the server:
export SPOTIFY_CLIENT_ID="your_client_id"
export SPOTIFY_CLIENT_SECRET="your_client_secret"
export SPOTIFY_REDIRECT_URI="http://127.0.0.1:8888/callback"4. First Run (Authentication)
uv run mcp-spotifyOn first run, a browser window opens for Spotify OAuth authorization. After approving, the token is cached at ~/.spotify_mcp_cache and subsequent runs authenticate automatically.
Claude Desktop / Claude Code Configuration
Add to your MCP server config. If installed from PyPI:
{
"mcpServers": {
"spotify": {
"command": "uvx",
"args": ["mcp-spotify"],
"env": {
"SPOTIFY_CLIENT_ID": "your_client_id",
"SPOTIFY_CLIENT_SECRET": "your_client_secret",
"SPOTIFY_REDIRECT_URI": "http://127.0.0.1:8888/callback"
}
}
}
}Or if running from a local clone:
{
"mcpServers": {
"spotify": {
"command": "uv",
"args": ["--directory", "/path/to/mcp-spotify", "run", "mcp-spotify"],
"env": {
"SPOTIFY_CLIENT_ID": "your_client_id",
"SPOTIFY_CLIENT_SECRET": "your_client_secret",
"SPOTIFY_REDIRECT_URI": "http://127.0.0.1:8888/callback"
}
}
}
}Tools
Discovery
Tool | Parameters | Description |
|
| Search for tracks. Supports |
|
| Search for artists. Returns names, genres, and IDs. |
|
| Search for albums. Returns names, artists, release dates, and IDs. |
|
| List all tracks on an album. |
Library
Tool | Parameters | Description |
|
| Your liked/saved tracks, most recent first. |
Playlists
Tool | Parameters | Description |
|
| Create a new playlist. |
|
| Add tracks to a playlist (max 100). |
|
| Remove tracks from a playlist. |
|
| List tracks in a playlist. |
|
| Replace all tracks in a playlist (for reordering). |
|
| Follow (save) a playlist to your library. |
|
| Unfollow (remove/delete) a playlist from your library. |
|
| List your playlists. |
Personalization
Tool | Parameters | Description |
|
| Your most-played tracks. |
|
| Your most-played artists. |
time_range options: short_term (~4 weeks), medium_term (~6 months), long_term (all time).
Playback
Tool | Parameters | Description |
|
| Play a track (requires active Spotify device). |
| (none) | Pause playback. |
|
| Add a track to the playback queue. |
| (none) | Get current track info. |
OAuth Scopes
This server requests the minimum scopes needed:
user-read-playback-state,user-modify-playback-state,user-read-currently-playing-- playbackplaylist-read-private,playlist-read-collaborative,playlist-modify-public,playlist-modify-private-- playlistsuser-top-read-- personalizationuser-library-read-- saved/liked tracks
Spotify Web API Restrictions
Spotify has progressively locked down its Web API since late 2024. This section documents what's affected and what it means for this project.
Removed from the Web API (November 2024)
Spotify removed or restricted these endpoints on November 27, 2024. They are permanently unavailable to new apps and Development Mode apps, regardless of quota:
Endpoint | What It Did | Impact |
| Algorithmic track recommendations based on seed tracks/artists/genres | Was the best tool for playlist building. No replacement exists in the API. |
| Tempo, energy, danceability, valence, etc. for tracks | Cannot filter or sort tracks by musical attributes. |
| Detailed audio structure (beats, bars, sections, timbre) | Cannot analyze track structure. |
| Spotify's editorial/algorithmic playlist listings | Cannot browse curated playlists. |
| Playlists within a browse category | Cannot discover playlists by category. |
Track | 30-second audio preview URLs | Preview URLs now return |
Apps that had Extended Quota Mode approval before November 2024 retained access. New apps cannot get access to these endpoints.
Gated Behind Extended Quota (Effectively Inaccessible)
These endpoints exist but return 403 Forbidden in Development Mode. They require Extended Quota Mode, which as of May 2025 requires:
A legally registered business entity (not individuals)
250,000+ monthly active users
An active, launched service in key Spotify markets
This makes Extended Quota inaccessible for personal projects, hobby apps, and small tools.
Endpoint | What It Did |
| Discover similar artists. Returns 403. |
| Get an artist's most popular tracks. Returns 403. |
February 2026 Development Mode Changes
On February 6, 2026, Spotify overhauled Development Mode itself:
Spotify Premium required for app owners (this is now a prerequisite for all Web API access)
1 Client ID per developer
Max 5 authorized users per app
Search results capped at 10 per request (down from 50) for new apps
Several more endpoints restricted (batch-get endpoints, browse categories, new releases, other-user profiles/playlists)
The POST /users/{user_id}/playlists endpoint was also removed in favor of POST /me/playlists (this server already uses the /me variant).
Note: Endpoint restrictions currently apply to newly created apps. Existing Dev Mode apps were temporarily exempted after community backlash, but this may change.
Not Yet Implemented
Potential tools that could be added within current Development Mode access:
Tool | Endpoint | Description |
|
| Skip to the next track in queue. |
|
| Skip to the previous track. |
|
| View the current playback queue. |
|
| Set playback volume (Premium only). |
|
| Set repeat mode (track/context/off). |
|
| Toggle shuffle on/off. |
|
| List available playback devices. |
|
| Transfer playback to a different device. |
|
| Save tracks to the user's library. |
Will Never Be Usable (for New Apps)
These would have been valuable for this project but are permanently out of reach:
Feature | Why It Matters | Status |
Algorithmic recommendations | The single best way to discover new music programmatically | Removed Nov 2024, no replacement |
Audio features (tempo, energy, etc.) | Enables filtering tracks by mood, energy, danceability | Removed Nov 2024 |
Related artists | Core discovery tool for "if you like X, try Y" workflows | Requires Extended Quota (250k MAU) |
Artist top tracks | Quick way to sample an artist's most popular work | Requires Extended Quota (250k MAU) |
Editorial/category playlists | Discover Spotify-curated playlists by genre or mood | Removed Nov 2024 |
The practical effect: playlist building relies entirely on search_tracks and the user's own listening history (get_my_top_tracks, get_my_top_artists) for discovery. Claude's own music knowledge fills the gap that the API no longer provides.
Development
uv run mcp-spotify # Run the server
uv run pytest tests/ -v # Run tests
uv run ruff check src/ # Lint
uv run ruff format src/ # Format
uv run pyright src/ # Type checkPre-commit Hooks
This project uses lefthook for pre-commit checks. Install with brew install lefthook (or see other install methods), then:
lefthook installThis 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.
Latest Blog Posts
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/obrien-matthew/mcp-spotify'
If you have feedback or need assistance with the MCP directory API, please join our Discord server