home / mcp / spotify mcp server

Spotify MCP Server

MCP to connect your LLM with Spotify.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "varunneal-spotify-mcp": {
      "command": "uvx",
      "args": [
        "--python",
        "3.12",
        "--from",
        "git+https://github.com/varunneal/spotify-mcp",
        "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 run a dedicated MCP server to control Spotify from your Claude-assisted workflow. This server lets you start, pause, skip, search, and manage Spotify playback, queues, and playlists directly through your MCP-enabled client, giving you hands-on control without leaving your chat or automation environment.

How to use

Use your MCP client to load the Spotify MCP server, then interact with it to control playback, search for music, view track details, manage your queue, and curate playlists. Practical patterns include starting playback from a search result, skipping to the next track, adding a track to a playlist, creating or updating playlists, and inspecting current track or album information. You can trigger actions like play, pause, skip, and queue management through natural language prompts or structured commands supported by your MCP client.

How to install

Prerequisites you need before installing:

- A running MCP-enabled environment (Claude Desktop or compatible client) with Internet access.

- Spotify Developer credentials: a Client ID, Client Secret, and a Redirect URI configured for the app (http://127.0.0.1:8080/callback or another loopback address/port you choose).

Run this project with uvx

{
  "mcpServers": {
    "spotify": {
      "command": "uvx",
      "args": [
        "--python", "3.12",
        "--from", "git+https://github.com/varunneal/spotify-mcp",
        "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"
      }
    }
  }
}

Run this project locally

If you prefer to run the project locally to avoid redirect URI prompts for every tool call, clone the repository and run it from your MCP configuration as shown.

git clone https://github.com/varunneal/spotify-mcp.git

Then add it to your MCP configuration using the local runtime command shown here.

{
  "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"
      }
    }
}

Inspector and debugging tips

To inspect and debug the MCP server, launch the Inspector tool to get a debugging URL and view logs. You can run the inspector with the following command.

npx @modelcontextprotocol/inspector uv --directory /path/to/spotify-mcp run spotify-mcp

Additional tips

This MCP server emits logs to standard error as defined by the MCP environment. On macOS, you can find logs under the Claude application logs directory. Ensure your Spotify account uses a Premium tier required for the developer API. If you encounter issues, verify your environment variables and redirect URI settings, and ensure the runtime tools (uvx or uv) are up to date.

Configuration and troubleshooting

Configuration details you will typically edit include the Spotify API keys and the redirect URI. Maintain consistent endpoint usage (redirects should point to your local loopback address) and restart your MCP environment if changes do not take effect immediately.