
Spotify
io.github.jamiew由 GitHub 帳號 jamiew 發布v0.9.2更新於 Nov 7, 2026
MCP server connecting LLMs to Spotify, with smart-batching and large-playlist tools
概覽
本機 MCP 伺服器,讓助手在你的 Spotify 帳號上搜尋音樂、控制播放,並管理播放清單、喜歡的歌曲與收藏內容。
- 可以做什麼
- 搜尋與讀取目錄內容:曲目、專輯、藝人、播放清單、播客節目、單集、有聲書、熱門項目與最近播放
- 控制播放:播放、暫停、跳過、定位、音量、隨機、循環、佇列,以及在 Spotify Connect 裝置間切換
- 管理播放清單:列出、讀取曲目、建立、改名、調整可見性、加入、移除、重新排序、追蹤與取消追蹤
- 管理媒體庫:儲存、移除與檢查喜歡的歌曲、專輯、藝人、節目、單集與有聲書
- 讀取個人檔案與目前播放狀態
- 適用情境
- 適合想讓助手直接操作自己 Spotify 帳號的情境:找音樂、建立或整理播放清單、維護喜歡的歌曲,或在聊天用戶端中控制指定裝置的播放。
- 執行需求
- 透過 uvx 以 stdio 在本機執行(需 Python 3.12+ 與 uv)。需要一個 Spotify 開發者應用程式,並註冊重新導向 URI SPOTIFY_CLIENT_ID、SPOTIFY_CLIENT_SECRET 與 SPOTIFY_REDIRECT_URI。首次使用會開啟瀏覽器完成 OAuth 授權;播放需要 Spotify Premium 與可用的 Spotify Connect 裝置。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Spotify,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
[Spotify MCP, Python local server]
spotify-mcp
mcp-name: io.github.jamiew/spotify-mcp
A local Python MCP server for searching Spotify, controlling playback, and managing playlists and Liked Songs from your MCP client. Runs over stdio with your Spotify account. This is a supported fork of varunneal/spotify-mcp.
The TypeScript edition supports local and hosted use, with a different MCP surface.
Setup
Requires Python 3.12+, uv, and Spotify Premium for playback.
- Create an app in the Spotify developer dashboard.
- Register
http://127.0.0.1:8888as its redirect URI, exactly as written. - Copy the app's Client ID and Client Secret into your MCP client's configuration:
Restart the client. On first use, a browser opens for Spotify authorization; the token is cached locally. Keep the client secret and token cache private. Playback needs an available Spotify Connect device, so open Spotify on the device you want to control.
Client-specific setup: Claude Desktop, Claude Code, and Codex. Use the same command and environment variables in each client's format.
Run from source
The package command above uses the published package, which may lag this README's source changes. To run the current checkout:
In the config above, change command to uv and args to
["--directory", "/absolute/path/to/spotify-mcp", "run", "spotify-mcp"].
Keep the same environment variables. Without cloning, use
uvx --from git+https://github.com/jamiew/spotify-mcp.git spotify-mcp.
Reauthorization: artist-follow checks need user-follow-read, and following or
unfollowing artists and playlists needs user-follow-modify. Existing grants do not
receive new scopes automatically. Restart and complete Spotify authorization when prompted;
if access is still denied, review the app's grant in your Spotify account and reauthorize.
Do not automatically delete the auth cache.
Features
48 tools, six resources (user, playback, track, playlist, artist, album), and five prompts. Tools provide typed outputs and behavior annotations; large playlist reads report progress. Playlist removal asks for confirmation where supported, reordering uses snapshot guards, and playback control attempts best-effort read-after-write confirmation, not guaranteed success.
Tools
Behavior to know
- New playlists default to private. Existing playlists are unchanged. Spotify can report unexpected visibility, so confirm sensitive playlists in the Spotify app.
- Library writes (tracks, artists, shows, episodes, audiobooks) and membership checks accept 50 items, sent upstream in batches of 40. Album saves, removals and checks accept 20. Membership results preserve input alignment; incomplete chunks fail. Writes are not atomic across chunks: earlier changes may remain after an error. Check membership before retrying.
- Restricted apps cap search pages at 10. Advance by the returned
offset + limit, not the requested size. Individual-track fallback can make up to 50 Spotify requests. - Playlist pagination counts positions, including unresolved rows and local files with
id: null. Local files also setis_local; positions remain valid for reordering.
Spotify access and policy
- Permissions and app access mode determine available endpoints and playlist access. A 403 may mean missing permission, not a retired endpoint. Existing integrations' February restrictions were postponed; restricted apps use the February 2026 API routes.
- Development Mode normally allows five allowlisted users and requires a Premium app owner; older larger allowlists may be grandfathered. Extended access is not routine hobby-project approval: criteria include an organization, a legal entity, a launched service, and 250,000 monthly active users. A public URL does not remove these limits.
- All Development Mode apps on a developer account share one quota, even with the
25 permitted Client IDs.
This server surfaces 429 errors without retries, including
QUOTA_EXCEEDEDand ordinary rate limits withRetry-Afterwhen provided. No guaranteed quota reset time is specified. - This server uses one local identity. Do not share its token cache or expose it as an unauthenticated public service. Other users should self-host and authorize their own accounts.
- AI policy is a separate constraint. Spotify Developer Policy III.14 restricts training or otherwise ingesting Spotify Content into AI/ML models; "no training" or "metadata only" is not automatic clearance. III.13 restricts analysis and derived metrics; III.3 restricts voice-control assistants. Seek Spotify clarification or approval before public AI access. This is a risk notice, not legal advice or permission.
Moving between implementations
Shared versions and tool names do not imply drop-in compatibility with other implementations. Check arguments, limits, and result shapes before switching. Preserve any workflow that relies on this server's resources, five prompts, snapshot guards, removal confirmation, or playback confirmation; those behaviors are not universal.
Credits
MIT license, copyright 2025 Varun Neal Srivastava. Thanks to @varunneal for the original project, @jamiew, @jonico, @tedeuxx, and @karimStekelenburg.
Banner made with Glif.
來源:README.md,提交 c544333
工具
0版本歷史
6- v0.9.2最新Nov 7, 2026
- v0.8.1Nov 3, 2026
- v0.7.0Sep 20, 2026
- v0.6.1Sep 18, 2026
- v0.6.0Sep 17, 2026
- v0.4.1Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分