Lightweight Model Context Protocol server that lets AI assistants (Cursor, Claude, VS Code Cline) control Spotify playback and playlists.
https://github.com/marcelmarais/spotify-mcp-serverYou're deep in a coding session when your playlist hits that one track that kills your flow. Instead of breaking focus to hunt through Spotify's interface, you type: "skip this and play something more upbeat." Your AI assistant handles it instantly.
That's exactly what spotify-mcp-server delivers—seamless music control through the AI tools you're already using.
Every developer knows the friction: you're in the zone, then your music needs attention. Alt-tab to Spotify, hunt for the right playlist, adjust volume, get distracted by recommendations. By the time you're back to your editor, your mental model is half-dissolved.
This MCP server eliminates that friction entirely. Your AI assistant—whether it's Cursor, Claude Desktop, or VS Code with Cline—becomes your music interface. Natural language commands replace clicking through interfaces.
The tool provides comprehensive Spotify control through conversational commands:
Instant Playback Control:
Smart Playlist Management:
Contextual Music Discovery:
The Deep Work Setup:
Configure auto-approval for read operations like getNowPlaying and getRecentlyPlayed. Your assistant can proactively suggest music based on your current activity without interrupting your workflow.
Meeting Prep: "Pause music and create a 'client call background' playlist with instrumental tracks under 120 BPM." Your assistant handles the transition from focus music to meeting-appropriate audio.
Code Review Sessions: "Play something neutral while I review this PR, then switch to something more energetic when I start coding." The assistant can even time these transitions based on your calendar.
Unlike heavyweight music automation tools, this server is refreshingly straightforward:
git clone https://github.com/marcelmarais/spotify-mcp-server.git
cd spotify-mcp-server
npm install && npm run build
The authentication flow is properly designed—OAuth 2.0 with automatic token refresh. Set up your Spotify app credentials once, run the auth script, and you're done. No complex API key management or webhook configurations.
Integration with your AI assistant takes one configuration block:
{
"mcpServers": {
"spotify": {
"command": "node",
"args": ["spotify-mcp-server/build/index.js"]
}
}
}
That's it. Your assistant immediately gains 13 Spotify tools covering everything from search to playlist creation.
Most music automation tools try to be smart about when to change your music. This server does something better—it makes music control conversational and contextual within your existing AI workflow.
Your assistant already understands your work patterns, your schedule, your preferences from previous conversations. Now it can act on that knowledge to manage your music environment appropriately.
The real power emerges when you combine Spotify control with your assistant's other capabilities. "I'm starting a 2-hour coding session on the authentication module—set up appropriate background music and remind me to take breaks every 45 minutes." One request handles both music and productivity management.
Built on the Model Context Protocol standard, the server provides clean integration with multiple AI assistants. The TypeScript implementation uses Spotify's official Web API SDK, ensuring reliable API communication and proper error handling.
The tool supports both URI-based and ID-based track references, handles device selection for multi-device setups, and includes proper rate limiting for Spotify's API constraints. Auto-approval settings let you customize which operations require confirmation versus running automatically.
For teams, the server can be deployed centrally while maintaining individual Spotify authentication—each developer's assistant controls their personal Spotify account without sharing credentials.
Stop managing your music manually. Let your AI assistant handle the soundtrack while you focus on the code.
Get started: spotify-mcp-server on GitHub