Home / MCP / Spotify MCP Server
Provides an MCP server to interact with Spotify via Claude, enabling search, profile access, playlist management, and recommendations.
Configuration
View docs{
"mcpServers": {
"spotify": {
"command": "node",
"args": [
"/full/path/to/spotify-mcp-server/build/spotify-mcp-server.js"
]
}
}
}You can run a Spotify MCP Server to interact with Spotify through Claude, enabling you to search tracks, view your profile, create and populate playlists, and receive personalized recommendations directly from conversations with Claude. This server handles authentication and keeps credentials in memory for the duration of your session, so you can focus on building the music experience.
To use the Spotify MCP Server, you connect it to your MCP client (Claude) and then authenticate your Spotify account once per conversation. Start by setting your credentials, then perform actions like searching tracks, checking your profile, creating playlists, adding tracks to playlists, or getting recommendations. You can combine these actions in multi-step tasks to automate common listening workflows.
Prerequisites: Node.js v16 or higher, npm, a Spotify account, and a registered Spotify Developer application.
1. Create a Spotify Developer App.
2. Install the project dependencies.
# Clone or download the project first
cd spotify-mcp-server
# Install dependencies
npm install3. Get your Spotify tokens by editing the credentials file with your app credentials and then running the authentication flow.
// Replace these with your Spotify app credentials
const CLIENT_ID = "your_client_id_here";
const CLIENT_SECRET = "your_client_secret_here";
node spotify-auth.jsThe authentication flow will open a browser, prompt you to log in to Spotify, ask for permission to access your account, and save the tokens to a secrets file.
4. Build the MCP Server.
npm run build5. Configure Claude Desktop to load the Spotify MCP Server. Add the following configuration under mcpServers, pointing to the built server file.
{
"mcpServers": {
"spotify": {
"command": "node",
"args": ["/full/path/to/spotify-mcp-server/build/spotify-mcp-server.js"]
}
}
}Restart Claude Desktop to pick up the new MCP configuration after you save the config file.
If you encounter authentication issues, re-run the auth flow to refresh tokens. If an access token is missing, set your credentials before making any Spotify requests.
You have access to a set of tools to manage and query your Spotify account: set-spotify-credentials, check-credentials-status, search-tracks, get-current-user, create-playlist, add-tracks-to-playlist, and get-recommendations.
Set your Spotify authentication credentials so Claude can access your Spotify account.
Verify that your credentials are valid and identify who is logged in.
Search for tracks by name, artist, or keywords on Spotify.
Retrieve your Spotify profile information for the connected account.
Create a new playlist in your Spotify account.
Add tracks to an existing Spotify playlist.
Get personalized recommendations based on seed tracks.