home / mcp / spotify mcp server

Spotify MCP Server

Enables MCP-based control of Spotify playback, playlists, queue, and search from MCP clients.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "ashwanth1109-mcp-spotify": {
      "command": "uv",
      "args": [
        "--directory",
        "<path-to-repository/mcp-spotify>",
        "run",
        "main.py"
      ]
    }
  }
}

You can control Spotify through a dedicated MCP (Multi-Channel Platform) server that lets you manage playback, playlists, queue, and search from your MCP client. This tool integrates Spotify playback with Cursor Composer and similar MCP clients, enabling hands-free, scriptable control over your Spotify account from your preferred interface.

How to use

Install and run the Spotify MCP server, then connect your MCP client to control Spotify from any supported interface. Use it to browse your playlists, start playback on a chosen playlist or track, pause and resume playback, view the current track and playback state, manage your queue, seek to specific positions, and get recommendations based on the current track.

How to install

Prerequisites: you need a running Spotify account, access to the Spotify Developer Dashboard to create an app, and the ability to run a local MCP server using the UV runner.

Step 1: Prepare credentials. Create a Spotify app in the Spotify Developer Dashboard and obtain your client credentials. Place them in a .env file at the root of the project, following the formatting of the example you copied from the environment file.

Step 2: Start the MCP server. Use the provided command to run the Spotify MCP server locally via the MCP runner. Run this exactly as shown (adjust the path to where you keep your MCP Spotify code):

uv --directory <path-to-repository/mcp-spotify> run main.py

Additional sections

Configuration and startup details are provided here so you can reproduce a working setup quickly. You should see the Spotify MCP tool become available for your Cursor Composer or other MCP clients once the server starts.

Environment variables you need to supply come from your Spotify app credentials. Store them in a .env file at the repository root. The exact variable names should match what your Spotify integration expects in your local setup.

Example usage patterns you can perform from your MCP client include shows such as listing your playlists, starting playback of a specific playlist, pausing and resuming, checking the currently playing track, viewing and manipulating your queue, seeking to a position within the current track, and requesting recommendations based on the current track.

If you want more features to be supported, feel free to raise an issue to request enhancements.

Tools you can expect to interact with through the MCP client include playback controls, queue management, playlist operations, search and discovery, and playback state display.

Config example

{
  "mcpServers": {
    "spotify": {
      "type": "stdio",
      "name": "spotify",
      "command": "uv",
      "args": ["--directory", "<path-to-repository/mcp-spotify>", "run", "main.py"]
    }
  }
}

Available tools

playback_control

Control playback actions such as play, pause, resume, skip, and seek to a specific position within the current track.

playlist_management

Browse, select, and play playlists; add or remove tracks from playlists.

queue_management

View current queue, add tracks to the queue, and reorder or move tracks within the queue.

search_discovery

Search for artists, albums, and tracks; show top results and play selected items.

state_view

View detailed playback state including current track, artist, album, and playback status.

recommendations

Offer similar tracks or artist-based recommendations based on the currently playing track.