Spotify API MCP
Enables interaction with the Spotify API for searching tracks, artists, albums, and playlists, managing user playlists (creating playlists, adding tracks), and accessing user profile information through OAuth 2.0 authentication.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Spotify API MCP search for 'Daft Punk' tracks"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Spotify API MCP
A Model Context Protocol (MCP) server that enables MCP-compatible applications (like Claude Desktop, IDEs, and other AI tools) to interact with the Spotify API, including authenticated endpoints for playlist management.
Features
Search: Search for tracks, artists, albums, and playlists
Authentication: OAuth 2.0 flow with PKCE for secure authentication
User Profile: Get current user information
Playlist Management: Create playlists and add tracks
Token Management: Automatic token refresh
Related MCP server: MCP Spotify Server
Setup
1. Install Dependencies
npm install2. Create a Spotify App
Create a new app
Add
http://127.0.0.1:3000/callbackas a redirect URINote your Client ID and Client Secret
3. Set Up Authentication (Optional)
You can provide your Spotify credentials in several ways:
Option A: Environment Variables
export SPOTIFY_CLIENT_ID="your_client_id_here"
export SPOTIFY_CLIENT_SECRET="your_client_secret_here"Option B: Configuration File
Create a .env file in the project root:
SPOTIFY_CLIENT_ID=your_client_id_here
SPOTIFY_CLIENT_SECRET=your_client_secret_hereOption C: Manual Authentication
If no credentials are pre-configured, you can use the spotify_authenticate tool to provide them when needed.
4. Build the Project
npm run build5. Configure Your MCP Client
Add the following to your MCP client settings (example for Claude Desktop):
{
"mcpServers": {
"spotify": {
"command": "node",
"args": ["/path/to/spotify-api-mcp/dist/index.js"]
}
}
}For other MCP clients, consult your client's documentation for the appropriate configuration format.
Note for Claude Desktop users: When you first try to use any Spotify functionality, Claude will automatically prompt you to authenticate by asking for your Spotify app's client ID and client secret. You don't need to provide these credentials in the configuration above.
Available Tools
spotify_authenticate
Authenticate with Spotify using OAuth 2.0. Required before using authenticated endpoints.
Parameters:
client_id(string, optional): Your Spotify app's client ID (can be set via environment variable)client_secret(string, optional): Your Spotify app's client secret (can be set via environment variable)
spotify_search
Search for content on Spotify.
Parameters:
query(string): Search querytype(string): Type of content (track,artist,album,playlist)limit(number, optional): Number of results (1-50, default: 10)
spotify_get_user_profile
Get the authenticated user's profile information.
spotify_create_playlist
Create a new playlist for the authenticated user.
Parameters:
name(string): Playlist namedescription(string, optional): Playlist descriptionpublic(boolean, optional): Whether playlist is public (default: false)
spotify_add_tracks_to_playlist
Add tracks to a playlist.
Parameters:
playlist_id(string): Playlist IDtrack_uris(array): Array of Spotify track URIs
spotify_get_user_playlists
Get the authenticated user's playlists.
Parameters:
limit(number, optional): Number of playlists to return (1-50, default: 20)
Usage Example
First, authenticate with Spotify:
Use the spotify_authenticate tool with your client ID and secretFor Claude Desktop users: Simply ask Claude to search for music or create a playlist. Claude will automatically handle the authentication process and ask you for your Spotify credentials when needed.
Search for tracks:
Use spotify_search with query "Bohemian Rhapsody" and type "track"Create a playlist:
Use spotify_create_playlist with name "My New Playlist"Add tracks to the playlist:
Use spotify_add_tracks_to_playlist with the playlist ID and track URIs from search resultsNote: The exact syntax for using these tools depends on your MCP client. The examples above show the general approach.
Development
Run in development mode:
npm run devBuild for production:
npm run buildSecurity Notes
Client secrets are handled securely and not logged
OAuth 2.0 with PKCE is used for authentication
Tokens are automatically refreshed when needed
Local server runs temporarily only during authentication
License
MIT
Available Tools
6 toolsspotify_add_tracks_to_playlistC
Add tracks to a playlist
Inputs: playlist_id (required), track_uris (required).
spotify_authenticateC
Authenticate with Spotify using OAuth 2.0
Inputs: client_id (required), client_secret (required).
spotify_create_playlistC
Create a new playlist for the authenticated user
Inputs: name (required), description, public.
spotify_get_user_playlistsC
Get the current user's playlists
Inputs: limit.
spotify_get_user_profileB
Get the current user's profile information
Inputs: no named parameters.
spotify_searchC
Search for tracks, artists, albums, or playlists on Spotify
Inputs: query (required), type (required), limit.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a clearly distinct purpose: authentication, user profile retrieval, playlist creation, playlist listing, track addition to playlists, and general search. There is no overlap in functionality, making tool selection straightforward for an agent.
All tools follow a consistent 'spotify_verb_noun' pattern with snake_case, such as spotify_authenticate and spotify_add_tracks_to_playlist. This predictability enhances usability and reduces confusion.
With 6 tools, the server is well-scoped for basic Spotify API interactions, covering authentication, user data, playlist management, and search. Each tool serves a clear purpose without being excessive or insufficient.
The toolset covers core Spotify workflows like authentication, user profile access, playlist creation/listing, and search, but lacks update or delete operations for playlists or tracks, which are minor gaps that agents can work around.
Maintenance
Related MCP Connectors
Full Spotify Web API coverage - albums, artists, playlists, player controls, and more.
Spotify MCP server for ChatGPT, Claude and any AI agent: search songs and artists, list playlists, read playlist songs, create playlist, add songs to playlist, remove songs from playlist, set playlist public or private and save to Liked Songs in your own Spotify account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Spotify yourself; Cotlet does not store your password and you need no Spotify API key. About the official Spotify API: Spotify has a full Web API and, since 23 Apr 2026, an official connector for Claude (checked 5 Nov 2026). The API needs an app you register, and in development mode the app owner must have Premium and the app allows 5 users; unlimited users need a registered business with at least 250,000 monthly users. Setup and FAQ: https://cotlet.dev/integrations/spotify-api-mcp-server
Spotify MCP — Web API via client_credentials OAuth
Spotify: Spotify Data API for Millions of songs & podcasts, artists, albums, playlists and more.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables interaction with Spotify's music catalog via the Spotify Web API, supporting searches, artist information retrieval, playlist management, and automatic token handling.269 npm23MIT
- AlicenseAqualityDmaintenanceEnables interaction with Spotify through LLMs using OAuth2 authentication. Supports music search, playback control, playlist management, and device management through natural language commands.142MIT
- FlicenseAqualityDmaintenanceEnables control of Spotify playback through OAuth authentication, including play/pause, track navigation, volume control, device management, and searching/playing songs by artist or track name.111-
- AlicenseAqualityDmaintenanceEnables searching and managing Spotify playlists, tracks, and user information through the Spotify Web API.10MIT