Spotify-MCP-Server

Spotify-MCP-Server

1

The Spotify MCP Server is a project designed to facilitate AI assistants' control over Spotify playback by using the Model-Context-Protocol (MCP). It provides a standardized interface for accessing key Spotify features through MCP tools, integrating seamlessly with AI models and bots.

🎵 Spotify MCP Server

Welcome to the Spotify MCP Server! This project enables AI assistants and other clients to control Spotify playback via the Model-Context-Protocol (MCP). It exposes Spotify functionality as MCP tools, allowing integration with AI models and bots.

Features

  • Search: Search for songs on Spotify
  • Play: Play songs on your active Spotify device
  • Pause: Pause currently playing music
  • Next Track: Skip to the next track
  • Previous Track: Go back to the previous track
  • Volume Control: Adjust the volume
  • User Info: Get current user information
  • Playlists: View your Spotify playlists
  • Now Playing: Get information about the currently playing track

Prerequisites

  • Python 3.11 or higher
  • Spotify Premium account
  • Spotify Developer credentials

Setup

  1. Clone the repo
  2. Set up a virtual environment
  3. Install dependencies

Initialization & First Run

  1. Log in to Spotify
  2. Authorize the application
  3. MCP server starts listening on port 8080

Usage

Run the MCP server and register Spotify tools such as search, playback control, and user details.

Troubleshooting

  • No active device: Ensure Spotify is open and active
  • Authentication errors: Check credentials
  • API rate limits: Avoid excessive requests

Security Notes

  • Credentials are stored locally in .env and excluded from version control