MCP server for the Spotify Web API — gives Claude and other AI assistants tools to search music, control playback, manage playlists, library, and podcasts.
概览
A Model Context Protocol (MCP) server that provides tools for interacting with the Spotify Web API. Enables AI assistants like Claude to search music, control playback, manage playlists, and more. - - Find tracks, albums, artists, playlists, shows, episodes, and audiobooks - - Play, pause, skip, seek, volume, shuffle, repeat, queue management - - Create, update, add/remove/reorder tracks (auto-chunks large batches) - - View and manage saved tracks, albums, shows, episodes, and audiobooks - - Get details on tracks, albums, artists, episodes, and chapters - - Browse shows, episodes, audiobooks, and chapters - - List followed artists; follow/unfollow artists, users, and playlists through the library tools by URI - - View profile, top artists/tracks, diagnostic whoami - - Subscribable snapshots of profile, playback, queue, top items - - Pre-baked workflows for playlist building, listening summaries, library cleanup - - stdio (default), sse, and streamable-http - Uses only non-deprecated...
README
以下为原文 README 节选,完整内容请查看原文。
Spotify MCP Server
A Model Context Protocol (MCP) server that provides tools for interacting with the Spotify Web API. Enables AI assistants like Claude to search music, control playback, manage playlists, and more.
Features
- Search - Find tracks, albums, artists, playlists, shows, episodes, and audiobooks
- Playback Control - Play, pause, skip, seek, volume, shuffle, repeat, queue management
- Playlists - Create, update, add/remove/reorder tracks (auto-chunks large batches)
- Library - View and manage saved tracks, albums, shows, episodes, and audiobooks
- Browse - Get details on tracks, albums, artists, episodes, and chapters
- Podcasts & Audiobooks - Browse shows, episodes, audiobooks, and chapters
- Follow - List followed artists; follow/unfollow artists, users, and playlists through the library tools by URI
- User Profile - View profile, top artists/tracks, diagnostic
whoami - Resources - Subscribable snapshots of profile, playback, queue, top items
- Prompts - Pre-baked workflows for playlist building, listening summaries, library cleanup
- Transports -
stdio(default),sse, andstreamable-http - Uses only non-deprecated Spotify Web API endpoints
Example interactions
- “What am I listening to right now?”
- “Play some Radiohead on my living room speaker.”
- “Skip this track and turn the volume down to 30.”
- “Build me a playlist of 25 chill tracks based on what I’ve been listening to this week.”
- “Add the last three songs I played to my ‘Focus’ playlist.”
- “Show me my top artists from the last six months.”
- “Search for live albums by Nils Frahm and save the best one to my library.”
- “Unfollow every playlist I haven’t opened that wasn’t made by me.”
- “Queue up the next episode of the show I was listening to yesterday.”
Prerequisites
- uv — install with
curl -LsSf https://astral.sh/uv/install.sh | sh - A Spotify Developer account
- A Spotify app with Client ID and Client Secret
Getting Your Spotify Credentials
- Go to the Spotify Developer Dashboard
- Click Create App
- Fill in the app details:
- App name: Choose any name (e.g., “My MCP Server”)
- App description: Optional
- Redirect URI:
http://127.0.0.1:8888/callback - Which API/SDKs are you planning to use?: Select Web API
- Click Save
- On your app’s page, find your Client ID
- Click Show client secret to reveal your Client Secret
Important: The redirect URI must exactly match
http://127.0.0.1:8888/callback(or whatever you set inSPOTIFY_REDIRECT_URI). Do not uselocalhost— use127.0.0.1.
Installation
安装
uvx mcp-server-spotify配置
{
"mcpServers": {
"spotify": {
"command": "uvx",
"args": ["mcp-server-spotify"],
"env": {
"SPOTIFY_CLIENT_ID": "your_client_id",
"SPOTIFY_CLIENT_SECRET": "your_client_secret"
}
}
}
}