Spotify

io.github.markswendsen-code由 GitHub 帳號 markswendsen-code 發布v0.1.0更新於 Oct 24, 2026

MCP server for Spotify - let AI agents control playback, search music, and manage playlists

已驗證STDIO僅桌面效率與工作流媒體與設計

概覽

AI 產生的概覽

一個本機 MCP 伺服器,讓 AI 助理搜尋 Spotify、管理播放清單,並在 Spotify Connect 裝置上控制播放。

可以做什麼
在 Spotify 搜尋歌曲、藝人、專輯與播放清單,並查看目前播放的內容、進度與裝置。控制播放:播放、暫停、下一首、上一首以及調整音量。列出 Spotify Connect 裝置並在裝置間切換播放。查看自己的播放清單、建立新清單、加入或移除曲目。檢查連線狀態、透過瀏覽器授權以及登出。
適用情境
適合想用對話讓助理找音樂、建立或編輯播放清單,或直接控制自己 Spotify 帳號播放的情況,不必開啟 Spotify 應用程式。
執行需求
透過 npx 或全域 npm 安裝後在本機執行,需要 Node.js 18 以上版本。需要 Spotify 帳號(免費或 Premium;音量與播放控制需要 Premium),並以環境變數 SPOTIFY_CLIENT_ID 提供 Spotify 應用程式的 Client ID。首次使用需在瀏覽器完成 OAuth 授權,重新導向位址設為 localhost:8888/callback。
安裝前請注意
助理可以變更你的帳號:建立與編輯播放清單,並在你的裝置上開始、停止、跳過曲目與調整音量。授權會開啟瀏覽器,並將權杖儲存在本機磁碟並自動更新;登出工具可清除權杖。播放控制需要 Spotify Premium。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Spotify,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

@striderlabs/mcp-spotify

MCP server for Spotify — let AI agents search music, control playback, and manage playlists via the Spotify Web API.

Built by Strider Labs.

Features

  • Search — Find tracks, artists, albums, and playlists
  • Playlists — View, create, and edit your playlists
  • Playback Control — Play, pause, skip, go back, set volume
  • Multi-device — List and switch between Spotify Connect devices
  • OAuth 2.0 — Secure authorization with PKCE (no client secret needed)
  • Token persistence — Tokens stored locally, auto-refreshed

Setup

1. Create a Spotify App

  1. Go to the Spotify Developer Dashboard
  2. Click Create App
  3. Set Redirect URI to: http://localhost:8888/callback
  4. Copy your Client ID

2. Install

bash
npx @striderlabs/mcp-spotify

Or install globally:

bash
npm install -g @striderlabs/mcp-spotify

3. Configure Claude Desktop

Add to your claude_desktop_config.json:

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

4. Authenticate

In Claude, call the auth tool once:

spotify_auth

A browser window will open for you to authorize access. After approving, tokens are saved locally at ~/.striderlabs/spotify/tokens.json and auto-refreshed.

Environment Variables

VariableRequiredDescription
SPOTIFY_CLIENT_IDYesYour Spotify app's Client ID

Tools

Authentication

ToolDescription
spotify_statusCheck connection status and logged-in account
spotify_authAuthorize via browser (OAuth 2.0 PKCE)
spotify_logoutClear stored tokens

Search

ToolParametersDescription
search_tracksquery, limit?Search for songs
search_artistsquery, limit?Search for artists
search_albumsquery, limit?Search for albums
search_playlistsquery, limit?Search for playlists

Playlists

ToolParametersDescription
get_playlistslimit?Get your playlists
create_playlistname, description?, public?Create a new playlist
add_to_playlistplaylistId, uris[], position?Add tracks
remove_from_playlistplaylistId, uris[]Remove tracks

Playback

ToolParametersDescription
get_currently_playing—Current track, progress, device
playdeviceId?, contextUri?, uris?[], offsetPosition?, positionMs?Start/resume playback
pausedeviceId?Pause playback
next_trackdeviceId?Skip to next track
previous_trackdeviceId?Go to previous track
set_volumevolumePercent, deviceId?Set volume (0–100)
get_devices—List Spotify Connect devices
transfer_playbackdeviceId, play?Switch playback device

Example Workflow

1. spotify_status            → check if authenticated2. spotify_auth              → open browser to authorize (first time)3. search_tracks query="Bohemian Rhapsody"4. get_devices               → list available devices5. play uris=["spotify:track:..."] deviceId="..."6. get_currently_playing     → see what's playing7. set_volume volumePercent=708. next_track                → skip to next9. get_playlists             → see your playlists10. create_playlist name="AI Picks"11. add_to_playlist playlistId="..." uris=["spotify:track:..."]

Requirements

  • Node.js 18+
  • Spotify account (Free or Premium)
  • Spotify Premium required for: volume control, playback control

Technical Details

  • Protocol: Model Context Protocol (MCP) over stdio
  • Auth: OAuth 2.0 Authorization Code with PKCE
  • API: Spotify Web API v1
  • Token storage: ~/.striderlabs/spotify/tokens.json
  • Browser automation: Playwright (for OAuth browser launch)

License

MIT — Strider Labs

來源:README.md,提交 7974597

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.0最新Sep 16, 2026

評分

已滿足適用檢查項的 40%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。