Spotify MCP Server
Spotify MCP-Server
Ein Model Context Protocol (MCP)-Server, der Werkzeuge für die Interaktion mit der Spotify Web API bereitstellt. Ermöglicht KI-Assistenten wie Claude das Suchen von Musik, Steuern der Wiedergabe, Verwalten von Playlists und mehr.
Funktionen
Suche - Finde Titel, Alben, Künstler, Playlists, Shows, Episoden und Hörbücher
Wiedergabesteuerung - Abspielen, Pause, Überspringen, Suchen, Lautstärke, Zufallswiedergabe, Wiederholung, Warteschlangenverwaltung
Playlists - Erstellen, Aktualisieren, Hinzufügen/Entfernen/Neuanordnen von Titeln
Bibliothek - Anzeigen und Verwalten gespeicherter Titel, Alben, Shows, Episoden und Hörbücher
Durchsuchen - Abrufen von Albumdetails, Künstlerinformationen, Titel-Metadaten
Podcasts & Hörbücher - Durchsuchen von Shows, Episoden, Hörbüchern und Kapiteln
Benutzerprofil - Profil anzeigen, Top-Künstler/-Titel, gefolgte Künstler
44 Werkzeuge, die nicht als veraltet markierte Spotify Web API-Endpunkte abdecken
Related MCP server: Spotify MCP Server
Voraussetzungen
uv — Installation mit
curl -LsSf https://astral.sh/uv/install.sh | shEin Spotify Developer-Konto
Eine Spotify-App mit Client ID und Client Secret
Abrufen Ihrer Spotify-Anmeldedaten
Gehen Sie zum Spotify Developer Dashboard
Klicken Sie auf Create App
Füllen Sie die App-Details aus:
App name: Wählen Sie einen beliebigen Namen (z. B. "My MCP Server")
App description: Optional
Redirect URI:
http://127.0.0.1:8888/callbackWhich API/SDKs are you planning to use?: Wählen Sie Web API
Klicken Sie auf Save
Suchen Sie auf der Seite Ihrer App nach Ihrer Client ID
Klicken Sie auf Show client secret, um Ihr Client Secret anzuzeigen
Wichtig: Die Redirect URI muss exakt
http://127.0.0.1:8888/callbackentsprechen (oder dem Wert, den Sie inSPOTIFY_REDIRECT_URIfestgelegt haben). Verwenden Sie nichtlocalhost— verwenden Sie127.0.0.1.
Installation
Wählen Sie unten Ihren Client aus. Alle Beispiele verwenden uvx, um den Server bei Bedarf abzurufen — kein Klonen, keine manuelle Installation.
Claude Code
claude mcp add spotify \
-e SPOTIFY_CLIENT_ID=your_client_id \
-e SPOTIFY_CLIENT_SECRET=your_client_secret \
-- uvx mcp-server-spotifyAndere MCP-Clients
Die meisten MCP-Clients konfigurieren Server über eine JSON-Datei. Fügen Sie diesen Eintrag zur MCP-Konfiguration Ihres Clients hinzu:
{
"mcpServers": {
"spotify": {
"command": "uvx",
"args": ["mcp-server-spotify"],
"env": {
"SPOTIFY_CLIENT_ID": "your_client_id",
"SPOTIFY_CLIENT_SECRET": "your_client_secret"
}
}
}
}Ausführen aus einem lokalen Checkout
Für die Entwicklung oder wenn Sie eine modifizierte Kopie ausführen möchten:
git clone https://github.com/llyfn/spotify-mcp.git
cd spotify-mcp && uv syncVerweisen Sie dann Ihren Client auf den lokalen Checkout anstelle von uvx:
"command": "uv",
"args": ["--directory", "/absolute/path/to/spotify-mcp", "run", "mcp-server-spotify"]Konfiguration
Variable | Erforderlich | Standard | Beschreibung |
| Ja | — | Die Client ID Ihrer Spotify-App |
| Ja | — | Das Client Secret Ihrer Spotify-App |
| Nein |
| OAuth Redirect URI |
Authentifizierung
Der Server verwendet den Authorization Code-Flow von Spotify:
Bei der ersten Verwendung öffnet der Server Ihren Browser zur Anmeldeseite von Spotify
Spotify bittet Sie, den Zugriff zu genehmigen — der Server fordert alle für den vollen Funktionsumfang benötigten Scopes an (Wiedergabe, Bibliothek, Playlists und Benutzerdaten)
Nachdem Sie autorisiert haben, leitet Spotify zum lokalen Callback-Server weiter
Der Server tauscht den Autorisierungscode gegen Zugriffs-/Aktualisierungstoken aus
Token werden sicher in
~/.spotify-mcp/credentials.jsongespeichertToken werden automatisch aktualisiert, wenn sie ablaufen
Wenn Sie in einer Headless-Umgebung (SSH, Docker) arbeiten, wird die Auth-URL in stderr ausgegeben — kopieren Sie diese manuell in einen Browser.
Erneute Authentifizierung
Um sich erneut zu authentifizieren (z. B. nach dem Widerruf des Zugriffs), löschen Sie die gespeicherten Anmeldedaten:
rm ~/.spotify-mcp/credentials.jsonVerfügbare Werkzeuge
Suche
Werkzeug | Beschreibung |
| Suche nach Titeln, Alben, Künstlern, Playlists, Shows, Episoden oder Hörbüchern |
Alben
Werkzeug | Beschreibung |
| Albumdetails nach ID abrufen |
| Titel eines Albums abrufen |
Künstler
Werkzeug | Beschreibung |
| Künstlerdetails nach ID abrufen |
| Alben eines Künstlers abrufen |
Titel
Werkzeug | Beschreibung |
| Titeldetails nach ID abrufen |
Playlists
Werkzeug | Beschreibung |
| Playlistdetails abrufen |
| Name, Beschreibung oder Sichtbarkeit der Playlist aktualisieren |
| Elemente in einer Playlist abrufen |
| Titel/Episoden zu einer Playlist hinzufügen |
| Elemente aus einer Playlist entfernen |
| Elemente in einer Playlist neu anordnen |
| Playlists des aktuellen Benutzers abrufen |
| Neue Playlist erstellen |
Bibliothek
Werkzeug | Beschreibung |
| Gespeicherte Titel abrufen |
| Gespeicherte Alben abrufen |
| Gespeicherte Shows abrufen |
| Gespeicherte Episoden abrufen |
| Gespeicherte Hörbücher abrufen |
| Elemente in der Bibliothek speichern |
| Elemente aus der Bibliothek entfernen |
| Prüfen, ob Elemente in der Bibliothek gespeichert sind |
Player
Werkzeug | Beschreibung |
| Aktuellen Wiedergabestatus abrufen |
| Aktuell wiedergegebenen Titel abrufen |
| Wiedergabe starten oder fortsetzen |
| Wiedergabe pausieren |
| Zum nächsten Titel springen |
| Zum vorherigen Titel springen |
| Zu einer Position im Titel springen |
| Wiederholungsmodus einstellen (Titel/Kontext/Aus) |
| Wiedergabelautstärke einstellen |
| Zufallswiedergabe umschalten |
| Wiedergabe auf ein anderes Gerät übertragen |
| Verfügbare Geräte abrufen |
| Element zur Wiedergabewarteschlange hinzufügen |
| Wiedergabewarteschlange abrufen |
| Kürzlich wiedergegebene Titel abrufen |
Shows & Podcasts
Werkzeug | Beschreibung |
| Showdetails abrufen |
| Episoden einer Show abrufen |
Hörbücher
Werkzeug | Beschreibung |
| Hörbuchdetails abrufen |
| Kapitel eines Hörbuchs abrufen |
| Kapiteldetails abrufen |
Benutzer
Werkzeug | Beschreibung |
| Profil des aktuellen Benutzers abrufen |
| Top-Künstler oder -Titel abrufen |
Das Folgen von Künstlern/Benutzern verwendet dieselben
save_to_library/remove_from_library/check_saved_in_libraryWerkzeuge — übergeben Sie eine Künstler- oder Benutzer-URI.
Mitwirken
Siehe CONTRIBUTING.md für die Entwicklungseinrichtung und Richtlinien.
Lizenz
MIT - siehe LICENSE für Details.
Available Tools
47 toolsadd_playlist_itemsA
Add tracks or episodes to a playlist. Auto-chunks at 100 items per request.
Args:
playlist_id: The Spotify ID of the playlist.
uris: List of Spotify URIs to add (e.g. ["spotify:track:xxx"]).
position: Position to insert items (0-based). Appends to end if not specified.
When chunking, subsequent chunks insert immediately after the previous.
Inputs: uris (required), playlist_id (required), position. Returns: result
add_to_queueA
Add a track or episode to the playback queue.
Args:
uri: Spotify URI of the item to add. E.g. "spotify:track:xxx".
device_id: ID of the device. If not provided, uses the active device.
Inputs: uri (required), device_id. Returns: result
check_saved_in_libraryB
Check whether items are saved or artists/users/playlists are followed.
Auto-chunks at 40 URIs per request.
Args:
uris: Spotify URIs: track, album, episode, show, audiobook, artist, user, or
playlist (e.g. ["spotify:track:xxx", "spotify:artist:yyy"]).
Inputs: uris (required). Returns: result
create_playlistB
Create a new playlist for the current user.
Args:
name: Name for the new playlist.
description: Description for the playlist.
public: Whether the playlist should be public (default True).
Inputs: name (required), public, description. Returns: result
get_albumA
Get details of a Spotify album by its ID.
Args:
album_id: The Spotify ID of the album.
market: ISO 3166-1 alpha-2 country code; affects availability/relinking.
Inputs: album_id (required), market. Returns: result
get_album_tracksA
Get tracks of a Spotify album.
Args:
album_id: The Spotify ID of the album.
limit: Maximum number of tracks to return (1-50, default 20).
offset: Index of the first track to return (default 0).
market: ISO 3166-1 alpha-2 country code.
Inputs: album_id (required), limit, market, offset. Returns: result
get_artistA
Get details of a Spotify artist by their ID.
Args:
artist_id: The Spotify ID of the artist.
Inputs: artist_id (required). Returns: result
get_artist_albumsB
Get albums by a Spotify artist.
Args:
artist_id: The Spotify ID of the artist.
include_groups: Comma-separated album types: album, single, appears_on, compilation.
limit: Maximum number of albums to return (1-10, default 10).
offset: Index of the first album to return (default 0).
market: ISO 3166-1 alpha-2 country code.
Inputs: artist_id (required), limit, market, offset, +1 more. Returns: result
get_audiobookB
Get details of a Spotify audiobook.
Args:
audiobook_id: The Spotify ID of the audiobook.
market: ISO 3166-1 alpha-2 country code.
Inputs: audiobook_id (required), market. Returns: result
get_audiobook_chaptersA
Get chapters of a Spotify audiobook.
Args:
audiobook_id: The Spotify ID of the audiobook.
limit: Maximum number of chapters to return (1-50, default 20).
offset: Index of the first chapter to return (default 0).
market: ISO 3166-1 alpha-2 country code.
Inputs: audiobook_id (required), limit, market, offset. Returns: result
get_chapterA
Get details of a specific audiobook chapter.
Args:
chapter_id: The Spotify ID of the chapter.
market: ISO 3166-1 alpha-2 country code.
Inputs: chapter_id (required), market. Returns: result
get_currently_playingB
Get the currently playing track or episode.
Inputs: no named parameters. Returns: result
get_devicesA
Get the user's available Spotify devices.
Inputs: no named parameters. Returns: result
get_episodeA
Get details of a podcast episode.
Args:
episode_id: The Spotify ID of the episode.
market: ISO 3166-1 alpha-2 country code.
Inputs: episode_id (required), market. Returns: result
get_followed_artistsA
Get the current user's followed artists. Cursor-paginated.
To follow or unfollow, use `save_to_library` / `remove_from_library` with Spotify URIs.
Args:
limit: Maximum number of artists to return (1-50, default 20).
after: Cursor (last artist ID from previous page) to fetch the next page.
Inputs: after, limit. Returns: result
get_my_playlistsA
Get the current user's playlists.
Args:
limit: Maximum number of playlists to return (1-50, default 20).
offset: Index of the first playlist to return (default 0).
Inputs: limit, offset. Returns: result
get_my_profileA
Get the current user's Spotify profile.
Inputs: no named parameters. Returns: result
get_my_top_itemsB
Get the current user's top artists or tracks.
Args:
item_type: Type of items: "artists" or "tracks" (default "tracks").
time_range: "short_term" (~4wk), "medium_term" (~6mo), or "long_term" (all time).
limit: Maximum number of items to return (1-50, default 20).
offset: Index of the first item to return (default 0).
Inputs: limit, offset, item_type, time_range. Returns: result
get_playback_stateA
Get the current playback state including track, device, and progress.
Inputs: no named parameters. Returns: result
get_playlistA
Get details of a Spotify playlist.
Shows playlist metadata plus the first 20 tracks. For more tracks or
pagination, use `get_playlist_items`.
Args:
playlist_id: The Spotify ID of the playlist.
market: ISO 3166-1 alpha-2 country code; affects track availability.
Inputs: playlist_id (required), market. Returns: result
get_playlist_itemsB
Get items (tracks/episodes) in a playlist.
Args:
playlist_id: The Spotify ID of the playlist.
limit: Maximum number of items to return (1-50, default 20).
offset: Index of the first item to return (default 0).
market: ISO 3166-1 alpha-2 country code.
Inputs: playlist_id (required), limit, market, offset. Returns: result
get_queueB
Get the current playback queue.
Inputs: no named parameters. Returns: result
get_recently_playedB
Get the user's recently played tracks.
Args:
limit: Maximum number of items to return (1-50, default 20).
after: Unix-ms cursor; return items played AFTER this timestamp.
before: Unix-ms cursor; return items played BEFORE this timestamp.
Only one of `after` / `before` may be set.
Inputs: after, limit, before. Returns: result
get_saved_albumsA
Get the current user's saved albums.
Args:
limit: Maximum number of albums to return (1-50, default 20).
offset: Index of the first album to return (default 0).
Inputs: limit, offset. Returns: result
get_saved_audiobooksA
Get the current user's saved audiobooks.
Args:
limit: Maximum number of audiobooks to return (1-50, default 20).
offset: Index of the first audiobook to return (default 0).
Inputs: limit, offset. Returns: result
get_saved_episodesA
Get the current user's saved episodes.
Args:
limit: Maximum number of episodes to return (1-50, default 20).
offset: Index of the first episode to return (default 0).
Inputs: limit, offset. Returns: result
get_saved_showsA
Get the current user's saved shows (podcasts).
Args:
limit: Maximum number of shows to return (1-50, default 20).
offset: Index of the first show to return (default 0).
Inputs: limit, offset. Returns: result
get_saved_tracksA
Get the current user's saved tracks.
Args:
limit: Maximum number of tracks to return (1-50, default 20).
offset: Index of the first track to return (default 0).
Inputs: limit, offset. Returns: result
get_showA
Get details of a Spotify show (podcast).
Args:
show_id: The Spotify ID of the show.
market: ISO 3166-1 alpha-2 country code; affects availability.
Inputs: show_id (required), market. Returns: result
get_show_episodesA
Get episodes of a Spotify show.
Args:
show_id: The Spotify ID of the show.
limit: Maximum number of episodes to return (1-50, default 20).
offset: Index of the first episode to return (default 0).
market: ISO 3166-1 alpha-2 country code.
Inputs: show_id (required), limit, market, offset. Returns: result
get_trackA
Get details of a Spotify track by its ID.
Args:
track_id: The Spotify ID of the track.
market: ISO 3166-1 alpha-2 country code; affects availability/relinking.
Inputs: track_id (required), market. Returns: result
next_trackA
Skip to the next track.
Args:
device_id: ID of the device. If not provided, uses the active device.
Inputs: device_id. Returns: result
pauseB
Pause playback on the active device.
Args:
device_id: ID of the device to pause. If not provided, pauses the active device.
Inputs: device_id. Returns: result
playA
Start or resume playback.
Args:
device_id: ID of the device to play on. Uses active device if omitted.
context_uri: Spotify URI of context (album, artist, playlist).
uris: List of Spotify track URIs to play. E.g. ["spotify:track:xxx"].
offset_position: Position in the context to start playback (0-based index).
position_ms: Position in milliseconds to seek to.
Inputs: uris, device_id, context_uri, position_ms, +1 more. Returns: result
previous_trackA
Skip to the previous track.
Args:
device_id: ID of the device. If not provided, uses the active device.
Inputs: device_id. Returns: result
remove_from_libraryA
Remove items from the user's library, or unfollow artists, users, and playlists.
Auto-chunks at 40 URIs per request.
Args:
uris: Spotify URIs: track, album, episode, show, audiobook, artist, user, or
playlist (e.g. ["spotify:track:xxx", "spotify:playlist:yyy"]).
Inputs: uris (required). Returns: result
remove_playlist_itemsA
Remove tracks or episodes from a playlist. Auto-chunks at 100 items per request.
Args:
playlist_id: The Spotify ID of the playlist.
uris: List of Spotify URIs to remove (e.g. ["spotify:track:xxx"]).
Inputs: uris (required), playlist_id (required). Returns: result
reorder_playlist_itemsB
Reorder items in a playlist.
Args:
playlist_id: The Spotify ID of the playlist.
range_start: Position of the first item to be reordered.
insert_before: Position where the items should be inserted.
range_length: Number of items to reorder (default 1).
Inputs: playlist_id (required), range_start (required), insert_before (required), range_length. Returns: result
save_to_libraryA
Save items to the user's library, or follow artists, users, and playlists.
Auto-chunks at 40 URIs per request.
Args:
uris: Spotify URIs: track, album, episode, show, audiobook, artist, user, or
playlist (e.g. ["spotify:track:xxx", "spotify:artist:yyy"]).
Inputs: uris (required). Returns: result
searchA
Search for tracks, albums, artists, playlists, shows, episodes, or audiobooks on Spotify.
Args:
query: Search query. Supports filters: artist:, album:, track:, year:, genre:,
isrc: (track ISRC), upc: (album UPC). Use NOT/OR with quotes for refinement.
types: Comma-separated types: track, album, artist, playlist, show, episode, audiobook.
limit: Maximum results per type (1-10, default 10).
offset: Index of first result to return (default 0).
market: ISO 3166-1 alpha-2 country code to filter results.
Inputs: query (required), limit, types, market, +1 more. Returns: result
seekA
Seek to a position in the currently playing track.
Args:
position_ms: Position in milliseconds to seek to.
device_id: ID of the device. If not provided, uses the active device.
Inputs: position_ms (required), device_id. Returns: result
set_repeatA
Set the repeat mode for playback.
Args:
state: Repeat mode: "track", "context", or "off".
device_id: ID of the device. If not provided, uses the active device.
Inputs: state (required), device_id. Returns: result
set_volumeA
Set the playback volume.
Args:
volume_percent: Volume level (0-100).
device_id: ID of the device. If not provided, uses the active device.
Inputs: volume_percent (required), device_id. Returns: result
toggle_shuffleA
Set or toggle shuffle mode for playback.
Args:
state: True to enable, False to disable. If omitted, flips the current state.
device_id: ID of the device. If not provided, uses the active device.
Inputs: state, device_id. Returns: result
transfer_playbackA
Transfer playback to a different device.
Args:
device_id: ID of the device to transfer to.
play: Whether to start playing on the new device (default True).
Inputs: device_id (required), play. Returns: result
update_playlistB
Update a playlist's name, description, or visibility.
Args:
playlist_id: The Spotify ID of the playlist.
name: New name for the playlist.
description: New description for the playlist.
public: Whether the playlist should be public.
Inputs: playlist_id (required), name, public, description. Returns: result
whoamiA
Diagnostic: show auth status, profile basics, active device, and configured scopes.
Inputs: no named parameters. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 47 tools
Tools target distinct resources and actions, but there are minor overlaps: get_playlist vs get_playlist_items and get_playback_state vs get_currently_playing could be confused, though descriptions clarify the differences.
Mostly consistent snake_case with verb_noun (get_track, add_playlist_items), but some tools are single imperatives (play, pause, search) or use an adjective_noun form (next_track), slightly breaking the pattern.
With 47 tools, the server far exceeds the recommended 3-15 range and crosses the 25+ threshold for 'too many', making it heavy and potentially overwhelming despite the broad Spotify domain.
Core CRUD for playlists, library, and playback is covered, but notable gaps remain such as no delete_playlist and no access to recommendations, audio features, or artist top tracks—minor omissions agents can work around.
Maintenance
Related MCP Connectors
Generate AI music via the Lacuna Music API from MCP clients like Claude Desktop & Code.
MCP server for progressive tool usage at any scale (see https://klavis.ai)
MCP server for Producer/Riffusion AI music generation
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables AI assistants like Claude to interact with Spotify, allowing them to search for tracks, control playback, and manage playlists.1ISC
- AlicenseAqualityDmaintenanceA Model Context Protocol server that enables AI assistants like Claude Desktop to interact with Spotify's music streaming service, supporting playback control, playlist management, music search, and user profile access.412MIT
- FlicenseNot gradedqualityDmaintenanceA 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-