Spotify MCP Node Server
About
Control Spotify playback and manage playlists using AI assistants and IDEs.
Details
- Author
- igorgarbuz
- Categories
- Cloud Service, Other, Media
Jump to
Setup
Install Spotify MCP Node Server in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/igorgarbuz/spotify-mcp
Follow the installation instructions in the repository README, then restart your MCP client.
AModel Context Protocol (MCP)Node server that enables AI assistants likeClaude Desktop, or IDEs likeCursorandWindsurfto control Spotify playback and manage playlists. Great for music discovery and creative playlist curation. Try asking Claude for some less-known tracks in a genre or similar to an artist. You can start by asking to create a new playlist or update an existing playlist.
For an easiest quickstart, as of May 2025 theClaude Desktopis the recommended way to use this software. Install Claude Desktop for your platform and follow theintegration guidebelow.
To comply with Spotify’s Developer Terms, you must have a Spotify Premium account to use this server. Additionally, if you’re using MCP-enabled AI assistants (such as Claude) with this server, you must opt out of data sharing for model training.
- Example Interactions
- Tools
- Read Operations
- Play / Create Operations
- Prerequisites
- Installation
- Creating a Spotify Developer Application
- Spotify API Configuration
- Authentication Process
- "Play The Beatles less known bootlegs"
- "Make a fusion playlist of The Beatles and Metallica"
- "What are the audio features of the track 'Bohemian Rhapsody' by Queen?"
- "Create my marathon playlist and add tracks from my workout playlists"
- Description: Search for tracks, albums, artists, or playlists on Spotify
- Parameters:
- query(string): The search term
- type(string): Type of item to search for (track, album, artist, playlist)
- limit(number, optional): Maximum number of results to return (10-50)
- Description: Get information about the currently playing track on Spotify
- Parameters: None
- Returns: Object containing track name, artist, album, playback progress, duration, and playback state
- Example:getNowPlaying()
- Description: Get a list of the current user's playlists on Spotify
- Parameters:
- limit(number, optional): Maximum number of playlists to return (default: 20)
- offset(number, optional): Index of the first playlist to return (default: 0)
- Description: Get a list of tracks in a specific Spotify playlist
- Parameters:
- playlistId(string): The Spotify ID of the playlist
- limit(number, optional): Maximum number of tracks to return (default: 100)
- offset(number, optional): Index of the first track to return (default: 0)
- Description: Retrieves a list of recently played tracks from Spotify.
- Parameters:
- limit(number, optional): A number specifying the maximum number of tracks to return.
- Description: Retrieves a list of recently played tracks from Spotify.
- Parameters:
- limit(number, optional): A number specifying the maximum number of tracks to return.
- Description: Retrieves a list of artists the user is following on Spotify.
- Parameters:
- after(string, optional): The last artist ID from the previous request. Cursor for pagination.
- limit(number, optional): Maximum number of artists to return (1-50).
- Description: Retrieves a list of the user's top artists or tracks.
- Parameters:
- type(string): The type of items to get top for. Must be "artists" or "tracks".
- time_range(string): The time range for the top items. Must be "short_term", "medium_term", or "long_term".
- limit(number, optional): Maximum number of items to return (1-50).
- offset(number, optional): Index of the first item to return. Defaults to 0.
- Description: Start playing a track, album, artist, or playlist on Spotify
- Parameters:
- uri(string, optional): Spotify URI of the item to play (overrides type and id)
- type(string, optional): Type of item to play (track, album, artist, playlist)
- id(string, optional): Spotify ID of the item to play
- deviceId(string, optional): ID of the device to play on
- Description: Pause the currently playing track on Spotify
- Parameters:
- deviceId(string, optional): ID of the device to pause
- Description: Skip to the next track in the current playback queue
- Parameters:
- deviceId(string, optional): ID of the device
- Description: Skip to the previous track in the current playback queue
- Parameters:
- deviceId(string, optional): ID of the device
- Description: Create a new playlist on Spotify
- Parameters:
- name(string): Name for the new playlist
- description(string, optional): Description for the playlist
- public(boolean, optional): Whether the playlist should be public (default: false)
- Description: Add tracks to an existing Spotify playlist
- Parameters:
- playlistId(string): ID of the playlist
- trackUris(array): Array of track URIs or IDs to add
- position(number, optional): Position to insert tracks
- Description: Adds a track, album, artist or playlist to the current playback queue
-
- Parameters:
- uri(string, optional): Spotify URI of the item to add to queue (overrides type and id)
- type(string, optional): Type of item to queue (track, album, artist, playlist)
- id(string, optional): Spotify ID of the item to queue
- deviceId(string, optional): ID of the device to queue on
- InstalledNode.js
- A Spotify Premium account
- A registeredSpotify Developer application
git clone https://github.com/igorgarbuz/spotify-mcp.git cd spotify-mcp npm install npm run build
- Go toNode.js download page
- Download an install a recent Node.js version for your platform
Creating a Spotify Developer Application
- Go to theSpotify Developer Dashboard - Log in with your Spotify account - Click the "Create an App" button - Fill in the app name and description - Accept the Terms of Service and click "Create" - In your new app's dashboard, you'll see yourClient ID - Click "Edit Settings" and add a Redirect URI (e.g.,http://127.0.0.1:8888/callback)
- Save your changes
Create aspotify-config.jsonfile in the project root:
# Copy the example config file cp spotify-config.example.json spotify-config.json
Then edit the file by adding your client id only. TheaccessToken,refreshTokenandaccessTokenExpiresAtwill be managed automatically. TheredirectUrishould be the same as the one you added in the Spotify Developer Dashboard.127.0.0.1is the simplest option for the local MCP server.
{ "clientId": "you-must-add-your-client-id-here", "redirectUri": "http://127.0.0.1:8888/callback", "accessToken": "your-access-token-filled-automatically", "refreshToken": "your-refresh-token-filled-automatically", "accessTokenExpiresAt": 0 }
The Spotify API uses OAuth 2.0 with the
PKCE extensionfor secure authentication. You do NOT need a client secret for this app.- Run the authentication script in the directory of the cloned repository:
-
The script will open your browser to the Spotify authorization page.
Log in to Spotify and authorize your application.
After authorization, Spotify will redirect you to your specified redirect URI. The app will automatically handle the code exchange and save your tokens.
The authentication script will automatically exchange this code for the access and refresh tokens.
These tokens will be saved to yourspotify-config.jsonfile.
{ "clientId": "your-client-id", "redirectUri": "http://127.0.0.1:8888/callback", "accessToken": "your-access-token-filled-automatically", "refreshToken": "your-refresh-token-filled-automatically", "accessTokenExpiresAt": 0 }
- The server will automatically refresh the access token when needed, so you don't need to re-authenticate.
The easiest way to use the Spotify MCP server is with Claude Desktop. Start
Claude Desktop installationand then locate the Claude configuration file, go toClaude Settings,click onDeveloperand thenEdit Config. Add the following to the configuration with an absolute path to the server:
{ "mcpServers": { "spotify": { "command": "node", "args": ["absolute/path/to/spotify-mcp/build/index.js"] } } }
For Cursor, go to the MCP tab inCursor Settings(command + shift + J). Add a server with this command:
node absolute/path/to/spotify-mcp/build/index.js
To set up your MCP correctly with Cline ensure you have the following file configuration setcline_mcp_settings.json:
{ "mcpServers": { "spotify": { "command": "node", "args": ["/absolute/path/to/spotify-mcp/build/index.js"], "autoApprove": ["getListeningHistory", "getNowPlaying"] } } }
You can add additional tools to the auto approval array to run the tools without intervention.
InSettingsthenWindsurf SettingstypeMCPin the search bar. In the results MCP section clickadd serverand thenadd custom server. Add the following configuration:
{ "mcpServers": { "spotify": { "command": "node", "args": ["absolute/path/to/spotify-mcp/build/index.js"], } } }
You can add additional tools to the auto approval array to run the tools without intervention.
An AI assistant that controls Spotify features like playback, playlists, and search using the Model Context Protocol (MCP).
Control Spotify playback using natural language commands.
Allows users to generate music videos using Freebeat through MCP
The first artist-owned MCP server for AI Agent use. Discover, narrate, and stream Matthew Hartley's debut album The Time Is Now: A Journey in Chapters from any AI client. Powered by Harmonic Wave.
Deterministic music-theory engine for AI agents to analyze, resolve, voice, and reharm chords.
Control Ableton Live using OSC (Open Sound Control) commands.
The World's First AI Music MCP Beyond images and video, your agent can now generate music.
AI-powered music industry assistant — real-time streaming, audience and booking data via 115+ MCP tools for artists, managers, A&R and booking agencies.
An MCP server exposing @playbykey/theory as AI-callable, computed music theory tools, includes chords, scales, progressions, transpositions, and MIDI/frequency conversions.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





