loading…
Search for a command to run...
loading…
MCP server for the Spotify Web API — gives Claude and other AI assistants tools to search music, control playback, manage playlists, library, and podcasts.
MCP server for the Spotify Web API — gives Claude and other AI assistants tools to search music, control playback, manage playlists, library, and podcasts.
A Model Context Protocol (MCP) server that provides tools for interacting with the Spotify Web API. Enables AI assistants like Claude to search music, control playback, manage playlists, and more.
curl -LsSf https://astral.sh/uv/install.sh | shhttp://127.0.0.1:8888/callbackImportant: The redirect URI must exactly match
http://127.0.0.1:8888/callback(or whatever you set inSPOTIFY_REDIRECT_URI). Do not uselocalhost— use127.0.0.1.
Pick your client below. All examples use uvx to fetch the server on demand — no clone, no manual install.
claude mcp add spotify \
-e SPOTIFY_CLIENT_ID=your_client_id \
-e SPOTIFY_CLIENT_SECRET=your_client_secret \
-- uvx mcp-server-spotify
Most MCP clients configure servers via a JSON file. Add this entry to your client's MCP config:
{
"mcpServers": {
"spotify": {
"command": "uvx",
"args": ["mcp-server-spotify"],
"env": {
"SPOTIFY_CLIENT_ID": "your_client_id",
"SPOTIFY_CLIENT_SECRET": "your_client_secret"
}
}
}
}
For development, or if you want to run a modified copy:
git clone https://github.com/llyfn/spotify-mcp.git
cd spotify-mcp && uv sync
Then point your client at the local checkout instead of uvx:
"command": "uv",
"args": ["--directory", "/absolute/path/to/spotify-mcp", "run", "mcp-server-spotify"]
| Variable | Required | Default | Description |
|---|---|---|---|
SPOTIFY_CLIENT_ID |
Yes | — | Your Spotify app's Client ID |
SPOTIFY_CLIENT_SECRET |
Yes | — | Your Spotify app's Client Secret |
SPOTIFY_REDIRECT_URI |
No | http://127.0.0.1:8888/callback |
OAuth redirect URI |
The server uses Spotify's Authorization Code flow:
~/.spotify-mcp/credentials.jsonIf running in a headless environment (SSH, Docker), the auth URL will be printed to stderr — copy and paste it into a browser manually.
To re-authenticate (e.g., after revoking access), delete the stored credentials:
rm ~/.spotify-mcp/credentials.json
| Tool | Description |
|---|---|
search |
Search for tracks, albums, artists, playlists, shows, episodes, or audiobooks |
| Tool | Description |
|---|---|
get_album |
Get album details by ID |
get_album_tracks |
Get tracks in an album |
| Tool | Description |
|---|---|
get_artist |
Get artist details by ID |
get_artist_albums |
Get albums by an artist |
| Tool | Description |
|---|---|
get_track |
Get track details by ID |
| Tool | Description |
|---|---|
get_playlist |
Get playlist details |
update_playlist |
Update playlist name, description, or visibility |
get_playlist_items |
Get items in a playlist |
add_playlist_items |
Add tracks/episodes to a playlist |
remove_playlist_items |
Remove items from a playlist |
reorder_playlist_items |
Reorder items in a playlist |
get_my_playlists |
Get the current user's playlists |
create_playlist |
Create a new playlist |
| Tool | Description |
|---|---|
get_saved_tracks |
Get saved tracks |
get_saved_albums |
Get saved albums |
get_saved_shows |
Get saved shows |
get_saved_episodes |
Get saved episodes |
get_saved_audiobooks |
Get saved audiobooks |
save_to_library |
Save items to library |
remove_from_library |
Remove items from library |
check_saved_in_library |
Check if items are in library |
| Tool | Description |
|---|---|
get_playback_state |
Get current playback state |
get_currently_playing |
Get the currently playing track |
play |
Start or resume playback |
pause |
Pause playback |
next_track |
Skip to next track |
previous_track |
Skip to previous track |
seek |
Seek to position in track |
set_repeat |
Set repeat mode (track/context/off) |
set_volume |
Set playback volume |
toggle_shuffle |
Toggle shuffle mode |
transfer_playback |
Transfer playback to another device |
get_devices |
Get available devices |
add_to_queue |
Add item to playback queue |
get_queue |
Get the playback queue |
get_recently_played |
Get recently played tracks |
| Tool | Description |
|---|---|
get_show |
Get show details |
get_show_episodes |
Get episodes of a show |
| Tool | Description |
|---|---|
get_audiobook |
Get audiobook details |
get_audiobook_chapters |
Get chapters of an audiobook |
get_chapter |
Get chapter details |
| Tool | Description |
|---|---|
get_my_profile |
Get current user's profile |
get_my_top_items |
Get top artists or tracks |
Following artists/users uses the same
save_to_library/remove_from_library/check_saved_in_librarytools — pass an artist or user URI.
See CONTRIBUTING.md for development setup and guidelines.
MIT - see LICENSE for details.
Add this to claude_desktop_config.json and restart Claude Desktop.
{
"mcpServers": {
"mcp-server-spotify": {
"command": "npx",
"args": []
}
}
}