Skip to content

GraysonCAdams/spotify-mcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spotify-mcp

An MCP (Model Context Protocol) server for Spotify. Control playback, search for music, manage playlists, and get personalized recommendations -- all through any MCP-compatible client like Claude.

Tools

Tool Description
auth-spotify Authenticate with Spotify via OAuth
search-spotify Search for tracks, albums, artists, or playlists
get-current-playback Get the current playback state (track, device, progress)
play-track Play a specific track on an active device
pause-playback Pause playback
next-track Skip to the next track
previous-track Skip to the previous track
get-user-playlists List the user's playlists
create-playlist Create a new playlist
add-tracks-to-playlist Add tracks to a playlist
get-playlist-tracks Get the tracks in a playlist
rename-playlist Rename a playlist (and optionally update description/visibility)
unfollow-playlist Unfollow (or delete) a playlist
get-recommendations Get track recommendations based on seed tracks, artists, or genres
get-top-tracks Get the user's top played tracks over a time range

Environment Variables

Variable Required Description
SPOTIFY_CLIENT_ID Yes Spotify app client ID
SPOTIFY_CLIENT_SECRET Yes Spotify app client secret
SPOTIFY_REDIRECT_URI No OAuth redirect URI (defaults to http://127.0.0.1:8888/callback)

Create a Spotify app at developer.spotify.com and add your redirect URI to the app's settings.

Setup

npm ci

Usage

Stdio mode (for MCP clients that launch the server directly)

node build/index.js

HTTP mode (using mcp-proxy)

mcp-proxy --port 8002 -- node build/index.js

Authentication

On first use, call the auth-spotify tool. It will open a browser window for Spotify OAuth. Tokens are persisted to ~/.spotify-mcp/tokens.json so you only need to authenticate once.

License

MIT

About

MCP server for Spotify — playback control, search, and playlists

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors