Spotify Player
– Control Spotify playback, queue, volume and playlists from Claude/Cursor via MCP. (Python)
What is Spotify Player?
Spotify Player is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to – control spotify playback, queue, volume and playlists from claude/cursor via mcp. (python)
– Control Spotify playback, queue, volume and playlists from Claude/Cursor via MCP. (Python)
This server falls under the Communication category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- – Control Spotify playback, queue, volume and playlists from
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx mcp-spotify-playerConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Spotify Player
MCP Spotify Player is a Python MCP server that lets AI assistants like Claude and Cursor control Spotify playback, manage queues, adjust volume, browse playlists, search for tracks and artists, and switch between playback devices using natural language commands. It uses the Spotify Web API with a standard OAuth 2.0 flow, requiring a Spotify Developer application for credentials. The server runs locally via stdio and stores OAuth tokens on disk, so subsequent sessions authenticate automatically without requiring the browser flow again. A Spotify Premium account is recommended for full playback control, as the Spotify API restricts playback commands for free-tier users.
Prerequisites
- Python 3.10 or higher
- A Spotify account (Premium recommended for full playback control)
- A Spotify Developer application with CLIENT_ID and CLIENT_SECRET (create at developer.spotify.com/dashboard)
- The redirect URI http://127.0.0.1:8000/auth/callback added to your Spotify app settings
- An MCP client such as Claude Desktop or Cursor
Create a Spotify Developer Application
Go to developer.spotify.com/dashboard, log in, and create a new application. Copy the Client ID and Client Secret. In the app's settings, add 'http://127.0.0.1:8000/auth/callback' as a Redirect URI and save.
Clone the repository and install
Clone the mcp-spotify-player repository and install it with pip. Dependencies are managed via pyproject.toml.
git clone https://github.com/vsaez/mcp-spotify-player.git
cd mcp-spotify-player
pip install .Create the .env file with your Spotify credentials
Copy the example env file and fill in your Spotify Client ID, Client Secret, and the redirect URI. Optionally set MCP_SPOTIFY_TOKENS_PATH to a custom path for token storage.
cp env.example .env
# Edit .env with your credentials:
# SPOTIFY_CLIENT_ID=your_client_id_here
# SPOTIFY_CLIENT_SECRET=your_client_secret_here
# SPOTIFY_REDIRECT_URI=http://127.0.0.1:8000/auth/callbackRun the OAuth authorization flow
Start the server once manually to complete the OAuth flow. A browser window will open asking you to log in to Spotify and authorize the app. Tokens are saved to ~/.config/mcp_spotify_player/tokens.json for future use.
python -m mcp_spotify_playerConfigure your MCP client
Add the Spotify MCP server to your claude_desktop_config.json. Point the command at your Python executable and set the working directory to the cloned repo.
{
"mcpServers": {
"spotify-player": {
"command": "/usr/bin/python3",
"args": ["-m", "mcp_spotify_player"],
"cwd": "/path/to/cloned/mcp-spotify-player",
"env": {
"SPOTIFY_CLIENT_ID": "your_client_id_here",
"SPOTIFY_CLIENT_SECRET": "your_client_secret_here",
"SPOTIFY_REDIRECT_URI": "http://127.0.0.1:8000/auth/callback"
}
}
}
}Spotify Player Examples
Client configuration
Claude Desktop configuration for mcp-spotify-player using the installed Python module with credentials in the env block.
{
"mcpServers": {
"spotify-player": {
"command": "python3",
"args": ["-m", "mcp_spotify_player"],
"cwd": "/path/to/mcp-spotify-player",
"env": {
"SPOTIFY_CLIENT_ID": "your_client_id_here",
"SPOTIFY_CLIENT_SECRET": "your_client_secret_here",
"SPOTIFY_REDIRECT_URI": "http://127.0.0.1:8000/auth/callback"
}
}
}
}Prompts to try
Example prompts for controlling Spotify playback, searching for music, and managing playlists.
- "Play some relaxing jazz music on Spotify"
- "Skip to the next track"
- "Set the volume to 50%"
- "Search for albums by Radiohead and queue the album 'OK Computer'"
- "Show me what's currently playing and list the next 5 tracks in the queue"
- "Create a new playlist called 'Focus Music' and add the top 10 lo-fi tracks to it"Troubleshooting Spotify Player
OAuth authorization flow fails or browser does not open
Ensure port 8000 is available and not blocked by a firewall. The redirect URI in your .env must exactly match what is registered in the Spotify Developer Dashboard (http://127.0.0.1:8000/auth/callback). If the browser does not open automatically, copy the printed URL and open it manually.
Playback commands fail with 'Premium required' or 403 error
Most Spotify Web API playback control endpoints (play, pause, skip, volume) require a Spotify Premium subscription. Free-tier accounts can use search and playlist browsing but cannot control playback remotely. Upgrade to Premium or check the Spotify API documentation for which endpoints are available on free tier.
Tokens expired and re-authentication is required
Delete the token file at ~/.config/mcp_spotify_player/tokens.json (or your custom MCP_SPOTIFY_TOKENS_PATH), then run 'python -m mcp_spotify_player' directly to complete the OAuth flow again. The server will automatically refresh tokens during normal operation as long as the refresh token is valid.
Frequently Asked Questions about Spotify Player
What is Spotify Player?
Spotify Player is a Model Context Protocol (MCP) server that – control spotify playback, queue, volume and playlists from claude/cursor via mcp. (python) It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Spotify Player?
Follow the installation instructions on the Spotify Player GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Spotify Player?
Spotify Player works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Spotify Player free to use?
Yes, Spotify Player is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Spotify Player Alternatives — Similar Communication Servers
Looking for alternatives to Spotify Player? Here are other popular communication servers you can use with Claude, Cursor, and VS Code.
Slack
★ 86.1kEnables interaction with Slack workspaces through comprehensive channel management, messaging, user management, file uploads, and Block Kit formatting. Features secure credential storage via macOS Keychain and supports all major Slack operations incl
LibreChat
★ 37.3kEnhanced ChatGPT Clone: Features Agents, MCP, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenA
Note Gen
★ 11.9kA cross-platform Markdown AI note-taking software.
DeepChat
★ 5.8k🐬DeepChat - A smart assistant that connects powerful AI to your personal world
WhatsApp MCP
★ 5.7kConnects AI assistants to the official Meta WhatsApp Cloud API for managing conversations and sending various message types through natural language. It provides tools for media management, template messages, and real-time webhook processing without
Apple
★ 3.1kEnables interaction with Apple apps like Messages, Notes, and Contacts through the MCP protocol to send messages, search, and open app content using natural language.
Browse More Communication MCP Servers
Explore all communication servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Spotify Player in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Spotify Player?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.