gupta-kush/spotify-mcp

šŸŽØ Art & Culture
0 Views
0 Installs

šŸ ā˜ļø šŸŽ 🪟 🐧 - 93-tool Spotify server with smart shuffle, natural language song search, vibe analysis, artist network mapping, taste evolution, and playlist power tools. Works after Spotify's Feb 2026 API changes.

Quick Install

One-Click IDE Configuration
claude_desktop_config.json
{
  "mcpServers": {
    "gupta-kush-spotify-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "gupta-kush-spotify-mcp"
      ]
    }
  }
}
Or

Using an AI coding agent (Claude Code, Cursor, etc.)? Copy a ready-made prompt that tells it to fetch the setup instructions and install this server for you.

Documentation Overview

Spotify MCP Server

PyPI Tests 100+ Tools License: MIT Python 3.10+ Install in Cursor

Control Spotify from Claude, Cursor, or any MCP client. 100+ tools for playback, search, playlist management, smart shuffle, vibe analysis, natural language song search, artist exploration, and library indexing. Just uvx spotify-mcp to get started.

Quick Start

1. Get a Spotify Client ID

Go to the Spotify Developer Dashboard, create an app, set the redirect URI to http://127.0.0.1:8888/callback, check Web API, and copy your Client ID. No client secret needed (PKCE auth).

2. Install and Configure

Claude Code (one command):

claude mcp add spotify -- uvx spotify-mcp

Then set your client ID: claude mcp add spotify -e SPOTIFY_CLIENT_ID=your_client_id -- uvx spotify-mcp

Claude Desktop (add to claude_desktop_config.json):

{
  "mcpServers": {
    "spotify": {
      "command": "uvx",
      "args": ["spotify-mcp"],
      "env": {
        "SPOTIFY_CLIENT_ID": "your_client_id"
      }
    }
  }
}

Cursor / VS Code (same config, but load only core tools to stay under the 40-tool limit):

{
  "mcpServers": {
    "spotify": {
      "command": "uvx",
      "args": ["spotify-mcp", "--toolsets=core"],
      "env": {
        "SPOTIFY_CLIENT_ID": "your_client_id"
      }
    }
  }
}

Or install with pip: pip install spotify-mcp

3. Authorize

The first time you use a Spotify tool, your browser opens for OAuth. Grant access and the token is cached locally.

Why this one?

There are 30+ Spotify MCP servers out there. Most have 10-15 tools covering play, pause, and search.

spotify-mcpTypical server
Tools100+5-15
Smart shuffle (6 strategies incl. energy arcs)YesNo
Vibe engine (mood analysis without audio-features)YesNo
Natural language song searchYesNo
Artist network mapping (100 related artists)YesNo
Taste evolution trackingYesNo
Library index (AI playlists from your own songs)YesNo
Destructive tools stripped by defaultYesNo
Merge / diff / deduplicate playlistsYesNo
Works after Feb 2026 API changesYesMost broke
PKCE auth (no client secret needed)YesRare

What can you do with it?

Some things you can ask:

  • "Play Bohemian Rhapsody"
  • "Make my playlist start chill and build to high energy"
  • "Find that sad song with strings by Pink Floyd from the 90s"
  • "How has my music taste changed over time?"
  • "Map Radiohead's related artist network"
  • "Compare my Gym and Running playlists"
  • "Clean up my old playlist" (removes unavailable tracks and duplicates)
  • "What's the vibe of my Summer playlist?"
  • "Create a radio playlist based on Radiohead"
  • "When do I listen to music the most?"

Toolsets

All tools load by default, minus destructive tools (see Safety). For clients with tool limits, use --toolsets:

spotify-mcp --toolsets=core              # ~27 tools: playback, playlists, search, library, browse, stats
spotify-mcp --toolsets=core,discovery    # Add music discovery
spotify-mcp --toolsets=core,power        # Add power tools (smart shuffle, vibe engine, etc.)
spotify-mcp --toolsets=all               # All tools (default, destructive excluded)
spotify-mcp --toolsets=all,destructive   # All tools including remove/unfollow

Or via environment variable: SPOTIFY_MCP_TOOLSETS=core,power

Available toolsets: core, social, discovery, power, destructive, all

Safety

Destructive tools (remove tracks, unfollow artists, delete content) are not loaded unless you opt in with --toolsets=all,destructive. Safe for auto-accept mode since the AI cannot call tools that don't exist.

Affected tools: spotify_remove_from_playlist, spotify_remove_saved_tracks, spotify_remove_saved_albums, spotify_remove_saved_shows, spotify_unfollow_playlist, spotify_unfollow_artists, spotify_unfollow_users

Even when enabled, destructive tools default to dry_run=True, showing a preview without executing. Pass dry_run=False to perform the action.

Tool Reference

Playback (15 tools)
ToolDescription
spotify_statusConnection status and current playback
spotify_now_playingCurrently playing track details
spotify_playStart playback (track, album, or playlist)
spotify_pausePause playback
spotify_resumeResume playback
spotify_skip_nextSkip to next track
spotify_skip_previousSkip to previous track
spotify_add_to_queueAdd a track to the queue
spotify_get_queueView the playback queue
spotify_get_devicesList available Spotify Connect devices
spotify_set_volumeSet volume (0-100)
spotify_seekSeek to a position in the current track
spotify_set_repeatSet repeat mode (off/context/track)
spotify_toggle_shuffleToggle shuffle on or off
spotify_transfer_playbackTransfer playback to another device
Playlists (12 tools)
ToolDescription
spotify_get_my_playlistsList your playlists
spotify_get_playlistGet playlist details and tracks
spotify_get_playlist_tracksGet playlist tracks with pagination
spotify_create_playlistCreate a new playlist
spotify_add_to_playlistAdd tracks to a playlist
spotify_remove_from_playlistRemove tracks from a playlist
spotify_reorder_playlistMove tracks within a playlist
spotify_update_playlistUpdate name, description, or visibility
spotify_follow_playlistFollow a playlist
spotify_unfollow_playlistUnfollow a playlist
spotify_get_playlist_coverGet the playlist's cover image URL
spotify_check_playlist_followersCheck if users follow a playlist
Search & Discovery (6 tools)
ToolDescription
spotify_searchSearch for tracks, artists, albums, or playlists
spotify_related_artistsFind artists similar to a given artist
spotify_discover_by_artistDiscover tracks via related artists
spotify_discover_by_moodFind tracks matching a mood
spotify_genre_explorerExplore tracks and artists in a genre
spotify_discover_deep_cutsFind album-only tracks (not singles)
Stats & Insights (7 tools)
ToolDescription
spotify_top_tracksYour top tracks by time range
spotify_top_artistsYour top artists by time range
spotify_recently_playedRecent listening history
spotify_listening_patternsWhen you listen (hour and day distributions)
spotify_taste_profileGenre diversity and niche artist analysis
spotify_playlist_compareCompare multiple playlists side by side
spotify_playlist_freshnessWhen each playlist was last updated, sorted by staleness
Library (9 tools)
ToolDescription
spotify_get_saved_tracksYour liked/saved tracks
spotify_save_tracksSave tracks to Liked Songs
spotify_remove_saved_tracksRemove tracks from Liked Songs
spotify_get_saved_albumsYour saved albums
spotify_save_albumsSave albums to library
spotify_remove_saved_albumsRemove albums from library
spotify_check_saved_tracksCheck if tracks are in Liked Songs
spotify_check_saved_albumsCheck if albums are in your library
spotify_get_saved_episodesYour saved podcast episodes
Follow & Social (7 tools)
ToolDescription
spotify_follow_artistsFollow artists
spotify_unfollow_artistsUnfollow artists
spotify_get_followed_artistsList your followed artists
spotify_check_following_artistsCheck if you follow specific artists
spotify_check_following_usersCheck if you follow specific users
spotify_follow_usersFollow Spotify users
spotify_unfollow_usersUnfollow Spotify users
Shows & Podcasts (8 tools)
ToolDescription
spotify_get_saved_showsYour saved podcasts and shows
spotify_get_showGet show details
spotify_get_show_episodesList episodes of a show
spotify_save_showsSave shows to your library
spotify_remove_saved_showsRemove shows from your library
spotify_check_saved_showsCheck if shows are in your library
spotify_save_episodesSave individual episodes
spotify_get_episodeGet episode details (duration, resume point)
Browse (5 tools)
ToolDescription
spotify_get_trackFull track details (popularity, ISRC, preview URL)
spotify_get_albumAlbum details with full tracklist
spotify_get_artistArtist profile (followers, popularity, genres)
spotify_get_artist_albumsList an artist's albums, singles, and compilations
spotify_get_userUser profile with public playlists
Playlist Power Tools (8 tools)
ToolDescription
spotify_merge_playlistsMerge multiple playlists into one
spotify_split_playlist_by_artistSplit a playlist by artist
spotify_deduplicate_playlistRemove duplicate tracks
spotify_export_playlistExport playlist data
spotify_playlist_diffCompare track differences between playlists
spotify_find_playlist_overlapsScan all playlists for shared tracks
spotify_find_playlist_subsetsFind playlists that are subsets of others
spotify_absorb_playlistMerge unique tracks from one playlist into another
Reports & Analytics (3 tools)
ToolDescription
spotify_listening_reportFull listening profile with genres and stats
spotify_playlist_analysisAnalyze playlist composition
spotify_taste_evolutionHow your taste has changed over time
Smart Shuffle (1 tool, 6 strategies)
ToolDescription
spotify_smart_shuffleReorder a playlist: variety, alphabetical_artist, chronological, genre_variety, energy_arc, reverse_chronological
Playlist Generators (4 tools)
ToolDescription
spotify_create_radioCreate a radio playlist from a seed track or artist
spotify_time_capsuleSnapshot your current top tracks into a playlist
spotify_vibe_playlistCreate a mood-based playlist
spotify_era_playlistCreate a decade-themed playlist
Playlist Curator (4 tools)
ToolDescription
spotify_sort_playlistSort by track name, artist, album, duration, or date added
spotify_cleanup_playlistRemove unavailable tracks and duplicates
spotify_interleave_playlistsInterleave tracks from multiple playlists
spotify_playlist_radioCreate a radio playlist from a playlist's top artists
Queue Builder (2 tools)
ToolDescription
spotify_build_queueAdd multiple tracks to the queue in order
spotify_queue_from_playlistQueue tracks from a playlist
Vibe Engine (2 tools)
ToolDescription
spotify_playlist_vibeAnalyze a playlist's genre vibe and energy
spotify_find_vibe_matchesFind tracks that match a playlist's vibe
Artist Explorer (3 tools)
ToolDescription
spotify_artist_deep_diveFull artist profile with discography and stats
spotify_artist_timelineArtist's career timeline with all releases
spotify_artist_networkMap an artist's related artist network
Find Song (1 tool)
ToolDescription
spotify_find_songFind a song using natural language description
Library Index (3 tools)

Sync your Spotify library to a local index, then let your AI create playlists from songs you already know instead of random catalog tracks.

ToolDescription
spotify_sync_librarySync liked songs and your playlists to a local JSON index
spotify_library_statsArtist counts, playlist names, and dates (compact overview for AI reasoning)
spotify_query_libraryFilter your library by artist, playlist, date range, track/album name

Example: "Make a playlist with my favorite indie rock songs from this year." The AI checks your library stats, picks matching artists, queries by date range, and builds a playlist from songs you already have.

Data stored at %LOCALAPPDATA%\spotify-mcp\library.json (Windows) or ~/.cache/spotify-mcp/library.json (Linux/Mac). Only syncs playlists you created.

Setup Options

Environment Variables (Recommended)

Set SPOTIFY_CLIENT_ID (and optionally SPOTIFY_CLIENT_SECRET) in your MCP client config's env field.

Interactive Setup

spotify-mcp-setup

Walks you through credentials and saves them to ~/.config/spotify-mcp/.env (Linux/Mac) or %APPDATA%\spotify-mcp\.env (Windows).

Manual .env File

Create .env in ~/.config/spotify-mcp/ (or %APPDATA%\spotify-mcp\ on Windows):

SPOTIFY_CLIENT_ID=your_client_id
SPOTIFY_REDIRECT_URI=http://127.0.0.1:8888/callback

Add SPOTIFY_CLIENT_SECRET=your_secret if you prefer traditional OAuth over PKCE.

Finding Spotify IDs

Most tools accept IDs, URIs, or URLs interchangeably:

  • Search first: Use spotify_search to find anything by name
  • Copy from Spotify: Right-click any item -> Share -> Copy Spotify URI
  • From URLs: https://open.spotify.com/track/4uLU6hMCjMI75M1A2tKUQC -> 4uLU6hMCjMI75M1A2tKUQC

Spotify's Feb 2026 API Changes

Spotify removed several endpoints in February 2026: audio-features, audio-analysis, recommendations, artist/top-tracks, all batch endpoints, and browse/categories. Search capped at 10 results per page. Most Spotify MCP servers broke.

This server was built with those constraints in mind. Discovery uses search + related artists + genre mapping instead of the old recommendations API. The vibe engine estimates energy from genre data rather than audio-features. Not perfect, but it works.

Architecture

spotify_mcp/
ā”œā”€ā”€ server.py                      # FastMCP entry + toolset loading
ā”œā”€ā”€ auth.py                        # OAuth / PKCE auth singleton
ā”œā”€ā”€ config.py                      # Constants, genre maps, toolset definitions
ā”œā”€ā”€ tools/                         # Core tools (playback, playlists, search, etc.)
ā”œā”€ā”€ power/                         # Power tools (smart shuffle, vibe engine, etc.)
└── utils/                         # Shared utilities (client, errors, formatting)

Troubleshooting

"No active device found"

Open Spotify on any device before using playback commands.

OAuth redirect fails

Ensure the redirect URI exactly matches the Spotify Developer Dashboard. Default: http://127.0.0.1:8888/callback (not https).

Token expired or corrupted

Delete .spotify_token_cache from ~/.cache/spotify-mcp/ (or %LOCALAPPDATA%\spotify-mcp\) and restart.

Premium-only features

Volume, seek, transfer, shuffle, and repeat require Spotify Premium.

Contributing

See CONTRIBUTING.md for development setup, code conventions, and how to add new tools.

License

MIT


If you find this useful, a star helps others find it too.

Related MCP Servers

8enSmith/mcp-open-library

šŸ“‡ ā˜ļø - A MCP server for the Open Library API that enables AI assistants to search for book information.

šŸŽØ Art & Culture0 views
abhiemj/manim-mcp-server

šŸ šŸ  🪟 🐧 - A local MCP server that generates animations using Manim.

šŸŽØ Art & Culture0 views
AceDataCloud/MCPFlux

šŸ ā˜ļø - Flux AI image generation and editing (Black Forest Labs) via Ace Data Cloud API.

šŸŽØ Art & Culture0 views
AceDataCloud/MCPNanoBanana

šŸ ā˜ļø - NanoBanana AI image generation and editing with virtual try-on and product placement in realistic scenes.

šŸŽØ Art & Culture0 views

Engagement

Views
0
Installs
0
Upvotes
0

Views and upvotes are unique per visitor network (hashed IP). Installs count copy actions.

Status

Health: Not checked yet

We have not completed a health check for this listing yet.

No check timestamp yet.

Unclaimed listing (imported or pending owner verification). Claim it →
ā˜… Spotlight Slot

Feature Your MCP Server

Get maximum visibility for your server across our directory, search results, and detail pages.

Spotlight Your Server

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to get the verified badge and attach your website.

Claim this listing

Promote this listing

Optional paid placement. Free listings stay free forever.

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.