Spotify MCP Server
A lightweight Model Context Protocol (MCP) server that enables AI assistants like Cursor & Claude to control Spotify playback and manage playlists.
Contents
- Example Interactions
- Tools
- Read Operations
- Album Operations
- Play / Create Operations
- Playlist Operations
- Setup
- Prerequisites
- Installation
- Creating a Spotify Developer Application
- Spotify API Configuration
- Authentication Process
- Integrating with Claude Desktop, Cursor, and VsCode (Cline)
Example Interactions
- "Play Elvis's first song"
- "Create a Taylor Swift / Slipknot fusion playlist"
- "Copy all the techno tracks from my workout playlist to my work playlist"
- "Turn the volume down a bit"
Tools
Read Operations
searchSpotify
- Description: Search for tracks, albums, artists, or playlists on Spotify
- Parameters:
query(string): The search termtype(string): Type of item to search for (track, album, artist, playlist)limit(number, optional): Maximum number of results to return (10-50)
- Returns: List of matching items with their IDs, names, and additional details
- Example:
searchSpotify("bohemian rhapsody", "track", 20)
getNowPlaying
- Description: Get information about the currently playing track on Spotify, including device and volume info
- Parameters: None
- Returns: Object containing track name, artist, album, playback progress, duration, playback state, device info, volume, and shuffle/repeat status
- Example:
getNowPlaying()
getMyPlaylists
- 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)
- Returns: Array of playlists with their IDs, names, track counts, and public status
- Example:
getMyPlaylists(10, 0)
getPlaylistTracks
- Description: Get a list of tracks in a specific Spotify playlist
- Parameters:
playlistId(string): The Spotify ID of the playlistlimit(number, optional): Maximum number of tracks to return (default: 100)offset(number, optional): Index of the first track to return (default: 0)
- Returns: Array of tracks with their IDs, names, artists, album, duration, and added date
- Example:
getPlaylistTracks("37i9dQZEVXcJZyENOWUFo7")
getRecentlyPlayed
- Description: Retrieves a list of recently played tracks from Spotify.
- Parameters:
limit(number, optional): A number specifying the maximum number of tracks to return.
- Returns: If tracks are found it returns a formatted list of recently played tracks else a message stating: "You don't have any recently played tracks on Spotify".
- Example:
getRecentlyPlayed({ limit: 10 })
getUsersSavedTracks
- Description: Get a list of tracks saved in the user's "Liked Songs" library
- Parameters:
limit(number, optional): Maximum number of tracks to return (1-50, default: 50)offset(number, optional): Offset for pagination (0-based index, default: 0)
- Returns: Formatted list of saved tracks with track names, artists, duration, track IDs, and when they were added to Liked Songs. Shows pagination info (e.g., "1-20 of 150").
- Example:
getUsersSavedTracks({ limit: 20, offset: 0 })
getQueue
- Description: Get the currently playing track and upcoming items in the Spotify queue
- Parameters:
limit(number, optional): Maximum number of upcoming items to show (1-50, default: 10)
- Returns: Currently playing track and list of upcoming tracks in the queue
- Example:
getQueue({ limit: 20 })
getAvailableDevices
- Description: Get information about the user's available Spotify Connect devices
- Parameters: None
- Returns: List of available devices with name, type, active status, volume, and device ID
- Example:
getAvailableDevices()
removeUsersSavedTracks
- Description: Remove one or more tracks from the user's "Liked Songs" library (max 40 per request)
- Parameters:
trackIds(array): Array of Spotify track IDs to remove (max 40)
- Returns: Success confirmation message
- Example:
removeUsersSavedTracks({ trackIds: ["4iV5W9uYEdYUVa79Axb7Rh", "1301WleyT98MSxVHPZCA6M"] })






