Spotify MCP Server logo

Spotify MCP Server

by KaanCL

The Spotify MCP Server enables AI assistants and other clients to control Spotify playback via a standardized protocol using the Model-Context-Protocol (MCP) architecture. It exposes Spotify functionality as MCP tools, making it accessible to any MCP-compatible client.

View on GitHub

Last updated: N/A

What is Spotify MCP Server?

The Spotify MCP Server is a project that exposes Spotify functionality as MCP tools, allowing AI models and assistants to interact with Spotify through a standardized interface.

How to use Spotify MCP Server?

To use the server, you need to clone the repository, set up a virtual environment, install dependencies, configure your Spotify API credentials, and run the server. Then, you can use an MCP-compatible client to call the exposed tools.

Key features of Spotify MCP Server

  • Search for songs

  • Play/Pause/Resume playback

  • Control volume

  • Get user information

  • View playlists

  • Get currently playing track information

  • Next/Previous track

  • Standardized MCP interface

Use cases of Spotify MCP Server

  • Controlling Spotify with AI assistants

  • Integrating Spotify into custom applications

  • Automating Spotify playback

  • Building Spotify bots

  • Voice-controlled music playback

FAQ from Spotify MCP Server

What is MCP?

Model-Context-Protocol (MCP) is a framework that allows AI models and assistants to interact with external tools and services through a standardized interface.

What are the prerequisites for running the server?

You need Python 3.11 or higher, a Spotify Premium account, and Spotify Developer credentials.

How do I configure my Spotify credentials?

Create a Spotify application at the Spotify Developer Dashboard, get your Client ID and Client Secret, and create a .env file in the project root with your credentials.

What happens when I run the server for the first time?

A browser window will open asking you to log in to your Spotify account and authorize the application to access your Spotify account.

How do I handle errors?

All API responses are returned as JSON objects. If an error occurs, the response will include an 'error' key with a descriptive message. Always check for the 'error' key in responses before using the data.