Skip to main content
Glama

spotify-mcp

Ein Model Context Protocol (MCP)-Server, der Claude mit Spotify verbindet. Steuern Sie Ihre Spotify-Wiedergabe, suchen Sie Musik, verwalten Sie Wiedergabelisten und mehr – alles durch natürliche Konversation mit Claude.

Fork-Hinweis: Dieses Projekt ist ein Fork von varunneal/spotify-mcp und wurde für die Änderungen der Spotify Web API vom Februar 2026 aktualisiert. Erstellt und gewartet mit Claude Code.

Was ist neu (v0.4.0)

Architektur-Rewrite

  • spotipy entfernt -- verwendet httpx async direkt (natives Async, kein asyncio.to_thread-Wrapping)

  • Einzelnes Modul -- server.py, spotify_api.py, utils.py wurden in einer Datei zusammengefasst

  • FastMCP -- saubere @mcp.tool()-Dekoratoren anstelle von manuellem ToolModel + match/case-Routing

  • 2 Abhängigkeiten -- nur mcp + httpx (vorher mcp + spotipy + python-dotenv)

  • Explizites OAuth -- spotify-mcp --auth für die Ersteinrichtung, automatische Aktualisierung bei nachfolgender Verwendung

Funktionen (aus v0.3.0 übernommen)

  • Wiedergabe starten, pausieren und überspringen

  • Suche nach Titeln, Alben, Künstlern und Wiedergabelisten

  • Detaillierte Informationen zu jedem Spotify-Element abrufen

  • Wiedergabewarteschlange verwalten

  • Vollständiges CRUD für Wiedergabelisten (Titel erstellen, lesen, aktualisieren, löschen)

  • Gelikte/gespeicherte Songs mit optionaler Genre-Anreicherung abrufen

  • Angepasst an die Spotify-API-Änderungen vom Februar 2026

Related MCP server: Spotify MCP Server

Funktionsweise

Claude <--MCP (stdio)--> spotify-mcp <--httpx async--> Spotify Web API
  1. Claude sendet Tool-Aufrufe über das MCP-Protokoll

  2. Der Server übersetzt diese in Spotify Web API-Anfragen mittels httpx

  3. OAuth-Token werden automatisch aktualisiert; Erstauthentifizierung über spotify-mcp --auth

  4. Ergebnisse werden in präzises JSON geparst und an Claude zurückgegeben

Verfügbare Tools

Tool

Aktionen

Beschreibung

spotify_playback

get, start, pause, skip, previous, volume

Steuerung der Musikwiedergabe und Lautstärke

spotify_search

--

Suche nach Titeln, Alben, Künstlern, Wiedergabelisten

spotify_queue

get, add

Wiedergabewarteschlange anzeigen und verwalten

spotify_get_info

--

Detaillierte Elementinformationen per Spotify-URI abrufen

spotify_playlist

get, get_tracks, add_tracks, remove_tracks, change_details, create, delete

Vollständige Verwaltung von Wiedergabelisten

spotify_liked_songs

get, get_with_genres, like, unlike, check

Gespeicherte Songs verwalten und Bibliothek prüfen

spotify_recently_played

--

Kürzlich gespielte Titel mit Zeitstempeln abrufen

spotify_devices

list, transfer

Geräte auflisten und Wiedergabe übertragen

Architektur

src/spotify_mcp/
  __init__.py   # Entry point (stdio / --auth)
  server.py     # FastMCP server, API client, parsers — all in one

Voraussetzungen

  • Python 3.12+

  • Spotify Premium-Konto (erforderlich für den Dev-Mode-API-Zugriff seit Februar 2026)

  • Spotify Developer App-Anmeldedaten

Konfiguration

1. Spotify Developer App erstellen

  1. Gehen Sie zu developer.spotify.com/dashboard

  2. Erstellen Sie eine neue App

  3. Setzen Sie den Redirect-URI auf http://127.0.0.1:8080/callback

  4. Notieren Sie sich Ihre Client ID und Ihr Client Secret

Wichtig (Februar 2026): Apps im Dev-Mode sind auf 5 autorisierte Benutzer begrenzt und erfordern, dass der App-Besitzer Spotify Premium besitzt.

2. Erstauthentifizierung

Führen Sie den Auth-Flow einmal aus, um Ihr OAuth-Token zu erhalten:

SPOTIFY_CLIENT_ID=your_id SPOTIFY_CLIENT_SECRET=your_secret uv run spotify-mcp --auth

Dies öffnet einen Browser für den Spotify-Login und speichert das Token anschließend unter ~/.spotify_mcp_cache.json.

3. Zum MCP-Client hinzufügen

Lokal ausführen (empfohlen)

git clone https://github.com/verIdyia/spotify-mcp.git

Fügen Sie dies zu Ihrer MCP-Konfiguration hinzu (Claude Desktop, Cursor, etc.):

{
  "mcpServers": {
    "spotify": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/spotify-mcp",
        "run",
        "spotify-mcp"
      ],
      "env": {
        "SPOTIFY_CLIENT_ID": "your_client_id",
        "SPOTIFY_CLIENT_SECRET": "your_client_secret",
        "SPOTIFY_REDIRECT_URI": "http://127.0.0.1:8080/callback"
      }
    }
  }
}

