Spotify MCP Server
by addy07s
This is a Model Context Protocol (MCP) server implementation that allows AI assistants to interact with Spotify's API. The server provides endpoints for searching tracks, getting artist information, and managing playlists.
Last updated: N/A
What is Spotify MCP Server?
The Spotify MCP Server is an Express.js application that implements the Model Context Protocol (MCP) to enable AI assistants to interact with the Spotify API. It provides a set of endpoints for searching music, retrieving artist and track information, and managing user playlists.
How to use Spotify MCP Server?
To use the server, you need a Spotify Developer account and application. Configure the .env
file with your Client ID, Client Secret, and Redirect URI. Install dependencies using npm install
and start the server with npm start
. Then, you can use the available endpoints to interact with Spotify's API, as demonstrated in the example usage section.
Key features of Spotify MCP Server
Implements MCP protocol for AI assistant integration
Provides endpoints for searching tracks, artists, and albums
Offers endpoints for retrieving detailed information about artists and tracks
Supports user authentication and access to personalized data (top tracks, playlists, saved tracks)
Includes token refresh mechanism for persistent access
Uses environment variables for secure credential management
Use cases of Spotify MCP Server
Integrating Spotify functionality into AI assistants
Building voice-controlled music applications
Creating personalized music recommendations
Developing tools for managing Spotify playlists and libraries
FAQ from Spotify MCP Server
What is MCP?
What is MCP?
Model Context Protocol, a protocol for AI assistants to interact with external services.
Do I need a Spotify Premium account?
Do I need a Spotify Premium account?
While the server itself doesn't require a Premium account, some Spotify API functionalities might.
How do I handle user authentication?
How do I handle user authentication?
The server provides /mcp/auth/login
and /callback
endpoints for handling Spotify OAuth.
How do I refresh access tokens?
How do I refresh access tokens?
Use the /mcp/auth/refresh
endpoint with the refresh token.
Is the server secure?
Is the server secure?
The server uses environment variables for sensitive credentials. Ensure your .env
file is secure and never committed to version control.