Skip to main content
Glama
Spotify MCP Server

Spotify MCP Server

by hrishi0102

Spotify MCP-Server

Ein einfacher Model Context Protocol (MCP)-Server, der die Interaktion mit Spotify über Claude ermöglicht. Dieser Server ermöglicht es Claude, über Ihr Spotify-Konto nach Songs zu suchen, Playlists zu erstellen, Empfehlungen zu erhalten und vieles mehr.

Merkmale

  • Suche nach Titeln auf Spotify

  • Ihr Spotify-Profil anzeigen

  • Erstellen Sie Wiedergabelisten

  • Titel zu Wiedergabelisten hinzufügen

  • Erhalten Sie personalisierte Musikempfehlungen

Related MCP server: Spotify MCP Server

Verfügbare Tools

Werkzeugname

Beschreibung

set-spotify-credentials

Legen Sie Ihre Spotify-Authentifizierungsdaten fest

check-credentials-status

Überprüfen Sie, ob Ihre Anmeldeinformationen gültig sind und wer angemeldet ist

search-tracks

Suchen Sie nach Titeln nach Name, Interpret oder Schlüsselwörtern

get-current-user

Holen Sie sich Ihre Spotify-Profilinformationen

create-playlist

Erstellen Sie eine neue Playlist in Ihrem Konto

add-tracks-to-playlist

Titel zu einer vorhandenen Playlist hinzufügen

get-recommendations

Erhalten Sie Empfehlungen basierend auf Seed-Tracks

Installationsanweisungen

1. Voraussetzungen

  • Node.js v16 oder höher

  • npm

  • Ein Spotify-Konto

  • Eine registrierte Spotify-Entwickleranwendung

2. Erstellen Sie eine Spotify-Entwickler-App

  1. Gehen Sie zum Spotify Developer Dashboard

  2. Melden Sie sich mit Ihrem Spotify-Konto an

  3. Klicken Sie auf „App erstellen“.

  4. Geben Sie den App-Namen und die Beschreibung ein

  5. Fügen Sie http://localhost:8888/callback als Umleitungs-URI hinzu

  6. Notieren Sie Ihre Client-ID und Ihr Client-Geheimnis

3. Installieren Sie das Projekt

# Clone or download the project first
cd spotify-mcp-server

# Install dependencies
npm install

4. Holen Sie sich Ihre Spotify-Token

Bearbeiten Sie die Datei spotify-auth.js um Ihre Client-ID und Ihr Client-Geheimnis einzuschließen:

// Replace these with your Spotify app credentials
const CLIENT_ID = "your_client_id_here";
const CLIENT_SECRET = "your_client_secret_here";

Führen Sie dann das Authentifizierungsskript aus:

node spotify-auth.js

Dies wird:

  1. Öffnen Sie eine URL in Ihrem Browser

  2. Fordern Sie Sie auf, sich bei Spotify anzumelden

  3. Bitten Sie um Ihre Erlaubnis, auf Ihr Konto zuzugreifen

  4. Speichern Sie die Token in secrets.json

5. Erstellen Sie den MCP-Server

npm run build

6. Konfigurieren Sie Claude Desktop

Bearbeiten Sie Ihre Claude Desktop-Konfigurationsdatei:

  • Unter macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Unter Windows: %APPDATA%\Claude\claude_desktop_config.json

Fügen Sie die folgende Konfiguration hinzu:

{
  "mcpServers": {
    "spotify": {
      "command": "node",
      "args": ["/full/path/to/spotify-mcp-server/build/spotify-mcp-server.js"]
    }
  }
}

Ersetzen Sie /full/path/to/spotify-mcp-server durch den tatsächlichen Pfad zu Ihrem Projektverzeichnis.

7. Starten Sie Claude Desktop neu

Schließen Sie Claude Desktop und öffnen Sie es erneut, um die neue Konfiguration zu laden.

Verwendung

Wenn Sie eine Unterhaltung mit Claude beginnen, müssen Sie zunächst Ihre Spotify-Anmeldeinformationen festlegen:

  1. Schauen Sie sich Ihre secrets.json -Datei an, um Ihre Anmeldeinformationen zu erhalten

  2. Verwenden Sie das Tool set-spotify-credentials zur Authentifizierung

  3. Dann nutzen Sie eines der anderen Spotify-Tools

Beispiel-Eingabeaufforderungen

Einrichten der Anmeldeinformationen

I want to connect to my Spotify account. Here are my credentials from secrets.json:

Tool: set-spotify-credentials
Parameters:
{
  "clientId": "your_client_id",
  "clientSecret": "your_client_secret",
  "accessToken": "your_access_token",
  "refreshToken": "your_refresh_token"
}