Mit uvx ausführen

{
  "mcpServers": {
    "spotify": {
      "command": "uvx",
      "args": [
        "--python", "3.12",
        "--from", "git+https://github.com/verIdyia/spotify-mcp",
        "spotify-mcp"
      ],
      "env": {
        "SPOTIFY_CLIENT_ID": "your_client_id",
        "SPOTIFY_CLIENT_SECRET": "your_client_secret",
        "SPOTIFY_REDIRECT_URI": "http://127.0.0.1:8080/callback"
      }
    }
  }
}

Umgebungsvariablen

Variable

Erforderlich

Standard

Beschreibung

SPOTIFY_CLIENT_ID

Ja

--

Spotify App Client ID

SPOTIFY_CLIENT_SECRET

Ja

--

Spotify App Client Secret

SPOTIFY_REDIRECT_URI

Nein

http://127.0.0.1:8080/callback

OAuth Redirect-URI

SPOTIFY_CACHE_PATH

Nein

~/.spotify_mcp_cache.json

Pfad zur Token-Cache-Datei

Fehlerbehebung

  1. Erster Start: Führen Sie spotify-mcp --auth aus, um den OAuth-Flow abzuschließen, bevor Sie ihn mit einem MCP-Client verwenden

  2. Token abgelaufen: Token werden automatisch aktualisiert. Falls Probleme bestehen bleiben, führen Sie --auth erneut aus

  3. Kein aktives Gerät: Stellen Sie sicher, dass Spotify geöffnet ist und auf mindestens einem Gerät spielt

  4. Stellen Sie sicher, dass uv aktualisiert ist -- Version >=0.54 empfohlen

Debugging

Starten Sie den MCP Inspector:

npx @modelcontextprotocol/inspector uv --directory /path/to/spotify-mcp run spotify-mcp

Zusammenfassung der Spotify API-Änderungen vom Februar 2026

Änderung

Auswirkung

Status

Such-limit max. reduziert von 50 auf 10

Weniger Ergebnisse pro Suche

Angepasst

Playlist-Endpunkte /tracks -> /items

Endpunkt-URLs geändert

Angepasst

Antwortfeld tracks -> items

Parsing aktualisiert

Angepasst

Batch-GET-Endpunkte entfernt

Muss einzeln abgerufen werden

Angepasst

popularity-Feld aus Titeln entfernt

Nicht mehr verfügbar

Behandelt

Dev-Mode: 5-Benutzer-Limit, Premium erforderlich

Zugriffsbeschränkung

Dokumentiert

Credits

Lizenz

MIT-Lizenz -- siehe LICENSE für Details.

Available Tools

6 tools
SpotifyGetInfoC

Get detailed information about a Spotify item...

Inputs: item_uri (required).

SpotifyLikedSongsC

Get user's liked (saved) songs from Spotify library.

Inputs: action (required), limit.

SpotifyPlaybackC

Manages the current playback...

Inputs: action (required), spotify_uri, num_skips.

SpotifyPlaylistC

Manage Spotify playlists.

Inputs: action (required), playlist_id, track_ids, name, +2 more.

SpotifyQueueC

Manage the playback queue - get the queue or add tracks.

Inputs: action (required), track_id.

SpotifySearchC

Search for tracks, albums, artists, or playlists on Spotify.

Inputs: query (required), qtype, limit.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 6 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose targeting different Spotify resources: GetInfo for item details, LikedSongs for saved songs, Playback for current playback control, Playlist for playlist management, Queue for queue operations, and Search for finding content. There is no overlap or ambiguity between these functions.

    Naming Consistency5/5

    All tools follow a consistent 'Spotify' prefix with descriptive noun-based naming (e.g., SpotifyGetInfo, SpotifyPlaylist). The pattern is uniform across all six tools, making them easily identifiable and predictable.

    Tool Count5/5

    With 6 tools, this server is well-scoped for Spotify integration, covering key areas like playback, playlists, search, and user library. Each tool serves a specific, necessary function without bloat or redundancy.

    Completeness4/5

    The toolset covers core Spotify functionalities including search, playback control, playlist management, and user data access. Minor gaps might include operations like following artists or managing user profile settings, but the provided tools support most common workflows effectively.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      F
      maintenance
      An MCP server that enables users to control Spotify playback, search for music, and manage playlists through MCP-compatible clients. It supports features like track recommendations and playback management using secure OAuth authentication.
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      MCP server for the Spotify Web API — gives Claude and other AI assistants tools to search music, control playback, manage playlists, library, and podcasts.
      47
      5
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      An unofficial MCP server that provides access to Spotify's Web API through the Model Context Protocol, enabling AI assistants to search music, manage playlists, and control playback.
      29 npm
      9
      ISC
    • A
      license
      B
      quality
      D
      maintenance
      A Model Context Protocol server that enables searching and managing Spotify music, playlists, artists, albums, and audiobooks through natural language.
      24
      93 npm
      MIT