spotify
Spotify MCP Server - Model Context Protocol server for Spotify integration
claude mcp add --transport stdio qchuchu-spotify-mcp-server node dist/server.js \ --env NODE_ENV="development" \ --env SPOTIFY_CLIENT_ID="your_spotify_client_id" \ --env SPOTIFY_REDIRECT_URI="http://localhost:3000/callback" \ --env SPOTIFY_CLIENT_SECRET="your_spotify_client_secret"
How to use
This Spotify MCP Server exposes Spotify's Web API via the Model Context Protocol, enabling AI assistants to search for music, manage playlists, control playback, and retrieve metadata directly from Spotify. Once running, clients can send MCP requests to the /mcp endpoint to perform actions such as searching tracks or albums, adding items to playlists, starting or pausing playback, and querying user libraries. The server is designed to be used by MCP-enabled clients and tools, allowing prompts and tools to leverage Spotify data and actions within conversations.
To get started, configure your Spotify API credentials in the environment file or deployment environment (SPOTIFY_CLIENT_ID, SPOTIFY_CLIENT_SECRET, and a Redirect URI). After starting the server, use the MCP inspector or your client’s MCP tooling to call available tools and prompts defined in the server. Typical workflows include authenticating a user, requesting a search for a track or artist, creating or modifying a playlist, and issuing playback commands like play, pause, skip, or seek.
How to install
Prerequisites:
- Node.js 22+ (check .nvmrc in the repository for the exact version)
- npm or pnpm installed
- Spotify Developer Account and a registered App (for local development)
Installation steps:
- Clone the repository
git clone <repository-url>
cd spotify-mcp-server
- Install dependencies
npm install
- Create or copy environment configuration
cp .env.example .env
- Set up Spotify credentials in your environment file or environment variables:
# Example
export SPOTIFY_CLIENT_ID=your_spotify_client_id
export SPOTIFY_CLIENT_SECRET=your_spotify_client_secret
export SPOTIFY_REDIRECT_URI=http://localhost:3000/callback
- Run in development (hot-reload if configured)
npm run dev
- For production builds, compile and start the server
npm run build
npm start
Optional: If you plan to test locally via MCP clients, follow the integration guide for MCP client setup and ensure your redirect URI is whitelisted in the Spotify Developer Dashboard.
Additional notes
Notes and tips:
- Ensure your Spotify app's Redirect URI matches the one configured in your environment (e.g., http://localhost:3000/callback).
- You may need to refresh tokens depending on your authentication flow; implement appropriate token handling in your tooling.
- The MCP server provides a /mcp endpoint for primary communication; other HTTP methods may be restricted (405) as described in the API section.
- If you encounter CORS or callback-related issues during local development, verify that the Redirect URI is correctly registered and that the environment variables are loaded at runtime.
- When deploying, consider storing credentials in a secure secret store or environment management system and avoid committing .env files to version control.
Related MCP Servers
iterm
A Model Context Protocol server that executes commands in the current iTerm session - useful for REPL and CLI assistance
mcp
Octopus Deploy Official MCP Server
furi
CLI & API for MCP management
editor
MCP Server for Phaser Editor
DoorDash
MCP server from JordanDalton/DoorDash-MCP-Server
mcp
MCP сервер для автоматического создания и развертывания приложений в Timeweb Cloud