SuperAPIAI Directory

mcp-spotify-player

github.com · AI developer platforms

mcp-spotify-player is an open-source server based on the Model Context Protocol (MCP) that lets AI assistants (such as Claude, Cursor, Void, IntelliJ, etc.) control Spotify through natural language. It provides playback control, queue management, volume adjustment, search and discovery, device switching, and playlist management, and uses an OAuth PKCE automatic authentication flow. The project is implemented in Python and communicates with MCP clients via stdio, making it suitable for users who want to operate Spotify directly with an AI assistant.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)

About this tool

mcp-spotify-player is an open-source MCP server designed to integrate Spotify control capabilities into AI assistants that support the Model Context Protocol. Through natural language commands, users can have the AI assistant perform actions such as playing, pausing, skipping tracks, adjusting volume, searching for music, and managing playlists.

Main capabilities include:

  • Playback control: play/pause, previous/next track, set repeat mode, adjust volume (0-100).
  • Queue management: add tracks to the queue, view the upcoming queue.
  • Search and discovery: search for tracks, artists, albums, and playlists, with pagination and market specification support.
  • Device management: list available devices, support multi-device synchronization and remote playback control.
  • Playlist management: get user playlists, create playlists (private by default), rename, clear, add tracks, view playlist tracks.
  • Status queries: get information about the currently playing track and the full playback state (including device, volume, shuffle/repeat status).

Usage:

  1. Prepare a Spotify Premium account, create an app in the Spotify Developer Dashboard, obtain CLIENT_ID and CLIENT_SECRET, and set the redirect URI to http://127.0.0.1:8000/auth/callback。
  2. Clone the repository and configure environment variables (the .env file); dependencies are managed via pyproject.toml.
  3. Configure the server command, arguments, working directory, and environment variables in an MCP client (such as Claude Desktop, PyCharm/IntelliJ's GitHub Copilot).
  4. Authenticate via /auth through the MCP client, after which commands such as /play_music and /pause_music can be used.

Use cases: users who want to control Spotify playback, manage playlists, and search for music through an AI assistant using natural language.

Limitations: a Spotify Premium account is required for remote playback control; you need to create your own Spotify app and configure credentials; the MCP server runs as a stdio process, so the browser callback must be on the same host as the server or the redirect URI must be reachable; tokens are stored by default at ~/.config/mcp_spotify_player/tokens.json and can be changed via MCP_SPOTIFY_TOKENS_PATH. The project uses the MIT license.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools