Skip to main content
Glama

spotify-mcp 🎧 β€” maintained fork

Connect Claude (Claude Code, Claude Desktop, Cursor, or any MCP client) to Spotify. Ask for a playlist in plain language and it builds it in your account β€” search, playback, queue, and full playlist create/edit.

Why this fork?

The excellent original by @varunneal is no longer maintained, and in February 2026 Spotify changed its Web API in ways that broke every write: creating a playlist or adding songs started returning 403 Forbidden. This fork fixes that (plus a login/token-persistence bug) so playlists work again β€” and it's actively maintained with issues and PRs welcome. All credit for the original project goes to Varun; this just keeps it running.


Features

  • 🎡 Create, edit, and manage playlists (the part the Feb-2026 API broke β€” fixed here)

  • πŸ” Search tracks, albums, artists, and playlists

  • ▢️ Start / pause / skip playback and manage the queue

  • ℹ️ Get details about any track / album / artist / playlist


Related MCP server: Apple Music MCP Server

Quick start

1. Create a Spotify developer app

  1. Go to the Spotify dashboard and Create app.

  2. Set the Redirect URI to exactly http://127.0.0.1:8080/callback (must be http, loopback IP 127.0.0.1, not localhost).

  3. Check Web API under the APIs/SDKs question, save, then copy your Client ID and Client secret from Settings.

A Spotify Premium account is required for the developer API to create/modify playlists.

2. Add the server to your MCP client

Add this under "mcpServers" (e.g. ~/.claude.json for Claude Code, or your Claude Desktop / Cursor config):

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

Requires uv (brew install uv or the install script).

3. Connect & authorize (one time)

Restart your client (or /mcp reconnect in Claude Code), then ask "what are my Spotify playlists?". A browser window opens β€” click Agree. Your login is saved to ~/.spotify-mcp-token.json and persists across restarts.

Now try: "Create a private playlist called Long Run with 15 upbeat ~170 BPM songs."


What's different from upstream

This fork is a drop-in replacement. Changes:

  • Spotify February 2026 Web API migration β€” the breaking change that made the original return 403 on all writes:

    • POST /users/{id}/playlists (removed) β†’ POST /me/playlists

    • playlist items: /tracks β†’ /items, and the item payload key track β†’ item

    • reads now use GET /playlists/{id}/items

  • Persistent OAuth token β€” saves to ~/.spotify-mcp-token.json with show_dialog, so write scopes actually grant and survive restarts (the original could silently re-mint a read-only, non-persistent token).

  • Honest errors β€” add/remove operations now raise on failure instead of silently swallowing them.

  • heal-auth.sh β€” one-shot helper to clear local token state if auth ever gets stuck.


Troubleshooting

Symptom

Fix

403 creating/adding to playlists

Make sure your config points at this fork (git+https://github.com/jmbluhm/spotify-mcp), not the upstream β€” the upstream predates the Feb-2026 API change.

Reads work, writes loop / do nothing

Run heal-auth.sh to clear the saved token, then reconnect and approve the browser prompt again.

"Premium required"

The Spotify developer API needs a Premium account.

"Invalid redirect URI"

It must be exactly http://127.0.0.1:8080/callback in both the dashboard and your config.

Consent window never appears

Restart your MCP client once or twice; uvx's first run sometimes needs it.

Logs go to stderr. For Claude Desktop on macOS: ~/Library/Logs/Claude.


Contributing

Issues and PRs are welcome β€” that's the point of keeping this alive. If Spotify changes the API again, or you hit a bug, open an issue with what you ran and the error. Small, focused PRs are easiest to review. See CONTRIBUTING.md for a beginner-friendly walkthrough.


Credits & license

Original project by Varun Neal Srivastava, built on spotipy. This fork is maintained by @jmbluhm and keeps the original MIT License (see LICENSE). Thanks to Varun and all the original contributors.

Available Tools

5 tools
SpotifyGetInfoA

Get detailed information about a Spotify item (track, album, artist, or playlist).

Inputs: item_uri (required).

SpotifyPlaybackB

Manages the current playback with the following actions: - get: Get information about user's current track. - start: Starts playing new item or resumes current playback if called with no uri. - pause: Pauses current playback. - skip: Skips current track.

Inputs: action (required), num_skips, spotify_uri.

SpotifyPlaylistC

Manage Spotify playlists. - get: Get a list of user's playlists. - get_tracks: Get tracks in a specific playlist. - add_tracks: Add tracks to a specific playlist. - remove_tracks: Remove tracks from a specific playlist. - change_details: Change details of a specific playlist. - create: Create a new playlist.

Inputs: action (required), name, public, track_ids, +2 more.

SpotifyQueueB

Manage the playback queue - get the queue or add tracks.

Inputs: action (required), track_id.

SpotifySearchB

Search for tracks, albums, artists, or playlists on Spotify.

Inputs: query (required), limit, qtype.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 5 tools

    Disambiguation4/5

    Most tools map cleanly to a resource (playback, queue, playlists), but SpotifySearch and SpotifyGetInfo overlap: an agent can search for a track and also fetch details for a track, and the boundary relies on the word 'detailed' to distinguish them. SpotifyPlayback 'start' with a uri versus SpotifyQueue 'add' is also a mild conceptual overlap, though the descriptions mostly disambiguate.

    Naming Consistency5/5

    Every tool follows the identical 'Spotify' + resource PascalCase pattern, so the set is highly predictable even though the convention is noun-based rather than verb_noun. Actions are consistently expressed as subcommands within the description rather than as separate tool names.

    Tool Count5/5

    Five top-level tools is well-scoped for a Spotify client, and each one earns its place by multiplexing a coherent action family (playback, queue, playlist CRUD). Nothing feels thin or bloated.

    Completeness3/5

    Playlist management is nearly full lifecycle (create, get, add/remove tracks, change details) but lacks delete/unfollow, and playback omits volume, shuffle, repeat, and seek. The queue can be read and added to but not cleared or reordered, and there is no access to liked songs or user profile, leaving notable gaps for common workflows.

    Maintenance

    ActivityMaintained
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Integrates Apple Music with MCP clients to search the global catalog, manage personal playlists, and access library data. It enables users to perform actions like creating playlists, adding tracks, and viewing recommendations through natural language commands.
      1
      -
    • A
      license
      A
      quality
      B
      maintenance
      MCP server for the Spotify Web API β€” gives Claude and other AI assistants tools to search music, control playback, manage playlists, library, and podcasts.
      47
      5
      MIT