Skip to main content
Glama
markswendsen-code

@striderlabs/mcp-spotify

@striderlabs/mcp-spotify

用于 Spotify 的 MCP 服务器——让 AI 代理通过 Spotify Web API 搜索音乐、控制播放和管理播放列表。

Strider Labs 构建。

功能

  • 搜索 — 查找歌曲、艺术家、专辑和播放列表

  • 播放列表 — 查看、创建和编辑你的播放列表

  • 播放控制 — 播放、暂停、跳过、上一首、设置音量

  • 多设备 — 列出并切换 Spotify Connect 设备

  • OAuth 2.0 — 使用 PKCE 的安全授权(无需客户端密钥)

  • 令牌持久化 — 令牌本地存储,自动刷新

Related MCP server: Spotify MCP Server

设置

1. 创建 Spotify 应用

  1. 前往 Spotify 开发者仪表板

  2. 点击 创建应用

  3. 重定向 URI 设置为:http://localhost:8888/callback

  4. 复制你的 客户端 ID

2. 安装

npx @striderlabs/mcp-spotify

或全局安装:

npm install -g @striderlabs/mcp-spotify

3. 配置 Claude Desktop

添加到你的 claude_desktop_config.json

{
  "mcpServers": {
    "spotify": {
      "command": "npx",
      "args": ["-y", "@striderlabs/mcp-spotify"],
      "env": {
        "SPOTIFY_CLIENT_ID": "your_client_id_here"
      }
    }
  }
}

4. 认证

在 Claude 中,调用一次认证工具:

spotify_auth

将打开浏览器窗口供你授权访问。批准后,令牌将保存在本地 ~/.striderlabs/spotify/tokens.json 并自动刷新。

环境变量

变量

必需

描述

SPOTIFY_CLIENT_ID

你的 Spotify 应用的客户端 ID

工具

认证

工具

描述

spotify_status

检查连接状态和已登录账户

spotify_auth

通过浏览器授权(OAuth 2.0 PKCE)

spotify_logout

清除存储的令牌

搜索

工具

参数

描述

search_tracks

query, limit?

搜索歌曲

search_artists

query, limit?

搜索艺术家

search_albums

query, limit?

搜索专辑

search_playlists

query, limit?

搜索播放列表

播放列表

工具

参数

描述

get_playlists

limit?

获取你的播放列表

create_playlist

name, description?, public?

创建新播放列表

add_to_playlist

playlistId, uris[], position?

添加歌曲

remove_from_playlist

playlistId, uris[]

移除歌曲

播放

工具

参数

描述

get_currently_playing

当前歌曲、进度、设备

play

deviceId?, contextUri?, uris?[], offsetPosition?, positionMs?

开始/恢复播放

pause

deviceId?

暂停播放

next_track

deviceId?

跳到下一首

previous_track

deviceId?

回到上一首

set_volume

volumePercent, deviceId?

设置音量(0–100)

get_devices

列出 Spotify Connect 设备

transfer_playback

deviceId, play?

切换播放设备

示例工作流

1. spotify_status            → check if authenticated
2. spotify_auth              → open browser to authorize (first time)
3. search_tracks query="Bohemian Rhapsody"
4. get_devices               → list available devices
5. play uris=["spotify:track:..."] deviceId="..."
6. get_currently_playing     → see what's playing
7. set_volume volumePercent=70
8. next_track                → skip to next
9. get_playlists             → see your playlists
10. create_playlist name="AI Picks"
11. add_to_playlist playlistId="..." uris=["spotify:track:..."]

要求

  • Node.js 18+

  • Spotify 账户(免费或 Premium)

  • 音量控制、播放控制需要 Spotify Premium

技术细节

  • 协议:基于 stdio 的模型上下文协议(MCP)

  • 认证:OAuth 2.0 授权码 + PKCE

  • API:Spotify Web API v1

  • 令牌存储~/.striderlabs/spotify/tokens.json

  • 浏览器自动化:Playwright(用于 OAuth 浏览器启动)

许可证

MIT — Strider Labs

Install Server
A
license - permissive license
A
quality
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    B
    quality
    B
    maintenance
    An MCP server that enables users to control Spotify playback, search music, and manage playlists through natural conversation. It is updated for the February 2026 Spotify Web API changes and supports full playlist CRUD operations.
    1
    6
    7
    MIT
  • A
    license
    B
    quality
    A
    maintenance
    MCP server for the Spotify Web API — gives Claude and other AI assistants tools to search music, control playback, manage playlists, library, and podcasts.
    59
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    MCP server for Spotify that enables playlist building and music discovery through 19 tools, allowing LLM agents to search tracks/artists/albums, manage playlists, control playback, and access personal listening data.
    20
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    An unofficial MCP server that provides access to Spotify's Web API through the Model Context Protocol, enabling AI assistants to search music, manage playlists, and control playback.
    16
    9
    ISC

View all related MCP servers

Related MCP Connectors

  • MCP server for Producer/Riffusion AI music generation

  • MCP server for Suno AI music generation, lyrics, and covers

  • MCP server for AI dialogue using various LLM models via AceDataCloud

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/markswendsen-code/mcp-spotify'

If you have feedback or need assistance with the MCP directory API, please join our Discord server