VS

varunneal/spotify-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

613 stars 132 forks 质量 74 趋势 21MIT

MCP用来连接你的LLM和Spotify。

概览

MCP项目将Claude与Spotify连接起来。建立在spotipy-dev的API之上。 - 开始、暂停和跳过播放 - 搜索曲目/专辑/艺人/播放列表 - 获取曲目/专辑/艺人/播放列表信息 - 管理 Spotify 队列 - 管理、创建和更新播放列表 视频——打开音频 https://github.com/user-attachments/assets/20ee1f92-f3e3-4dfa-b945-ca57bc1e0894 在 developer.spotify.com 创建一个账户。进入仪表盘。创建一个应用,redirect_uri为http://127.0.0.1:8080/callback.。你可以选择任何端口,但必须使用http和明确的环回地址(IPv4或IPv6)。 更多信息和排查请见这里。你可能需要重启MCP环境(比如Claude Desktop)一两次才能正常工作。 对于Cursor、Claude Desktop或其他支持MCP的客户端,你需要找到你的配置。 - Claude 桌面在 MacOS 上的位置:~/Library/Application\ 支持/Claude/claude_desktop_config。

概述(AI 翻译)

MCP项目将Claude与Spotify连接起来。建立在spotipy-dev的API之上。

[2026年3月通知]:非活跃项目。大多数PR不会合并。

特色

  • 开始、暂停和跳过播放
  • 搜索曲目/专辑/艺术家/播放列表
  • 获取关于某首曲目/专辑/艺术家/播放列表的信息
  • 管理Spotify队列
  • 管理、创建和更新播放列表

演示

视频——打开音频

https://github.com/user-attachments/assets/20ee1f92-f3e3-4dfa-b945-ca57bc1e0894

配置

获取Spotify API密钥

在 developer.spotify.com 上创建一个账户。导航到仪表盘。 创建一个redirect_uri为http://127.0.0.1:8080/callback.的应用。 你可以选择任何端口,但必须使用 HTTP 和明确的环回地址(IPv4 或 IPv6)。

更多信息和排查请见这里。 你可能需要重启MCP环境(比如Claude Desktop)一两次才能正常工作。

定位MCP配置

对于Cursor、Claude Desktop或其他支持MCP的客户端,你需要找到你的配置。

  • Claude 桌面在 MacOS 上的位置:~/Library/Application\ Support/Claude/claude_desktop_config.json

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

spotify-mcp MCP server

MCP project to connect Claude with Spotify. Built on top of spotipy-dev’s API.

[Notice March 2026]: Inactive project. Most PRs will not be merged.

Features

  • Start, pause, and skip playback
  • Search for tracks/albums/artists/playlists
  • Get info about a track/album/artist/playlist
  • Manage the Spotify queue
  • Manage, create, and update playlists

Demo

Configuration

Getting Spotify API Keys

Create an account on developer.spotify.com. Navigate to the dashboard. Create an app with redirect_uri as http://127.0.0.1:8080/callback. You can choose any port you want but you must use http and an explicit loopback address (IPv4 or IPv6).

See here for more info/troubleshooting. You may have to restart your MCP environment (e.g. Claude Desktop) once or twice before it works.

Locating MCP Config

For Cursor, Claude Desktop, or any other MCP-enabled client you will have to locate your config.

  • Claude Desktop location on MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json

  • Claude Desktop location on Windows: %APPDATA%/Claude/claude_desktop_config.json

Run this project with uvx

Add this snippet to your MCP Config.

{
  "mcpServers": {
    "spotify": {
      "command": "uvx",
      "args": [
        "--python", "3.12",
        "--from", "git+https://github.com/varunneal/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"
      }
    }
  }
}

Run this project locally

Using UVX will open the spotify redirect URI for every tool call. To avoid this, you can run this project locally by cloning this repo:

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

Add it to your MCP Config like this:

"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"
    }
  }

Troubleshooting

Please open an issue if you can’t get this MCP working. Here are some tips:

  1. Make sure uv is updated. I recommend version >=0.54.
  2. If cloning locally, enable execution permisisons for the project: chmod -R 755.
  3. Ensure you have Spotify premium (needed for running developer API).
在 GitHub 查看完整 README

安装

uvx --python 3.12 --from git+https://github.com/varunneal/spotify-mcp spotify-mcp
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "spotify": { "command": "uvx", "args": [ "--python", "3.12", "--from", "git+https://github.com/varunneal/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" } } } }