spotify
A slick, docker-ready Model Context Protocol (MCP) server powered by Spotipy—transforming Spotify playback, search, and playlist actions into handy MCP tools. Whether you want to play, pause, search, or curate your library through MCP clients (like Claude Desktop or Cursor), this server speaks Spotify while keeping your secrets safely in env vars.
claude mcp add --transport stdio allensy-spotify-mcp docker run --rm -i -v ${HOME}/.cache/spotify-mcp:/app/.cache -e SPOTIPY_CLIENT_ID -e SPOTIPY_CLIENT_SECRET -e SPOTIPY_REDIRECT_URI -e SPOTIPY_CACHE_PATH docker.io/allesy/spotify-mcp:latest \
--env SPOTIPY_CLIENT_ID="your-client-id" \
--env SPOTIPY_CACHE_PATH="/app/.cache/token" \
--env SPOTIPY_REDIRECT_URI="http://127.0.0.1:8888/callback" \
--env SPOTIPY_CLIENT_SECRET="your-client-secret"How to use
This MCP server exposes Spotify controls and queries as MCP tools powered by Spotipy. Once running via Docker, you can use commands like search, play, pause, next_track, currently_playing, and numerous library and device related operations (e.g., list_playlists, add_to_liked, transfer_playback, set_volume). The server translates MCP client requests into Spotify API calls, enabling you to control playback, fetch your library, manage queue and playback settings, and query top tracks/artists. To use it, configure your MCP client to launch the Spotify MCP entry as shown in the example config, providing the required environment variables so the container can authenticate with Spotify and persist tokens between runs.
How to install
Prerequisites:
- Docker installed on your system
- A Spotify Developer app with Client ID, Client Secret, and Redirect URI set to http://127.0.0.1:8888/callback
- Optional: a path to persist Spotipy tokens (via a Docker volume)
Installation steps:
- Create a Spotify app and collect Client ID/Secret; ensure Redirect URI matches http://127.0.0.1:8888/callback.
- Pull or build the MCP image (example uses the prebuilt image): docker pull docker.io/allesy/spotify-mcp:latest
- Prepare environment variables for OAuth (in your MCP client config): SPOTIPY_CLIENT_ID=your-client-id SPOTIPY_CLIENT_SECRET=your-client-secret SPOTIPY_REDIRECT_URI=http://127.0.0.1:8888/callback SPOTIPY_CACHE_PATH=/app/.cache/token
- Run the MCP server via Docker (as in the config example or adapt to your MCP client):
docker run --rm -i
-v ${HOME}/.cache/spotify-mcp:/app/.cache
-e SPOTIPY_CLIENT_ID
-e SPOTIPY_CLIENT_SECRET
-e SPOTIPY_REDIRECT_URI
-e SPOTIPY_CACHE_PATH
docker.io/allesy/spotify-mcp:latest - Perform the OAuth flow following the prompts, which will save a token to the configured cache path. After that, you can restart the MCP client to start issuing Spotify commands without re-authentication.
Additional notes
Tips and considerations:
- The token cache is persisted via a Docker volume or bind mount (SPOTIPY_CACHE_PATH inside the container). Ensure the path matches what you mount on the host to survive container restarts.
- The Redirect URI must exactly match the one configured in your Spotify app.
- If you see issues with ${HOME} expansion in MCP clients, use an absolute host path for the volume mount (e.g., /Users/you/.cache/spotify-mcp:/app/.cache).
- If you need to revoke access, re-run the auth_init flow to refresh tokens.
- When using the MCP client config, remember to map the environment variables in the client’s config so that secrets aren’t hard-coded in the config.
- The server exposes a wide range of tools (Playback & Library, Discovery, Queue, and Device management); refer to the Features section in the README for the full list of available commands.
Related MCP Servers
jupyter
🪐 🔧 Model Context Protocol (MCP) Server for Jupyter.
packt-netops-ai-workshop
🔧 Build Intelligent Networks with AI
google-search-console
It connects directly to your Google Search Console account via the official API, letting you access key data right from AI tools like Claude Desktop or OpenAI Agents SDK and others .
Youtube
YouTube MCP Server is an AI-powered solution designed to revolutionize your YouTube experience. It empowers users to search for YouTube videos, retrieve detailed transcripts, and perform semantic searches over video content—all without relying on the official API. By integrating with a vector database, this server streamlines content discovery.
coder_db
An intelligent code memory system that leverages vector embeddings, structured databases, and knowledge graphs to store, retrieve, and analyze code patterns with semantic search capabilities, quality metrics, and relationship modeling. Designed to enhance programming workflows through contextual recall of best practices, algorithms, and solutions.
astrograph
An MCP server with tools to stop AI agents from writing duplicate code. Fixes legacy code using highly efficient algorithms.