Integrations
Enables searching for tracks, viewing Spotify profiles, creating and managing playlists, adding tracks to playlists, and getting personalized music recommendations using a Spotify account.
Spotify MCP Server
A simple Model Context Protocol (MCP) server that lets you interact with Spotify through Claude. This server enables Claude to search for songs, create playlists, get recommendations, and more using your Spotify account.
Features
- Search for tracks on Spotify
- View your Spotify profile
- Create playlists
- Add tracks to playlists
- Get personalized music recommendations
Tools Available
Tool Name | Description |
---|---|
set-spotify-credentials | Set your Spotify authentication credentials |
check-credentials-status | Check if your credentials are valid and who is logged in |
search-tracks | Search for tracks by name, artist, or keywords |
get-current-user | Get your Spotify profile information |
create-playlist | Create a new playlist on your account |
add-tracks-to-playlist | Add tracks to an existing playlist |
get-recommendations | Get recommendations based on seed tracks |
Setup Instructions
1. Prerequisites
- Node.js v16 or higher
- npm
- A Spotify account
- A registered Spotify Developer application
2. Create a Spotify Developer App
- Go to Spotify Developer Dashboard
- Log in with your Spotify account
- Click "Create an App"
- Fill in the app name and description
- Add
http://localhost:8888/callback
as a Redirect URI - Note your Client ID and Client Secret
3. Install the Project
4. Get Your Spotify Tokens
Edit the spotify-auth.js
file to include your Client ID and Client Secret:
Then run the authentication script:
This will:
- Open a URL in your browser
- Prompt you to log in to Spotify
- Ask for your permission to access your account
- Save the tokens to
secrets.json
5. Build the MCP Server
6. Configure Claude Desktop
Edit your Claude Desktop configuration file:
- On macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- On Windows:
%APPDATA%\Claude\claude_desktop_config.json
Add the following configuration:
Replace /full/path/to/spotify-mcp-server
with the actual path to your project directory.
7. Restart Claude Desktop
Close and reopen Claude Desktop to load the new configuration.
Usage
When you start a conversation with Claude, you'll first need to set your Spotify credentials:
- Look at your
secrets.json
file to get your credentials - Use the
set-spotify-credentials
tool to authenticate - Then use any of the other Spotify tools
Example Prompts
Setting Up Credentials
Basic Commands
Check your account:
Search for tracks:
Create a playlist:
Multi-Step Tasks
Creating a playlist with songs:
Getting recommendations based on favorites:
Troubleshooting
- Error: No access token available: You need to set your credentials first using the
set-spotify-credentials
tool - Authentication failures: Your tokens may have expired. Run the auth script again to get fresh tokens
- Invalid credentials: Double check that you're using the correct Client ID and Client Secret
Notes
- The server stores credentials in memory only
- You'll need to set credentials each time you start a new conversation
- If Claude Desktop restarts, you'll need to set credentials again
You must be authenticated.
local-only server
The server can only run on the client's local machine because it depends on local resources.
Tools
Enables Claude to interact with Spotify by searching songs, creating playlists, getting recommendations, and managing your music through your Spotify account.
Related MCP Servers
- AsecurityFlicenseAqualityA server that connects Claude with Spotify, allowing users to control playback, search content, get information about tracks/albums/artists/playlists, and manage the Spotify queue.Last updated -4273Python
- AsecurityFlicenseAqualityConnects Claude with Spotify, allowing users to control playback, search for content, get music information, and manage the Spotify queue.Last updated -81Python
- -securityFlicense-qualityConnects Claude with Spotify, enabling playback control, search functionality, and queue management through Spotify's API.Last updated -Python
- -securityFlicense-qualityConnects Claude with Spotify to control playback, search music, get track information, and manage the queue through conversation.Last updated -Python