Database · MODEL CONTEXT PROTOCOL
hrishi0102 spotifyyy mcp
making playlists got fun and easier wohoo. chat with claude and build personalized playlists. a spotify mcp server
WHAT IT CONNECTS
What hrishi0102 spotifyyy mcp gives an AI Agent
- Search for tracks on Spotify
- View your Spotify profile
- Create playlists
- Add tracks to playlists
- Get personalized music recommendations
- Node.js v16 or higher
- npm
- A Spotify account
- A registered Spotify Developer application
- Go to [Spotify Developer Dashboard](https://developer.spotify.com/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
- 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`
- On macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
- On Windows: `%APPDATA%\Claude\claude_desktop_config.json`
- 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
- **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
- 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
SECURITY
An MCP listing is not a security review
An MCP server may receive model context, credentials, local files, or permission to call external systems. Review its code, requested environment variables, network behavior, package provenance, and maintenance status before connecting it to an agent.
README
Repository documentation
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.
- Search for tracks on Spotify
- View your Spotify profile
- Create playlists
- Add tracks to playlists
- Get personalized music recommendations
| 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 |
- Go to Claude AI
- Click on Add Connectors
- Click on Manage Connectors
- Add custom connector
- Add the https server link
- Mail hrishi0102business@gmail.com to whitelist your spotify ID/mail
- That's it. Your claude is ready to use Spotify. You will be prompted to sign-in using spotify OAuth.
- Node.js v16 or higher
- npm
- A Spotify account
- A registered Spotify Developer application
- 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/callbackas a Redirect URI - Note your Client ID and Client Secret
# Clone or download the project first
cd spotify-mcp-server
# Install dependencies
npm installEdit the spotify-auth.js file to include your Client ID and Client Secret:
// Replace these with your Spotify app credentials
const CLIENT_ID = "your_client_id_here";
const CLIENT_SECRET = "your_client_secret_here";Then run the authentication script:
node spotify-auth.jsThis 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
npm run buildEdit 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:
{
"mcpServers": {
"spotify": {
"command": "node",
"args": ["/full/path/to/spotify-mcp-server/build/spotify-mcp-server.js"]
}
}
}Replace /full/path/to/spotify-mcp-server with the actual path to your project directory.
Close and reopen Claude Desktop to load the new configuration.
When you start a conversation with Claude, you'll first need to set your Spotify credentials:
- Look at your
secrets.jsonfile to get your credentials - Use the
set-spotify-credentialstool to authenticate - Then use any of the other Spotify tools
I want to connect to my Spotify account. Here are my credentials from secrets.json:
Tool: set-spotify-credentials
Parameters:
{
"clientId": "your_client_id",
"clientSecret": "your_client_secret",
"accessToken": "your_access_token",
"refreshToken": "your_refresh_token"
}
Check your account:
Can you check who I'm logged in as on Spotify?
Tool: get-current-user
Parameters: {}
Search for tracks:
Search for songs by Weekend
Tool: search-tracks
Parameters:
{
"query": "Taylor Swift",
"limit": 5
}
Create a playlist:
Create a new playlist called "My Pretty pretty girlfriend"
Tool: create-playlist
Parameters:
{
"name": "My Pretty pretty girlfriend",
"description": "For my girlfriend. Created with Claude and the Spotify MCP server"
}
Creating a playlist with songs:
I want to create a workout playlist with energetic songs. First, search for some high-energy songs. Then create a playlist called "Workout Mix" and add those songs to it.
Getting recommendations based on favorites:
I like the song "Blinding Lights" by The Weeknd. Can you search for it, then find similar songs, and create a playlist with those recommendations?
- Error: No access token available: You need to set your credentials first using the
set-spotify-credentialstool - 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
- 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
COMMUNITY