Spotify MCP
@firattamur
A simple showcase for MCP Servers with Spotify
Overview
What is Spotify MCP?
Spotify MCP is a Model Control Protocol (MCP) integration that lets AI assistants control Spotify playback. It connects to the Spotify Web API via the Spotipy library, enabling search, play, and pause functions.
How to use Spotify MCP?
Clone the repository, set up a virtual environment with uv venv, install dependencies with uv sync, then configure your Spotify Client ID and Secret in main.py. Run the server with python main.py; the first launch opens a browser for Spotify login and authorization.
Key features of Spotify MCP
- Search for songs on Spotify
- Play songs on your active device
- Pause currently playing music
- Exposes functions via MCP protocol
- Uses Spotipy for Spotify Web API
Use cases of Spotify MCP
- Ask an AI assistant to search for a specific track
- Have the AI start playback of a chosen song
- Command the AI to pause music without manual interaction
- Integrate voice-controlled or chat-based Spotify control in custom assistants
FAQ from Spotify MCP
What is Spotify MCP used for?
It allows AI assistants to search, play, and pause music on Spotify through the Model Control Protocol.
What are the prerequisites?
Python 3.11 or higher and a Spotify Developer account with a registered application.
How do I authenticate with Spotify?
On first run, a browser window opens prompting you to log in to your Spotify account and authorize the application.
What functions does the server expose?
Three functions: search (find songs), play (play a specific song), and pause (pause the current song).