Spotify MCP(Music Control Protocol)服务器是一款用于控制和管理 Spotify 播放的实用工具。它具备播放控制、播放列表管理以及认证授权等功能,能为用户带来便捷的音乐控制体验。
按照以下步骤,你可以轻松搭建并集成 Spotify MCP 服务器。
git clone https://github.com/marcelmarais/spotify-mcp-server.git
cd spotify-mcp-server
npm install
npm run build
http://localhost:8888/callback
)。创建 spotify-config.json
文件并填写以下内容:
{
"clientId": "your-client-id",
"clientSecret": "your-client-secret",
"redirectUri": "http://localhost:8888/callback"
}
npm run auth
spotify-config.json
文件中。在 Claude 设置文件中添加以下内容:
{
"mcpServers": {
"spotify": {
"command": "node",
"args": ["spotify-mcp-server/build/index.js"]
}
}
}
在 Cursor 的 MCP 设置界面,添加服务器命令:
node path/to/spotify-mcp-server/build/index.js
完成上述步骤后,你就成功搭建并集成了 Spotify MCP 服务器。