# spotify-mcp

> MCP Server

This repository hosts an MCP server that connects Claude to Spotify, enabling features like playback control, search, information retrieval, and queue management using the Spotipy API. This repository hosts an

## Overview

- **Category:** Communication
- **Language:** Python
- **Stars:** 612
- **Forks:** 24
- **Owner:** varunneal
- **GitHub:** https://github.com/varunneal/spotify-mcp
- **Created:** 2024-12-01T02:06:14+00:00
- **Updated:** 2025-03-28T14:07:28+00:00
- **Source:** https://model-context-protocol.com/servers/claude-spotify-control-playback-queue-management

## Setup

## Setup

### Getting Spotify API Keys
Create an account on [developer.spotify.com](https://developer.spotify.com/). Navigate to [the dashboard](https://developer.spotify.com/dashboard). 
Create an app with redirect_uri as http://localhost:8888. (You can choose any port you want but you must use http and localhost). 
I set "APIs used" to "Web Playback SDK".

### Run this project locally
This project is not yet set up for ephemeral environments (e.g. `uvx` usage). 
Run this project locally by cloning this repo

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

Add this tool as a mcp server.

On MacOS: `~/Library/Application\ Support/Claude/claude_desktop_config.json`

On Windows: `%APPDATA%/Claude/claude_desktop_config.json`


  ```json
  "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://localhost:8888"
      }
    }
  ```

### Troubleshooting
Please open an issue if you can't get this MCP working. Here are some tips:
1. Make sure `uv` is updated. I recommend version `>=0.54`.
2. Make sure claude has execution permisisons for the project: `chmod -R 755`.
3. Ensure you have Spotify premium (needed for running developer API).

This MCP will emit logs to std err (as specified in the MCP) spec. On Mac the Claude Desktop app should emit these logs
to `~/Library/Logs/Claude`. 
On other platforms [you can find logs here](https://modelcontextprotocol.io/quickstart/user#getting-logs-from-claude-for-desktop).

You can launch the MCP Inspector via [`npm`](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) with this command:

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

Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.

## Tools

## Available Tools

1.  Start, pause, and skip playback (Control Spotify playback).
2.  Search for tracks/albums/artists/playlists (Find music content).
3.  Get info about a track/album/artist/playlist (Retrieve details about music).
4.  Manage the Spotify queue (Modify the playback queue).
