mcp-spotify-player
MCP server to manage Spotify from MCP clients
claude mcp add --transport stdio vsaez-mcp-spotify-player python -m mcp_spotify_player \ --env MCP_SERVER_PORT="3000" \ --env SPOTIFY_CLIENT_ID="your_spotify_client_id" \ --env SPOTIFY_REDIRECT_URI="http://127.0.0.1:8000/auth/callback" \ --env SPOTIFY_CLIENT_SECRET="your_spotify_client_secret" \ --env MCP_SPOTIFY_TOKENS_PATH="/path/to/tokens.json"
How to use
MCP Spotify Player exposes a Python-based MCP server that lets you control Spotify through natural language commands issued by an AI assistant or MCP client. The server handles OAuth authentication with Spotify, token storage, and a range of playback and discovery capabilities such as play/pause, skip, queue management, volume control, search, browse, and playlist management. You can invoke the server from compatible MCP clients (e.g., Claude Desktop, PyCharm/IntelliJ MCP integrations) by configuring an MCP server entry that points to the mcp_spotify_player module and provides your Spotify credentials via environment variables. The server exposes a web-based OAuth flow for initial authentication and then accepts commands via the MCP interface to translate natural language requests into Spotify API actions.
How to install
Prerequisites:
- Python 3.10+ installed on your system
- Git to clone the repository
- A Spotify Developer account to create an app and obtain CLIENT_ID and CLIENT_SECRET
Step-by-step installation:
- Clone the repository:
git clone <your-repository-url>
cd mcp-spotify-player
- Install the package in editable mode (for development):
pip install -e .
- Set up environment variables (example):
cp env.example .env
Edit the .env file with your credentials:
SPOTIFY_CLIENT_ID=your_client_id
SPOTIFY_CLIENT_SECRET=your_client_secret
SPOTIFY_REDIRECT_URI=http://127.0.0.1:8000/auth/callback
# Optional: tokens storage path
MCP_SPOTIFY_TOKENS_PATH=/path/to/tokens.json
# Optional: server port for the MCP interface
MCP_SERVER_PORT=3000
- Run the MCP server:
python -m mcp_spotify_player
Notes:
- The project uses pyproject.toml for dependency management.
- If developing, you can install in editable mode to reflect code changes immediately.
Additional notes
Tips and common issues:
- Ensure SPOTIFY_CLIENT_ID, SPOTIFY_CLIENT_SECRET, and SPOTIFY_REDIRECT_URI are correctly set and match your Spotify app settings.
- The first run requires completing the OAuth flow in a browser to authorize the application; the server will store access/refresh tokens locally (default path if MCP_SPOTIFY_TOKENS_PATH is not set).
- If your IDE or MCP client cannot reach the server, verify that MCP_SERVER_PORT (default 3000) is open and that the cwd points to your cloned repository.
- You can configure the server in Claude Desktop or similar clients by pointing command to the Python interpreter and passing -m mcp_spotify_player with the appropriate working directory and environment variables.
- Tokens path can be customized; if not set, tokens are stored in ~/.config/mcp_spotify_player/tokens.json by default.
Related MCP Servers
agentql
Model Context Protocol server that integrates AgentQL's data extraction capabilities.
Pare
Dev tools, optimized for agents. Structured, token-efficient MCP servers for git, test runners, npm, Docker, and more.
memory
A MCP (Model Context Protocol) server providing long-term memory for LLMs
mongo
MCP server that provide tools to LLMs such as claude in cursor to interact with MongoDB
shodan
Shodan MCP server for Claude, Cursor & VS Code. 20 tools for passive reconnaissance, CVE/CPE intelligence, DNS analysis, and device search. 4 tools work free without an API key. OSINT and vulnerability research from your IDE.
ObsidianMCPServer
A Model Context Protocol (MCP) server that enables AI assistants to interact with your Obsidian vault