Skip to main content
Glama
DivyamAgg24

Spotify-Claude MCP Server

by DivyamAgg24

Spotify-Claude MCP 服务器

一个连接 Spotify API 并使用 Claude 作为 AI 助手来增强音乐发现和互动的工具。

概述

该项目通过模型控制协议 (MCP) 服务器将 Claude AI 与 Spotify API 集成。它允许用户使用 Claude 处理的自然语言查询与其 Spotify 帐户进行交互。

Related MCP server: Spotify MCP Server

特征

目前,Claude 可以使用 SpotifyAPI 获取艺术家信息。此功能可以扩展用于其他查询,例如获取热门曲目或流派、创建播放列表或获取用户个人资料数据。

先决条件

  • Spotify 开发者账户

  • Spotify API 凭证(客户端 ID 和客户端密钥)

  • 克劳德桌面

安装

  1. 克隆存储库:

git clone https://github.com/DivyamAgg24/SpotifyMCP.git
cd SpotifyMCP
  1. 安装依赖项:

npm install
  1. 设置环境变量:在根目录中创建一个 .env 文件,其中包含以下变量:

SPOTIFY_CLIENT_ID=your_spotify_client_id
SPOTIFY_CLIENT_SECRET=your_spotify_client_secret
SPOTIFY_ACCESS_TOKEN=access_token_obtained_from_clientId_and_clientSecret

配置

在 Spotify 开发者仪表板中注册您的应用,在您的 Spotify 应用设置中添加http://localhost:8888/callback作为重定向 URI,将客户端 ID 和客户端密钥复制到您的 .env 文件

用法

  1. 构建项目

tsc -b
  1. 在 Claude 配置文件中添加 MCP 服务器配置

  2. 向克劳德询问艺术家的名字

工具功能

MCP 服务器向 Claude 公开以下功能:

get_artist(name):检索有关艺术家的信息

交互示例

User: "What is the artist name?"
Claude: [Uses get_artist function] "The artist name is Pitbull."

MCP 服务器:处理 Claude 和 Spotify API 之间的通信 Spotify API 客户端:管理对 Spotify Claude 集成的身份验证和 API 请求:处理自然语言并确定要调用的函数

Available Tools

1 tool
get_artistD

Get Artist name

ParametersJSON Schema
NameRequiredDescriptionDefault
methodYesGet or post request

TDQS

D1.7/5.0
Behavior1/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. The description 'Get Artist name' doesn't reveal any behavioral traits—it doesn't mention whether this is a read-only operation, what authentication might be required, potential rate limits, error conditions, or what the response format looks like. For a tool with zero annotation coverage, this is completely inadequate.

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

Conciseness2/5

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

While the description is brief with just two words, this represents under-specification rather than effective conciseness. The text doesn't earn its place by providing useful information—it's too sparse to be helpful. A truly concise description would still convey essential purpose and context efficiently, which this fails to do.

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?

Given the tool's purpose (retrieving artist information) with no annotations and no output schema, the description is completely inadequate. It doesn't explain what the tool returns, how results are formatted, or any behavioral aspects. For a data retrieval tool, this leaves critical gaps that would hinder an AI agent's ability to use it effectively.

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

Parameters3/5

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

The description provides no information about parameters, but the input schema has 100% description coverage with a single parameter 'method' documented as 'Get or post request'. Since schema coverage is high, the baseline score is 3. The description doesn't add any value beyond what the schema already provides, but it also doesn't detract from the existing documentation.

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

Purpose2/5

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

The description 'Get Artist name' is a tautology that essentially restates the tool name 'get_artist' with minor variation. It doesn't specify what resource is being retrieved (e.g., artist information from a database, API, or service) or provide any meaningful context about the operation. While it includes a verb ('Get'), it lacks specificity about what exactly is being obtained beyond the obvious from the name.

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?

There are no usage guidelines provided in the description. It doesn't indicate when to use this tool, what prerequisites might be needed, or any alternative approaches. With no sibling tools mentioned, the absence of guidance is still problematic as it leaves the agent without context for proper tool selection.

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. 1 tool update
    • First observedget_artist

TDQS

C2.2/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of ambiguity or overlap between tools. The single tool 'get_artist' has a clear, distinct purpose that cannot be confused with any other tool in this set.

Naming Consistency5/5

The naming follows a consistent verb_noun pattern with 'get_artist'. With only one tool, there is no inconsistency to evaluate, and the naming convention is clear and appropriate for the tool's function.

Tool Count2/5

A single tool is too few for a server named 'Spotify-Claude MCP Server', which suggests a broader music or artist domain. This minimal toolset severely limits functionality and does not provide adequate coverage for typical Spotify-related tasks like searching, playing, or managing playlists.

Completeness1/5

The tool surface is severely incomplete for a Spotify server. It only allows getting an artist name, with no support for other core operations such as searching for tracks, playing music, managing playlists, or accessing album information, making it impractical for most agent workflows.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers