Token导航 LogoToken导航

MCP Server · 音视频

Spotify Streamable MCP Server

一个提供音乐搜索、播放控制、播放列表管理和收藏歌曲功能的Spotify MCP服务器。

未说明官方级别未说明来源级核验工具 0
TypeScriptClaudeHTTP服务器Claude Desktop

快速开始

公开资料没有提供安装命令,按仓库或官方文档接入。
作者 / 组织
iceener
提供方
iceener

工具数量

0

来源目录标注

资源数量

0

来源目录标注

提示词数量

0

来源目录标注

GitHub Star

80

仓库热度

收录来源

2 个

MCP World

选型结论

Spotify Streamable MCP Server 属于音视频类 MCP Server,公开资料标注 0 个工具,通过传输方式未标注接入,适配 Claude Desktop、Claude,没有现成的安装命令;接入前要先准备 OAuth 授权。

分类

音视频

传输方式

未说明

认证方式

OAuth 授权

部署方式

公开资料未说明

安装与配置

公开目录没有给出安装命令,需要按仓库 README安装;下面按同类条目的通用流程说明。

公开命令不是通用的启动方式,拼不出可靠配置示例;请在客户端 MCP 配置里按官方文档填写 command 和 args。

上手步骤

  1. 1

    先确认运行方式

    公开资料没有标注传输方式,先看仓库 README,确认是本地进程还是远程地址。

  2. 2

    获取服务

    公开目录没有给出安装命令,按仓库 README里的步骤安装或获取服务。

  3. 3

    写入客户端配置

    在客户端的 MCP 配置里填启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4

    验证是否可用

    连接成功后客户端会列出 0 个工具,随便调一个只读工具确认能返回结果。

接入前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

公开资料仍需确认:安装命令

详细介绍

Spotify MCP服务器

Spotify的流式HTTP MCP服务器——搜索音乐、控制播放、管理播放列表和保存的歌曲。

作者 过度

\[!警告\] 此警告仅适用于为方便起见而包含的HTTP传输和OAuth包装器。它们是供个人/本地使用的,不是生产硬化的。 MCP工具和模式本身通过强大的验证、精简的输出、清晰的错误处理和其他最佳实践来实现。 如果您计划远程部署,请加强OAuth/HTTP层:适当的令牌验证、安全存储、TLS终止、严格的CORS/源代码检查、速率限制、审计日志记录以及遵守Spotify的条款。

动机

乍一看,“Spotify MCP”似乎没有必要——手动按下播放或跳过歌曲通常更快。当你不知道确切的标题(例如,“\[电影标题\]的配乐”),当你想“创建和播放一个符合我心情的播放列表”,或者当你使用语音时,它变得非常有用。此MCP允许LLM处理模糊意图→ 搜索→ 选择→ 控制循环,并返回所发生事情的明确确认。它与语音界面配合良好,可以连接到智能家居自动化的代理/工作流。

演示

*爱丽丝 --桌面AI助手*

*克劳德桌面版*

特性

  • ✅ 搜索 --查找曲目、专辑、艺术家、播放列表
  • ✅ 玩家控制 --播放、暂停、跳过、查找、音量、洗牌、重复、排队
  • ✅ 设备转移 --在设备之间移动播放
  • ✅ 播放列表 --创建、编辑、添加/删除曲目、重新排序
  • ✅ 图书馆 --保存/删除曲目,检查是否已保存
  • ✅ OAuth 2.1 --使用RS令牌映射保护PKCE流
  • ✅ 双运行时 --Node.js/Bun或Cloudflare Workers
  • ✅ 生产就绪 --加密令牌存储、速率限制、多用户支持

设计原则

  • LLM友好:工具不镜像Spotify的API 1:1-界面简化和统一
  • 第一批:操作使用数组(queries[], operations[])尽量减少工具调用
  • 清晰的反馈:每个响应都包含人类可读的内容 _msg 成功/失败的原因
  • 尽力验证:播放器控件验证设备、上下文和当前曲目

快速开始

1.安装

cd spotify-mcp
bun install

2.配置

cp .env.example .env

编辑 .env:

PORT=3000
AUTH_ENABLED=true

# From https://developer.spotify.com/dashboard
SPOTIFY_CLIENT_ID=your_client_id
SPOTIFY_CLIENT_SECRET=your_client_secret

# OAuth
OAUTH_SCOPES=playlist-read-private playlist-read-collaborative playlist-modify-public playlist-modify-private user-read-playback-state user-modify-playback-state user-read-currently-playing user-library-read user-library-modify
OAUTH_REDIRECT_URI=alice://oauth/callback
OAUTH_REDIRECT_ALLOWLIST=alice://oauth/callback

3.配置Spotify仪表板

在中添加重定向URI Spotify开发者仪表板:

http://127.0.0.1:3001/oauth/callback
alice://oauth/callback

4.跑步

bun dev
# MCP: http://127.0.0.1:3000/mcp
# OAuth: http://127.0.0.1:3001

服务器说明(模型看到的内容)

Use these tools to find music, get the current player status, control and transfer playback, and manage playlists and saved songs.

Tools
- search_catalog: Find songs, artists, albums, or playlists
- player_status: Read current player, available devices, queue, and current track
- spotify_control: Batch control playback (play, pause, next, previous, seek, volume, shuffle, repeat, transfer, queue)
- spotify_playlist: Manage playlists (list, get, items, create, update, add/remove items, reorder)
- spotify_library: Manage saved songs (get, add, remove, contains)

CRITICAL: device_id
- device_id is a long alphanumeric hash, NOT a human-readable name
- NEVER use the device name (like "MacBook Pro" or "iPhone") as device_id — this will fail!
- Always copy the exact device_id value from player_status → devices[].id or player.device_id

工具

search_catalog

搜索歌曲、艺术家、专辑和播放列表。

输入:

{
  queries: string[];                              // Search terms
  types: ("album"|"artist"|"playlist"|"track")[]; // What to search
  market?: string;                                // 2-letter country code
  limit?: number;                                 // 1-50 (default 20)
  offset?: number;                                // 0-1000 (default 0)
  include_external?: "audio";
}

输出:

{
  _msg: string;
  batches: Array;
    items: Array;
  }>;
}

player_status

读取当前玩家状态、设备、队列和当前曲目。

输入:

{ include?: ("player"|"devices"|"queue"|"current_track")[] }

输出:

{
  _msg: string;
  player?: {
    is_playing: boolean;
    device_id?: string;       // Use this for control!
    shuffle_state?: boolean;
    repeat_state?: "off"|"track"|"context";
    progress_ms?: number;
    context_uri?: string|null;
  };
  current_track?: { type, id, uri, name, artists, album, duration_ms } | null;
  devices?: Array;
  queue?: { current_id?: string; next_ids: string[] };
}

spotify_control

通过批处理操作控制播放。

输入:

{
  operations: Array;
  parallel?: boolean;         // Run concurrently (default: sequential)
}

输出:

{
  _msg: string;
  results: Array;
  summary: { ok: number; failed: number };
}

spotify_playlist

管理播放列表。

输入:

// List user playlists
{ action: "list_user"; limit?: number; offset?: number }

// Get playlist details
{ action: "get"; playlist_id: string }

// Get playlist tracks (includes position for play offset)
{ action: "items"; playlist_id: string; limit?: number; offset?: number }

// Create playlist
{ action: "create"; name?: string; description?: string; public?: boolean }

// Update details
{ action: "update_details"; playlist_id: string; name?: string; description?: string }

// Add tracks
{ action: "add_items"; playlist_id: string; uris: string[] }

// Remove tracks
{ action: "remove_items"; playlist_id: string; tracks: { uri: string }[] }

// Reorder tracks
{ action: "reorder_items"; playlist_id: string; range_start: number; insert_before: number }

spotify_library

管理已保存的曲目。

输入:

// List saved tracks
{ action: "tracks_get"; limit?: number; offset?: number }

// Save tracks (use track IDs, not URIs)
{ action: "tracks_add"; ids: string[] }

// Remove saved tracks
{ action: "tracks_remove"; ids: string[] }

// Check if saved
{ action: "tracks_contains"; ids: string[] }

示例会话

显示所有工具协同工作的完整演练。

1.“在玩什么?”

工具: player_status

{ "include": ["player", "devices", "current_track"] }

答复:

'Come With Me - Radio Mix' is playing on 'MacBook Pro' (device_id: "8fc48c51d766...").

Available devices (use device_id for control):
• MacBook Pro (Computer) [ACTIVE] → device_id: "8fc48c51d766..."

2.“播放受此播放列表保护”

首先,获取播放列表项以查找曲目位置:

工具: spotify_playlist

{ "action": "items", "playlist_id": "2mMPIccnFiOd2xgkO0iABm", "limit": 50 }

答复:

Loaded 50 items from 'Nora' (context: spotify:playlist:2mMPIccnFiOd2xgkO0iABm).
- #0 Come with Me - Radio Mix — spotify:track:2FxwTax2LGVybNIrreiwXv
- #7 Protected — spotify:track:1cRRIRrUiPnLOvsnWNhoH9
… and more

然后在位置#7打球:

工具: spotify_control

{
  "operations": [{
    "action": "play",
    "context_uri": "spotify:playlist:2mMPIccnFiOd2xgkO0iABm",
    "offset": { "position": 7 }
  }]
}

答复:

Successful: play. Status: Now playing on 'MacBook Pro'. Current track: 'Protected'.

3.“将此添加到我的收藏夹”

工具: spotify_library

{ "action": "tracks_add", "ids": ["1cRRIRrUiPnLOvsnWNhoH9"] }

答复:

Saved 1 track:
- Protected — spotify:track:1cRRIRrUiPnLOvsnWNhoH9

4.“将音量调到100%”

工具: spotify_control

{
  "operations": [{ "action": "volume", "volume_percent": 100 }]
}

答复:

Successful: volume. Status: Now playing on 'MacBook Pro'. Current track: 'Protected'. Volume: 100%

HTTP端点

  • POST /mcp --MCP JSON-RPC 2.0端点
  • GET /mcp --SSE流(仅限Node.js)
  • GET /health --健康检查
  • GET /.well-known/oauth-authorization-server --OAuth AS元数据
  • GET /.well-known/oauth-protected-resource --OAuth RS元数据

OAuth(端口+1):

  • GET /authorize --启动OAuth流
  • GET /oauth/callback --提供商回调
  • POST /token --代币兑换
  • POST /revoke --撤销代币

客户端配置(克劳德桌面)

{
  "mcpServers": {
    "spotify": {
      "command": "bunx",
      "args": ["mcp-remote", "http://127.0.0.1:3000/mcp", "--transport", "http-only"],
      "env": { "NO_PROXY": "127.0.0.1,localhost" }
    }
  }
}

Cloudflare员工

设置

  1. 创建KV命名空间:
wrangler kv:namespace create TOKENS
  1. 更新 wrangler.toml:
[[kv_namespaces]]
binding = "TOKENS"
id = "your-kv-id"

[vars]
AUTH_ENABLED = "true"
OAUTH_SCOPES = "playlist-read-private user-read-playback-state user-modify-playback-state user-library-read user-library-modify"
  1. 设置秘密:
wrangler secret put SPOTIFY_CLIENT_ID
wrangler secret put SPOTIFY_CLIENT_SECRET

# Generate encryption key (32-byte base64url):
openssl rand -base64 32 | tr -d '=' | tr '+/' '-_'
# Copy the output, then:
wrangler secret put TOKENS_ENC_KEY
# Paste the generated key when prompted
注: TOKENS_ENC_KEY 加密存储在KV中的OAuth令牌(AES-256-GCM)。如果没有它,令牌将以明文存储(不建议用于生产)。
  1. 部署:
wrangler deploy

发展

bun dev           # Start with hot reload
bun run typecheck # TypeScript check
bun run lint      # Lint code
bun run build     # Production build
bun start         # Run production

建筑

src/
├── shared/
│   ├── tools/           # Tool definitions (work in Node + Workers)
│   │   ├── player-status.ts
│   │   ├── search-catalog.ts
│   │   ├── spotify-control.ts
│   │   ├── spotify-playlist.ts
│   │   └── spotify-library.ts
│   ├── oauth/           # OAuth flow (PKCE, discovery)
│   └── storage/         # Token storage (file, KV, memory)
├── services/
│   └── spotify/         # Spotify API clients
│       ├── sdk.ts       # SpotifyApi wrapper
│       ├── player.ts    # Player API
│       ├── catalog.ts   # Search API
│       └── oauth.ts     # Token refresh
├── schemas/
│   ├── inputs.ts        # Zod input schemas
│   └── outputs.ts       # Zod output schemas
├── config/
│   └── metadata.ts      # Server & tool descriptions
├── index.ts             # Node.js entry
└── worker.ts            # Workers entry

故障排除

问题解决方案
“找不到设备”您使用的是设备名称而不是Device_id。请从以下位置获取实际id player_status → devices[].id
“无活动设备”在设备上打开Spotify,然后使用 player_status 列出设备
“未经授权”完成OAuth流程。令牌可能已过期。
“速率受限”请稍候,然后重试

许可证

麻省理工学院

工具与能力

工具数量

0

资源数量

0

提示词数量

0

能力标签

音乐控制TypeScript本地部署播放列表管理SpotifyAPIHTTP服务器OAuth2.1

支持客户端

Claude DesktopClaude

数量来自来源目录的标注,具体工具清单以官方文档为准。

典型使用场景

语音转文字

把会议录音转成文字,再整理要点。

文字转语音

把文案转成配音,调整语速和音色。

视频素材处理

提取字幕、剪出片段、生成封面。

选择建议

值得选的地方

  • 只提供 0 个工具,职责集中,接入后不容易误操作。
  • 已经适配 Claude Desktop、Claude,换客户端不用重新研究配置。
  • 公开说明写得比较完整,接入前能看清能力边界。

先想清楚的地方

  • 公开资料没有可直接复制的安装命令,第一次接入要自己找入口。
  • 需要自备OAuth 授权,没有凭据没法直接试。
  • 公开摘要偏短,具体能力和限制要回到仓库确认。

更适合

  • 需要在音视频场景里让模型直接调用外部能力的人。
  • 已经在用 Claude Desktop 的用户,接入路径最短。
  • 愿意照着官方文档一步步配环境的人。

不太适合

  • 暂时拿不到OAuth 授权的人。
  • 希望一条命令就装好、不想看文档的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

5 个同类
MCP Server工具数传输方式安装命令收录来源最后核验
Spotify Streamable MCP Server

MCP World · 本页

0未说明未标注2 个2026-05-17
Youtube E0eb3510

MCP World

0stdio有1 个2026-05-17
Ableton MCP B7b69a6a

MCP World

16stdio有2 个2026-05-17
Voicemode MCP

MCP World

0stdio有3 个2026-05-17
Short Video Maker MCP

MCP World

0stdio有3 个2026-05-17

按同分类和工具数量挑出最接近的几条,字段以各自详情页为准。

常见问题

5 条

Spotify Streamable MCP Server 怎么安装?

公开目录没有给出可以直接复制的安装命令,需要按仓库 README里的步骤安装;装好后写进客户端的 MCP 配置再重启。

Spotify Streamable MCP Server 怎么在 Claude Desktop、Cursor 里配置?

它是传输方式未标注,客户端配置里要写启动命令和参数,运行环境是 未标注;保存后完全退出客户端再打开,配置才会生效。

Spotify Streamable MCP Server 收费吗?

本站只整理公开资料,不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Spotify Streamable MCP Server 需要 API Key 吗?

公开资料标注的认证方式是OAuth 授权,也就是要先拿到凭据才能连上;凭据只填在自己本地的配置里,不要写进公开仓库。

Spotify Streamable MCP Server 支持哪些客户端?

公开资料标注支持 Claude Desktop、Claude;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

来源信息

继续浏览同类 MCP