Spotify MCP Server
Spotify-MCP MCP-Server
MCP-Projekt zur Verbindung von Claude mit Spotify. Basierend auf der API von spotipy-dev .
Merkmale
Wiedergabe starten, pausieren und überspringen
Suche nach Titeln/Alben/Interpreten/Wiedergabelisten
Informationen zu einem Titel/Album/Künstler/einer Playlist erhalten
Verwalten der Spotify-Warteschlange
Verwalten, Erstellen und Aktualisieren von Wiedergabelisten
Related MCP server: Spotify MCP Server
Demo
Stellen Sie sicher, dass Sie den Ton einschalten
Konfiguration
Spotify-API-Schlüssel erhalten
Erstellen Sie ein Konto auf developer.spotify.com . Navigieren Sie zum Dashboard . Erstellen Sie eine App mit der Umleitungs-URI http://127.0.0.1:8080/callback . Sie können einen beliebigen Port wählen, müssen aber http und eine explizite Loopback-Adresse (IPv4 oder IPv6) verwenden.
Weitere Informationen/Fehlerbehebung finden Sie hier . Möglicherweise müssen Sie Ihre MCP-Umgebung (z. B. Claude Desktop) ein- oder zweimal neu starten, bevor es funktioniert.
Führen Sie dieses Projekt lokal aus
Dieses Projekt ist noch nicht für temporäre Umgebungen (z. B. uvx -Nutzung) eingerichtet. Führen Sie das Projekt lokal aus, indem Sie dieses Repo klonen.
git clone https://github.com/varunneal/spotify-mcp.gitFügen Sie dieses Tool als MCP-Server hinzu.
Claude Desktop unter MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
Claude Desktop unter Windows: %APPDATA%/Claude/claude_desktop_config.json
"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"
}
}Fehlerbehebung
Bitte melden Sie uns, wenn Sie dieses MCP nicht zum Laufen bringen. Hier sind einige Tipps:
Stellen Sie sicher, dass
uvaktualisiert ist. Ich empfehle Version>=0.54.Stellen Sie sicher, dass Claude über Ausführungsberechtigungen für das Projekt verfügt:
chmod -R 755.Stellen Sie sicher, dass Sie über Spotify Premium verfügen (erforderlich zum Ausführen der Entwickler-API).
Dieses MCP gibt Protokolle an std err aus (wie in der MCP-Spezifikation angegeben). Auf dem Mac sollte die Claude Desktop-App diese Protokolle an ~/Library/Logs/Claude ausgeben. Auf anderen Plattformen finden Sie die Protokolle hier .
Sie können den MCP Inspector über npm mit diesem Befehl starten:
npx @modelcontextprotocol/inspector uv --directory /path/to/spotify_mcp run spotify-mcpBeim Start zeigt der Inspector eine URL an, auf die Sie in Ihrem Browser zugreifen können, um mit dem Debuggen zu beginnen.
ZU TUN
Leider wurden viele nützliche Funktionen der Spotify-API verworfen . Die meisten neuen Funktionen sind eher unwichtig oder dienen dem Projekt.
Tests.
Hinzufügen von API-Unterstützung zum Verwalten von Wiedergabelisten.
Hinzufügen von API-Unterstützung für paginierte Suchergebnisse/Wiedergabelisten/Alben.
PRs geschätzt! Vielen Dank an @jamiew, @davidpadbury, @manncodes, @hyuma7, @aanurraj und andere für ihre Beiträge.
Einsatz
(alles)
Erstellen und Veröffentlichen
So bereiten Sie das Paket für die Verteilung vor:
Abhängigkeiten synchronisieren und Sperrdatei aktualisieren:
uv syncErstellen Sie Paketverteilungen:
uv buildDadurch werden Quell- und Wheel-Distributionen im Verzeichnis dist/ erstellt.
Auf PyPI veröffentlichen:
uv publishHinweis: Sie müssen PyPI-Anmeldeinformationen über Umgebungsvariablen oder Befehlsflags festlegen:
Token:
--tokenoderUV_PUBLISH_TOKENOder Benutzername/Passwort:
--username/UV_PUBLISH_USERNAMEund--password/UV_PUBLISH_PASSWORD
Available Tools
5 toolsSpotifyGetInfoA
Get detailed information about a Spotify item (track, album, artist, or playlist).
Inputs: item_uri (required).
SpotifyPlaybackB
Manages the current playback with the following actions: - get: Get information about user's current track. - start: Starts playing new item or resumes current playback if called with no uri. - pause: Pauses current playback. - skip: Skips current track.
Inputs: action (required), num_skips, spotify_uri.
SpotifyPlaylistC
Manage Spotify playlists. - get: Get a list of user's playlists. - get_tracks: Get tracks in a specific playlist. - add_tracks: Add tracks to a specific playlist. - remove_tracks: Remove tracks from a specific playlist. - change_details: Change details of a specific playlist.
Inputs: action (required), description, name, playlist_id, +1 more.
SpotifyQueueB
Manage the playback queue - get the queue or add tracks.
Inputs: action (required), track_id.
SpotifySearchB
Search for tracks, albums, artists, or playlists on Spotify.
Inputs: query (required), limit, qtype.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose: SpotifyGetInfo retrieves metadata, SpotifyPlayback handles real-time playback control, SpotifyPlaylist manages playlist content and details, SpotifyQueue manages the playback queue, and SpotifySearch performs searches. There is no overlap in functionality that would cause confusion.
All tool names follow a consistent 'Spotify' prefix with a descriptive noun or verb-noun pattern (e.g., SpotifyGetInfo, SpotifyPlayback, SpotifyPlaylist, SpotifyQueue, SpotifySearch). This uniformity makes the tool set predictable and easy to navigate.
With 5 tools, the server is well-scoped for managing Spotify interactions, covering key areas like playback, playlists, search, queue, and general info. Each tool earns its place without feeling bloated or insufficient for the domain.
The tool set provides comprehensive coverage for core Spotify operations, including CRUD for playlists, playback control, search, and queue management. A minor gap is the lack of user profile or library management tools (e.g., managing saved tracks or albums), but agents can still handle most common workflows effectively.
Maintenance
Related MCP Connectors
Connect Claude to your Platform7n workspaces: chat, links, work and decks. One-click OAuth.
Connect Claude to your Platform7n workspaces: chat, links, work and decks. One-click OAuth.
Connect Claude to Fathom meeting recordings, transcripts, and summaries
Connect Claude to your Intervals.icu watch data for fitness, workout review, and plan writing.
Related MCP Servers
- AlicenseBqualityBmaintenanceConnects Claude with Spotify, allowing users to control playback, search for content, get music information, and manage the Spotify queue.48127 PyPI13MIT
- FlicenseAqualityDmaintenanceConnects Claude with Spotify, enabling playback control, search functionality, and queue management through Spotify's API.4-
- FlicenseNot gradedqualityDmaintenanceConnects Claude with Spotify to control playback, search music, get track information, and manage the queue through conversation.1-
- AlicenseNot gradedqualityDmaintenanceEnables Claude to control Spotify features including playback control, playlist management, search, and accessing user's listening history and preferences through the Spotify API.1ISC