Spotify Player

v1.0.0Communicationstable

– Control Spotify playback, queue, volume and playlists from Claude/Cursor via MCP. (Python)

claudeclaude-desktopcursormcpmcp-server
Share:
19
Stars
0
Downloads
0
Weekly
0/5

What is Spotify Player?

Spotify Player is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to – control spotify playback, queue, volume and playlists from claude/cursor via mcp. (python)

– Control Spotify playback, queue, volume and playlists from Claude/Cursor via MCP. (Python)

This server falls under the Communication category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • – Control Spotify playback, queue, volume and playlists from

Use Cases

Control Spotify playback, volume, and queue from Claude or Cursor. Manage playlists and search for music programmatically.
vsaez

Maintainer

LicenseMIT
Languagepython
Versionv1.0.0
UpdatedApr 17, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx mcp-spotify-player

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Spotify Player

MCP Spotify Player is a Python MCP server that lets AI assistants like Claude and Cursor control Spotify playback, manage queues, adjust volume, browse playlists, search for tracks and artists, and switch between playback devices using natural language commands. It uses the Spotify Web API with a standard OAuth 2.0 flow, requiring a Spotify Developer application for credentials. The server runs locally via stdio and stores OAuth tokens on disk, so subsequent sessions authenticate automatically without requiring the browser flow again. A Spotify Premium account is recommended for full playback control, as the Spotify API restricts playback commands for free-tier users.

Prerequisites

  • Python 3.10 or higher
  • A Spotify account (Premium recommended for full playback control)
  • A Spotify Developer application with CLIENT_ID and CLIENT_SECRET (create at developer.spotify.com/dashboard)
  • The redirect URI http://127.0.0.1:8000/auth/callback added to your Spotify app settings
  • An MCP client such as Claude Desktop or Cursor
1

Create a Spotify Developer Application

Go to developer.spotify.com/dashboard, log in, and create a new application. Copy the Client ID and Client Secret. In the app's settings, add 'http://127.0.0.1:8000/auth/callback' as a Redirect URI and save.

2

Clone the repository and install

Clone the mcp-spotify-player repository and install it with pip. Dependencies are managed via pyproject.toml.

git clone https://github.com/vsaez/mcp-spotify-player.git
cd mcp-spotify-player
pip install .
3

Create the .env file with your Spotify credentials

Copy the example env file and fill in your Spotify Client ID, Client Secret, and the redirect URI. Optionally set MCP_SPOTIFY_TOKENS_PATH to a custom path for token storage.

cp env.example .env
# Edit .env with your credentials:
# SPOTIFY_CLIENT_ID=your_client_id_here
# SPOTIFY_CLIENT_SECRET=your_client_secret_here
# SPOTIFY_REDIRECT_URI=http://127.0.0.1:8000/auth/callback
4

Run the OAuth authorization flow

Start the server once manually to complete the OAuth flow. A browser window will open asking you to log in to Spotify and authorize the app. Tokens are saved to ~/.config/mcp_spotify_player/tokens.json for future use.

python -m mcp_spotify_player
5

Configure your MCP client

Add the Spotify MCP server to your claude_desktop_config.json. Point the command at your Python executable and set the working directory to the cloned repo.

{
  "mcpServers": {
    "spotify-player": {
      "command": "/usr/bin/python3",
      "args": ["-m", "mcp_spotify_player"],
      "cwd": "/path/to/cloned/mcp-spotify-player",
      "env": {
        "SPOTIFY_CLIENT_ID": "your_client_id_here",
        "SPOTIFY_CLIENT_SECRET": "your_client_secret_here",
        "SPOTIFY_REDIRECT_URI": "http://127.0.0.1:8000/auth/callback"
      }
    }
  }
}

Spotify Player Examples

Client configuration

Claude Desktop configuration for mcp-spotify-player using the installed Python module with credentials in the env block.

{
  "mcpServers": {
    "spotify-player": {
      "command": "python3",
      "args": ["-m", "mcp_spotify_player"],
      "cwd": "/path/to/mcp-spotify-player",
      "env": {
        "SPOTIFY_CLIENT_ID": "your_client_id_here",
        "SPOTIFY_CLIENT_SECRET": "your_client_secret_here",
        "SPOTIFY_REDIRECT_URI": "http://127.0.0.1:8000/auth/callback"
      }
    }
  }
}

Prompts to try

Example prompts for controlling Spotify playback, searching for music, and managing playlists.

- "Play some relaxing jazz music on Spotify"
- "Skip to the next track"
- "Set the volume to 50%"
- "Search for albums by Radiohead and queue the album 'OK Computer'"
- "Show me what's currently playing and list the next 5 tracks in the queue"
- "Create a new playlist called 'Focus Music' and add the top 10 lo-fi tracks to it"

Troubleshooting Spotify Player

OAuth authorization flow fails or browser does not open

Ensure port 8000 is available and not blocked by a firewall. The redirect URI in your .env must exactly match what is registered in the Spotify Developer Dashboard (http://127.0.0.1:8000/auth/callback). If the browser does not open automatically, copy the printed URL and open it manually.

Playback commands fail with 'Premium required' or 403 error

Most Spotify Web API playback control endpoints (play, pause, skip, volume) require a Spotify Premium subscription. Free-tier accounts can use search and playlist browsing but cannot control playback remotely. Upgrade to Premium or check the Spotify API documentation for which endpoints are available on free tier.

Tokens expired and re-authentication is required

Delete the token file at ~/.config/mcp_spotify_player/tokens.json (or your custom MCP_SPOTIFY_TOKENS_PATH), then run 'python -m mcp_spotify_player' directly to complete the OAuth flow again. The server will automatically refresh tokens during normal operation as long as the refresh token is valid.

Frequently Asked Questions about Spotify Player

What is Spotify Player?

Spotify Player is a Model Context Protocol (MCP) server that – control spotify playback, queue, volume and playlists from claude/cursor via mcp. (python) It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Spotify Player?

Follow the installation instructions on the Spotify Player GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Spotify Player?

Spotify Player works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Spotify Player free to use?

Yes, Spotify Player is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Communication MCP Servers

Explore all communication servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "mcp-spotify-player": { "command": "npx", "args": ["-y", "mcp-spotify-player"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Spotify Player?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides