add_to_queue_songLABSCO SUMMARY
Your listening history, in the room where playlists get made.
Top tracks and top artists over a period sit in the same conversation as playlist creation, so "build me a playlist of what I actually played this month" is one exchange rather than an afternoon. It is something you run yourself, on your own Spotify developer credentials, on your own machine.
What it is
A Python server built on Gradio that reaches Spotify through a developer app of your own. It runs as a local Gradio application and clients connect to its SSE endpoint rather than launching a process, so the app has to be up before the client can see anything. The listening-history tools are the part that distinguishes it: top artists and top tracks over a period, in the same conversation that creates playlists.
What you get
- OAuth sign-in to your own Spotify account
- Track search returning the artist alongside the track
- A song added to your playback queue
- Your recently played tracks
- A new playlist created, your existing playlists listed with their ids, and songs added to any of them
- Your top artists and top tracks for a period, with genre information
Requirements
Python, and a Spotify developer app of your own with a loopback redirect URI registered on it — the client ID and secret go in a local .env file. There is no published package: clone the repository, install its two dependencies and run it, then point the client at the Gradio SSE endpoint through mcp-remote. Queueing a song needs Spotify Premium; search, playlists and listening history do not. The project notes that the client may need restarting once or twice before the connection takes, and that it is built to run locally rather than in an ephemeral environment.
Setup effort
Build from source — git clone https://github.com/foxy-dev1/Spotify-mcp-server.git
USE CASES
Building a playlist out of what you actually listened to
Pull your top tracks and artists for a period, create a playlist, and fill it — all in one exchange, instead of scrolling a wrapped summary and rebuilding it by hand.
Queueing a song without leaving the chat
Search for the track by name, confirm the artist, and drop it into the playback queue. This is the one path that needs a Premium account.
Finding the song you played on Tuesday
Recently played tracks come back as a list you can ask questions about, and playlist lookup gives you the names and ids of the playlists you already keep.
9 tools
Listed in project docs. Your client may show a different list.
get_artist_and_trackauth_with_spotifyget_recently_played_songscreate_playlistget_playlist_name_and_idadd_songs_to_playlistget_users_top_artistsget_user_top_tracksBEFORE YOU INSTALL
What to know first
Tools you get
9 tools named in the project's documentation. These are Gradio endpoints that reach MCP clients only through the bridge at /gradio_api/mcp/sse. The only playback-side tool is add_to_queue_song; there is no play, pause, skip or volume tool.
Requires
- Python 3.x
- CLIENT_ID in your environment
- CLIENT_SECRET in your environment
- REDIRECT_URI in your environment
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
This one is built from source rather than installed with a single command.
Server setup
git clone https://github.com/foxy-dev1/Spotify-mcp-server.git
cd Spotify-mcp-server
pip install -r requirements.txt
pip install "gradio[mcp]"
export CLIENT_ID=<YOUR_CLIENT_ID> CLIENT_SECRET=<YOUR_CLIENT_SECRET> REDIRECT_URI=http://127.0.0.1:5000/callback
python server.pyLeave it running; the client below connects to http://127.0.0.1:7860/gradio_api/mcp/sse
MCP Clients
Claude Desktop
{
"mcpServers": {
"gradio": {
"command": "npx",
"args": [
"mcp-remote",
"http://127.0.0.1:7860/gradio_api/mcp/sse"
]
}
}
}