Spotify MCP Server
A Model Context Protocol (MCP) server that enables AI assistants like Claude to interact with Spotify's API through a standardized tool interface.
Features
- Playlist Management: Create playlists and add tracks
- Search: Find songs, albums, and artists
- Library Operations: Save tracks and albums to your library
- OAuth 2.0 Authentication: Secure credential handling
Setup
- Clone this repository
-
Create a Spotify application and get API credentials:
- Visit https://developer.spotify.com/dashboard
- Create a new app and note your CLIENT_ID and CLIENT_SECRET -
Configure credentials:```
cp client.example.py client.py
# Add your CLIENT_ID and CLIENT_SECRET to client.py
4. Authenticate with Spotify:```
python spotify_auth.py
- Set up the environment:```
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
uv add mcp[cli] httpx
6. Run the MCP server:```
uv run spotify.py
- Add to Claude Desktop configuration (see MCP documentation)
Architecture
Built using the Model Context Protocol standard, this server demonstrates:
AI service gateway patterns for LLM integrations
Modular tool design for extensibility
Secure OAuth 2.0 authentication flows
Requirements
- Python 3.x
- Spotify account
- Claude Desktop (or other MCP-compatible client)
