Get the FREE Ultimate OpenClaw Setup Guide →

spotify-plus

spotify mcp + lastfm / musicbrainz for search

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio omniwaifu-spotify-plus-mcp uv --directory /path/to/spotify-plus-mcp run spotify-plus-mcp \
  --env LASTFM_API_KEY="optional_api_key"

How to use

Spotify Plus MCP Server is a control plane for managing Spotify playback, searching, and playlist operations via MCP. It exposes features such as playback control (play, pause, skip, volume), comprehensive search (tracks, albums, artists, playlists), queue management, and playlist handling with pagination and full export of playlists to JSON. It also enhances metadata using integrations like Last.fm and MusicBrainz and can discover artists similar to the currently playing track. To use it, deploy the MCP server with the provided command configuration, obtain a set of Spotify credentials, authenticate to generate access tokens, and then send MCP actions to perform tasks such as retrieving tracks from a playlist, exporting an entire playlist, or updating playback state. Common actions include fetching a subset of playlist tracks with offset and limit, or exporting all tracks for a given playlist. If you need richer metadata, supply a Last.fm API key in the environment variables to enable enhanced metadata enrichment during requests.

How to install

Prerequisites:

  • Python 3.12+ installed on your system
  • Git installed
  • Spotify Developer credentials (Client ID, Client Secret, and Redirect URI configured as in the README)
  • Optional: Last.fm API key for enhanced metadata

Installation steps:

  1. Clone the MCP server repository git clone https://github.com/omniwaifu/spotify-plus-mcp.git cd spotify-plus-mcp

  2. Create and configure environment variables (example shown in the README) echo "SPOTIFY_CLIENT_ID=your_client_id" > .env echo "SPOTIFY_CLIENT_SECRET=your_client_secret" >> .env echo "SPOTIFY_REDIRECT_URI=http://127.0.0.1:8888/callback" >> .env

  3. Authenticate to generate tokens (one-time) python auth.py

    Tokens will be saved to ~/.spotify-mcp/spotify-config.json

  4. Install MCP runtime (via uv as shown in the README) and start using the MCP server

    Example runtime command from the README setup

    uv --directory /path/to/spotify-plus-mcp run spotify-plus-mcp

  5. Configure MCP (as described in the README) by adding the mcpServers entry to your main MCP config and restarting the MCP service.

Note: Ensure you replace /path/to/spotify-plus-mcp with the actual path to the checked-out repository when configuring the MCP runtime.

Additional notes

Tips and notes:

  • The server requires Spotify Premium for certain features (e.g., playback control and full playlist management).
  • If you encounter authentication issues, re-run python auth.py to refresh tokens.
  • For enhanced metadata, provide a LASTFM_API_KEY in the mcp configuration environment; this enables additional enrichment from Last.fm/MusicBrainz sources.
  • The Playlist Export feature handles pagination automatically, returning all tracks for a given playlist regardless of size.
  • When using pagination, you can request a specific page by setting offset and limit (e.g., limit: 50, offset: 100 to get tracks 101–150).
  • If you see a "No active device" error, open Spotify on any device to establish a playback target before sending playback commands.

Related MCP Servers

Sponsor this space

Reach thousands of developers