Strider Spotify Connector
MCP connector for Spotify playback control and music management. Part of the Strider Labs action execution layer for AI agents.
Installation
npm install @striderlabs/mcp-spotify
MCP Configuration
Add to your MCP client configuration (Claude Desktop, Cursor, etc.):
{
"mcpServers": {
"spotify": {
"command": "npx",
"args": ["-y", "@striderlabs/mcp-spotify"]
}
}
}
Available Tools
spotify.search
Search for tracks, albums, artists, or playlists.
Input Schema:
{
"query": "string",
"type": "track | album | artist | playlist (optional, default: track)",
"limit": "number (optional, default: 10)"
}
Output:
{
"results": [{
"id": "string",
"name": "string",
"artist": "string",
"album": "string",
"uri": "string"
}]
}
spotify.play
Start playback of a track, album, or playlist.
Input:
{
"uri": "string (Spotify URI)",
"device_id": "string (optional)"
}
spotify.pause / spotify.resume
Control playback state.
spotify.next / spotify.previous
Skip to next or previous track.
spotify.get_current_track
Get details about what's currently playing.
spotify.add_to_playlist
Add tracks to a user's playlist.
Input:
{
"playlist_id": "string",
"track_uris": ["string"]
}
spotify.create_playlist
Create a new playlist.
spotify.get_recommendations
Get song recommendations based on seed tracks, artists, or genres.
Authentication
First use triggers OAuth authorization flow:
- User is redirected to Spotify to authorize
- Tokens are stored encrypted per-user
- Automatic refresh handles token expiration
Requires Spotify Premium for full playback control.
Usage Examples
Play some music:
Play "Bohemian Rhapsody" by Queen on Spotify
Discover new music:
Find me songs similar to what I've been listening to lately
Manage playlists:
Add the current song to my "Workout" playlist on Spotify
Control playback:
Skip to the next track on Spotify
Error Handling
| Code | Meaning | Action |
|---|---|---|
| AUTH_EXPIRED | Session expired | Re-authenticate |
| RATE_LIMITED | API quota exceeded | Retry after delay |
| PREMIUM_REQUIRED | Feature needs Premium | Notify user |
| NO_ACTIVE_DEVICE | No playback device | User must open Spotify |
Use Cases
- Hands-free control: play music without touching your phone
- Music discovery: get recommendations based on mood or activity
- Playlist curation: build playlists through conversation
- Party DJ: queue up songs while entertaining
Notes
- Playback control requires an active Spotify device (phone, computer, speaker)
- Some features require Spotify Premium subscription
- Search and playlist management work with free accounts
Links
- npm: https://npmjs.com/package/@striderlabs/mcp-spotify
- Strider Labs: https://striderlabs.ai
- Spotify Web API: https://developer.spotify.com/documentation/web-api
