home / mcp / spotify mcp server

Spotify MCP Server

MCP to connect Claude with Spotify.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "g2dgaming-spotify-mcp": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/spotify_mcp",
        "run",
        "spotify-mcp"
      ],
      "env": {
        "SPOTIFY_CLIENT_ID": "YOUR_CLIENT_ID",
        "SPOTIFY_REDIRECT_URI": "http://127.0.0.1:8080/callback",
        "SPOTIFY_CLIENT_SECRET": "YOUR_CLIENT_SECRET"
      }
    }
  }
}

You can control Spotify from Claude using the Spotify MCP Server. This server lets you start, pause, skip tracks, search the catalog, view track info, manage the queue, and create or update playlists directly from your conversations with Claude.

How to use

Once your Spotify MCP Server is running, you can issue commands through your MCP client to control playback, search for music, and manage playlists. Typical actions include starting and pausing playback, skipping tracks, searching for tracks, albums, artists, or playlists, retrieving information about items, and organizing your Spotify queue and playlists. Use clear, natural language requests like “play the next track,” “shuffle my playlist,” or “add this track to my playlist.” You can also query details about a track, album, artist, or playlist to learn more before you decide what to play.

How to install

Prerequisites: you need a runtime environment that can run MCP servers and access to Spotify’s developer API. Install the MCP runtime tooling if you do not already have it.

1) Clone the project locally to get the Spotify MCP server implementation.

2) Prepare a Spotify developer account and obtain API keys. You will need a client ID, client secret, and a redirect URI that matches http://127.0.0.1:8080/callback (or another loopback address and port you choose). You will use these credentials to configure the MCP server.

3) Configure the MCP run command in your Claude desktop configuration. Use the following JSON snippet as a starting point and replace the path with your actual location.

Configuration and running locally

"spotify": {
  "command": "uv",
  "args": [
    "--directory",
    "/path/to/spotify_mcp",
    "run",
    "spotify-mcp"
  ],
  "env": {
    "SPOTIFY_CLIENT_ID": YOUR_CLIENT_ID,
    "SPOTIFY_CLIENT_SECRET": YOUR_CLIENT_SECRET,
    "SPOTIFY_REDIRECT_URI": "http://127.0.0.1:8080/callback"
  }
}

Troubleshooting and notes

If you run into issues, try restarting your MCP environment (for example, Claude Desktop) a couple of times. Ensure your UVX runtime is up to date (version 0.54 or newer is recommended). Make sure Claude has the necessary execution permissions for the project (for example, run chmod -R 755 on the project directory). A Spotify Premium account is required for the Spotify API to function.

Logs are emitted to standard error as described by the MCP runtime. On macOS, Claude Desktop should display logs in the user logs directory, for example ~/Library/Logs/Claude. On other platforms, check the corresponding logs location for your environment.

Deployment and building

You can build and publish updates to your MCP server using the standard MCP tooling. The typical flow is to sync dependencies, build distributions, and publish to your package index.

Security considerations

Keep your Spotify API credentials secure. Do not commit your client secret in plain text or expose it in logs. Use environment variables to inject sensitive data at runtime.

Tools and capabilities

This MCP server exposes capabilities to manage playback and browse Spotify content. You can start, pause, and skip playback, search for tracks, albums, artists, and playlists, retrieve detailed information about items, manage the Spotify queue, and create or update playlists.

Available tools

playback_start

Start playback for the current queue or a specified track.

playback_pause

Pause the current playback.

playback_skip

Skip to the next track in the queue.

search_tracks

Search for tracks, albums, artists, or playlists by query.

get_info

Retrieve detailed information about a track, album, artist, or playlist.

manage_queue

Add, remove, or reorder items in the Spotify playback queue.

manage_playlists

Create, update, or modify playlists in your Spotify account.