MCP Spotify AI Assistant
About
An AI assistant that controls Spotify features like playback, playlists, and search using the Model Context Protocol (MCP).
Details
- Author
- iankan04
- Categories
- Cloud Service, Other, Media
Jump to
Setup
Install MCP Spotify AI Assistant in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/iankan04/MCP-Spotify
Follow the installation instructions in the repository README, then restart your MCP client.
An AI assistant that controls Spotify features like playback, playlists, and search using the Model Context Protocol (MCP).
AModel Context Protocol (MCP)server that enables Claude to control Spotify features.
- Example Interactions
- Tools
- Read Operations
- Write Operations
- Prerequisites
- Installation
- Creating a Spotify Developer Application
- Spotify API Configuration
- Authentication Process
- "Can you add the top 5 Coldplay songs to my playlist vibes"
- "What are my most listened to songs this past month"
- "Can you shuffle play my top songs"
- 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 the current user's top artists or tracks based on calculated affinity
- Parameters:
- type(string): The type of entity to return. Valid values: artists or tracks
- time_range(string, optional): Over what time frame the affinities are computed. Long_term ~1 year of data, medium_term is last 6 months, short_term is last 4 weeks
- limit(number, optional): The maximum number of items to return. Default: 20, minimum: 1, maximum: 50
- Description: Get a list of the playlists owned or followed by the current Spotify user
- Parameters:
- limit(number, optional): The maximum number of items to return. Default: 20, minimum: 1, maximum: 50
- Description: Get full details of the items of a playlist owned by a Spotify user
- Parameters:
- playlist_id(string): The Spotify ID of the playlist
- fields(string, optional): A comma-separated list of the fields to return
- limit(number, optional): The maximum number of items to return. Default: 20, minimum: 1, maximum: 50
- Description: Get detailed profile information about the current user
- Parameters: None
- Returns: Users' display name, id, email, and number of followers
- Example:getCurrentUserProfile()
- Description: Get full details of the items of a playlist owned by a Spotify user
- Parameters: None
- Returns: Returns the currently playing item's name and accompanying details
- Example:getCurrentlyPlaying()
- Description: Get full details of the items of a playlist owned by a Spotify user
- Parameters:
- limit(number, optional): The maximum number of items to return. Default: 20, minimum: 1, maximum: 50
- Description: Get the list of objects that make up the user's queue
- Parameters: None
- Returns: The items' names and additional information in the queue
- Example:getUserQueue()
- Description: Start a new playback on the active device
- Parameters:
- device_id(string, optional): The ID of the device this command is targeting
- context_uri(number, optional): Spotify URI of the context to play. Valid contexts are albums, artists, and playlists
- type(number, optional): The type to play. Valid types are track, album, artist, or playlist
- id(number, optional): The Spotify ID of the item to play
- Description: Resume playback on the active device
- Parameters:
- device_id(string, optional): The ID of the device this command is targeting
- Description: Pause playback on the active device
- Parameters:
- device_id(string, optional): The ID of the device this command is targeting
- Description: Add an item to be played next in the playback queue
- Parameters:
- uri(string): The URI of the item to add to the queue. Must be a track or an episode URI
- device_id(string, optional): The ID of the device this command is targeting
- Description: Toggle shuffle on or off for the user's playback
- Parameters:
- state(boolean): True: Shuffle the user's playback. False: Do not shuffle the user's playback
- device_id(string, optional): The ID of the device this command is targeting
- Description: Create a playlist for a Spotify user
- Parameters:
- device_id(string): The user's Spotify user ID
- name(string): The name for your new playlist
- public(boolean, optional): The playlist's public/private status
- description(string, optional): The playlist's description
- Description: Adds one or more items to a user's playlist
- Parameters:
- playlist_id(string): The Spotify ID of the playlist
- uris(string, optional): A comma-separated list of Spotify URIs to add, can be track or episode URIs
- types(boolean, optional): A comma-separated list of types in the same order as ids
- ids(string, optional): A comma-separated list of ids in the same order as types
- Description: Change a playlist's name and public/private state
- Parameters:
- playlist_id(string): The Spotify ID of the playlist
- name(string, optional): The new name for the playlist
- public(boolean, optional): The playlist's new public/private status
- description(string, optional): Value for playlist description
- Node.js v16+
- A Spotify Premium account
- A registered Spotify Developer application
git clone https://github.com/iankan04/MCP-Spotify.git cd mcp-spotify npm install npm run build
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 "Show Client Secret" to reveal yourClient Secret - Click "Edit Settings" and add a Redirect URI (e.g.,http://localhost:8000/callback)
- Save your changes
Create a.env.localfile in the project root (you can copy and modify the provided example):
SPOTIFY_CLIENT_ID='Your client_id' SPOTIFY_CLIENT_SECRET='Your client_secret' SPOTIFY_REDIRECT_URI='Your redirect_uri (i.e. http://127.0.0.1:8000/callback'
Make sure your redirect_uri follows the newest
Spotify Developer Settings.The Spotify API uses OAuth 2.0 for authentication. Follow these steps to authenticate your application:
-
The script will generate an authorization URL. Open this URL in your web browser.
You'll be prompted to log in to Spotify and authorize your application.
After authorization, Spotify will redirect you to your specified redirect URI with a code parameter in the URL.
The authentication script will automatically exchange this code for access and refresh tokens.
These tokens will be saved to the Redis database and automatically refreshed when called
To use your MCP server with Claude Desktop, add it to your Claude configuration:
{ "mcpServers": { "spotify": { "command": "node", "args": ["MCP-Spotify/build/index.js"] } } }
If Claude is running, restart the application, and you should see "spotify" as a new tool
Control Spotify playback using natural language commands.
Control Spotify playback and manage playlists using AI assistants and IDEs.
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.