Grundlegende Befehle

Überprüfen Sie Ihr Konto:

Can you check who I'm logged in as on Spotify?

Tool: get-current-user
Parameters: {}

Suche nach Titeln:

Search for songs by Weekend

Tool: search-tracks
Parameters:
{
  "query": "Taylor Swift",
  "limit": 5
}

Erstellen Sie eine Wiedergabeliste:

Create a new playlist called "My Pretty pretty girlfriend"

Tool: create-playlist
Parameters:
{
  "name": "My Pretty pretty girlfriend",
  "description": "For my girlfriend. Created with Claude and the Spotify MCP server"
}

Mehrstufige Aufgaben

Erstellen einer Playlist mit Songs:

I want to create a workout playlist with energetic songs. First, search for some high-energy songs. Then create a playlist called "Workout Mix" and add those songs to it.

Empfehlungen basierend auf Favoriten erhalten:

I like the song "Blinding Lights" by The Weeknd. Can you search for it, then find similar songs, and create a playlist with those recommendations?

Fehlerbehebung

  • Fehler: Kein Zugriffstoken verfügbar : Sie müssen Ihre Anmeldeinformationen zuerst mit dem Tool set-spotify-credentials festlegen.

  • Authentifizierungsfehler : Ihre Token sind möglicherweise abgelaufen. Führen Sie das Authentifizierungsskript erneut aus, um neue Token zu erhalten.

  • Ungültige Anmeldeinformationen : Überprüfen Sie noch einmal, ob Sie die richtige Client-ID und das richtige Client-Geheimnis verwenden.

Hinweise

  • Der Server speichert Anmeldeinformationen nur im Speicher

  • Sie müssen jedes Mal Anmeldeinformationen festlegen, wenn Sie eine neue Konversation beginnen

  • Wenn Claude Desktop neu gestartet wird, müssen Sie die Anmeldeinformationen erneut festlegen

Available Tools

7 tools
add-tracks-to-playlistD
NameRequiredDescriptionDefault
playlistIdYesThe Spotify playlist ID
trackUrisYesArray of Spotify track URIs to add

TDQS

D1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

check-credentials-statusD
NameRequiredDescriptionDefault

No parameters

TDQS

D1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

create-playlistD
NameRequiredDescriptionDefault
descriptionNoDescription of the playlist
nameYesName of the playlist

TDQS

D1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get-current-userD
NameRequiredDescriptionDefault

No parameters

TDQS

D1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get-recommendationsD
NameRequiredDescriptionDefault
limitNoNumber of recommendations to return
seedTracksYesSpotify track IDs to use as seeds (max 5)

TDQS

D1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search-tracksD
NameRequiredDescriptionDefault
limitNoNumber of results to return
queryYesSearch query for tracks

TDQS

D1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

set-spotify-credentialsD
NameRequiredDescriptionDefault
accessTokenYesThe Spotify Access Token
clientIdYesThe Spotify Client ID
clientSecretYesThe Spotify Client Secret
refreshTokenYesThe Spotify Refresh Token

TDQS

D1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 7 tool updatesv1.0.0
    • First observedadd-tracks-to-playlist
    • First observedcheck-credentials-status
    • First observedcreate-playlist
    • First observedget-current-user
    • First observedget-recommendations
    • First observedsearch-tracks
    • First observedset-spotify-credentials

TDQS

D1.8/5.0

Scored across 7 tools

Disambiguation4/5

Most tools have distinct purposes targeting different Spotify resources like playlists, user info, recommendations, and tracks, but 'add-tracks-to-playlist' and 'create-playlist' could be confused if an agent needs to both create and populate a playlist in one operation. The lack of descriptions increases minor ambiguity.

Naming Consistency3/5

The naming uses a mix of verb-noun patterns (e.g., 'create-playlist', 'search-tracks') and more descriptive phrases (e.g., 'check-credentials-status', 'set-spotify-credentials'), with all tools using kebab-case. This is readable but lacks a strict, predictable convention across all tools.

Tool Count5/5

With 7 tools, this server is well-scoped for a Spotify integration, covering core functionalities like user management, playlist operations, search, and recommendations without being overwhelming or too sparse.

Completeness3/5

The toolset covers key Spotify operations like user info, search, recommendations, and playlist management, but lacks update or delete operations for playlists and tracks, and missing tools for managing playback or albums creates notable gaps in a full music streaming workflow.

Maintenance

ActivityInactive
ResponsivenessNo recent community issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    Not graded
    maintenance
    Connects Claude to Spotify for music discovery, playlist creation, and collection analysis through natural language. Enables searching songs, analyzing music diversity, creating playlists, and getting recommendations using Spotify's API.
    -