Spotify
marcelmarais/spotify-mcp-server · 336 stars · TypeScript
MCP server Lightweight MCP server for Spotify
Install
The repo has no one-line install. Follow its README.
Files
A lightweight Model Context Protocol (MCP) server that enables AI assistants like Cursor & Claude to control Spotify playback and manage playlists.
- 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 (1-10, default: 10)offset(number, optional): Index of the first result to return (default: 0)- Returns: List of matching items with their IDs, names, and additional details
- Example:
searchSpotify("bohemian rhapsody", "track", 10)
- 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"] })
Play / Create Operations
- playMusic
- 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 playdeviceId(string, optional): ID of the device to play on- Returns: Success status
- Example:
playMusic({ uri: "spotify:track:6rqhFgbbKwnb9MLmUQDhG6" }) - Alternative:
playMusic({ type: "track", id: "6rqhFgbbKwnb9MLmUQDhG6" })
- pausePlayback
- Description: Pause the currently playing track on Spotify
- Parameters:
deviceId(string, optional): ID of the device to pause- Returns: Success status
- Example:
pausePlayback()
- resumePlayback
- Description: Resume Spotify playback on the active device
- Parameters:
deviceId(string, optional): ID of the device to resume playback on- Returns: Success status
- Example:
resumePlayback()
- skipToNext
- Description: Skip to the next track in the current playback queue
- Parameters:
deviceId(string, optional): ID of the device- Returns: Success status
- Example:
skipToNext()
- skipToPrevious
- Description: Skip to the previous track in the current playback queue
- Parameters:
deviceId(string, optional): ID of the device- Returns: Success status
- Example:
skipToPrevious()
- createPlaylist
- Description: Create a new playlist on Spotify
- Parameters:
name(string): Name for the new playlistdescription(string, optional): Description for the playlistpublic(boolean, optional): Whether the playlist should be public (default: false)- Returns: Object with the new playlist's ID and URL
- Example:
createPlaylist({ name: "Workout Mix", description: "Songs to get pumped up", public: false })
- addTracksToPlaylist
- Description: Add tracks to an existing Spotify playlist
- Parameters:
playlistId(string): ID of the playlisttrackUris(array): Array of track URIs or IDs to addposition(number, optional): Position to insert tracks- Returns: Success status and snapshot ID
- Example:
addTracksToPlaylist({ playlistId: "3cEYpjA9oz9GiPac4AsH4n", trackUris: ["spotify:track:4iV5W9uYEdYUVa79Axb7Rh"] })
- addToQueue
- 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 queuedeviceId(string, optional): ID of the device to queue on- Returns: Success status
- Example:
addToQueue({ uri: "spotify:track:6rqhFgbbKwnb9MLmUQDhG6" }) - Alternative:
addToQueue({ type: "track", id: "6rqhFgbbKwnb9MLmUQDhG6" })
- setVolume
- Description: Set the playback volume to a specific percentage (requires Spotify Premium)
- Parameters:
volumePercent(number): The volume to set (0-100)deviceId(string, optional): ID of the device to set volume on- Returns: Success status with the new volume level
- Example:
setVolume({ volumePercent: 50 })
- adjustVolume
- Description: Adjust the playback volume up or down by a relative amount (requires Spotify Premium)
- Parameters:
Facts
- Kind
- MCP server
- Repo
- marcelmarais/spotify-mcp-server
- Group
- Uncategorized
- Stars
- 336
- Language
- TypeScript
- Last push
- 2026-10-09
- Forks
- 153
- 1Everythingmodelcontextprotocol/serversThis MCP server attempts to exercise all the features of the MCP protocol. It is not intended to be a useful server, but rather a test server for builders of MCP clients. It implements prompts, tools, resources, sampling, and more to showcase MCP capabilities.85.8k
- 2Fetchmodelcontextprotocol/serversA Model Context Protocol server that provides web content fetching capabilities. This server enables LLMs to retrieve and process content from web pages, converting HTML to markdown for easier consumption.85.8k
- 3Gitmodelcontextprotocol/serversA Model Context Protocol server for Git repository interaction and automation. This server provides tools to read, search, and manipulate Git repositories via Large Language Models.85.8k
- 4Memorymodelcontextprotocol/serversA basic implementation of persistent memory using a local knowledge graph. This lets Claude remember information about the user across chats.85.8k
- 5Sequential Thinkingmodelcontextprotocol/serversAn MCP server implementation that provides a tool for dynamic and reflective problem-solving through a structured thinking process.85.8k
- 6Timemodelcontextprotocol/serversA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.85.8k