spotify-mcp-server
Media Management
Description
Spotify MCP Server is a lightweight server that enables AI assistants like Cursor & Claude to control Spotify playback and manage playlists.
Author
MCP-Mirror
Created Date
2024-12-01
Tutorial
Learn how to use this MCP server
step1: Prerequisites
- Ensure you have Node.js v16+ installed.
- Have a Spotify Premium account.
- Register a Spotify Developer application.
step2: Installation bash git clone https://github.com/marcelmarais/spotify-mcp-server.git cd spotify-mcp-server npm install npm run build
step3: Create a Spotify Developer Application
- Go to the Spotify Developer Dashboard
- Log in with your Spotify account
- Click the "Create an App" button
- Fill in the app name and description
- Accept the Terms of Service and click "Create"
- In your new app's dashboard, note your Client ID
- Click "Show Client Secret" to reveal your Client Secret
- Click "Edit Settings" and add a Redirect URI (e.g.,
http://localhost:8888/callback) - Save your changes
step4: Spotify API Configuration
-
Create a
spotify-config.jsonfile in the project root (copy and modify the provided example): bash cp spotify-config.example.json spotify-config.json -
Edit the file with your credentials:
{ "clientId": "your-client-id", "clientSecret": "your-client-secret", "redirectUri": "http://localhost:8888/callback" }
step5: Authentication Process
-
Run the authentication script: bash npm run auth
-
Open the generated authorization URL in your web browser
-
Log in to Spotify and authorize your application
-
Spotify will redirect you to your specified redirect URI with a code parameter in the URL
-
The script will automatically exchange this code for access and refresh tokens
-
These tokens will be saved to your
spotify-config.jsonfile
step6: Integrate with Claude Desktop and Cursor
- For Claude Desktop, add the server to your Claude configuration:
{ "mcpServers": { "spotify": { "command": "node", "args": ["spotify-mcp-server/build/index.js"] } } }
- For Cursor, go to the MCP tab in
Cursor Settings(command + shift + J) and add a server with the command: bash node path/to/spotify-mcp-server/build/index.js

