Spotify
Listening history, playback, playlists, and saved music from your Spotify account.
Overview
Connect Spotify to give AI clients context about your listening history, current playback, playlists, and saved music. Ask what's playing, explore your taste, or build playlists from natural language.
Prerequisites
- A Spotify account (Spotify Premium recommended for playback control tools)
- A stackgate.ai account
Getting credentials
- Sign in to stackgate.ai.
- Go to My Integrations and open Spotify.
- Click Activate, then Connect Spotify.
- Approve the OAuth prompt on Spotify — stackgate.ai stores your tokens securely.
No manual API keys are required.
Using with AI clients
- Dedicated endpoint:
POST /mcp/spotifywith a Sanctum bearer token - Private gateway: one config for all integrations — use
spotify__*namespaced tools
See Documentation for HTTP authentication and private gateway setup.
Troubleshooting
- 422 integration not configured — complete the OAuth connect flow in My Integrations.
- Authorization expired — disconnect and reconnect Spotify from the integration page (refresh tokens expire after extended periods).
- 403 on playback tools — playback control requires Spotify Premium and an active Spotify Connect device or open Spotify client.
- No active playback —
get-current-playback-toolreturnsactive: falsewhen nothing is playing.
Available tools
-
get-profile-tool
Get the connected Spotify user profile.
-
search-tool
Search Spotify for tracks, albums, artists, playlists, shows, or episodes.
-
get-current-playback-tool
Get information about the user's current playback state, including device and track.
-
get-currently-playing-track-tool
Get the track currently playing on the user's active Spotify device.
-
list-recently-played-tracks-tool
List tracks the user recently played on Spotify.
-
get-top-artists-tool
Get the user's top artists over a time range.
-
get-top-tracks-tool
Get the user's top tracks over a time range.
-
list-user-playlists-tool
List playlists owned or followed by the connected Spotify user.
-
get-playlist-tool
Get full details for a Spotify playlist.
-
list-playlist-tracks-tool
List tracks in a Spotify playlist.
-
list-saved-tracks-tool
List tracks saved in the user's Spotify library.
-
list-saved-albums-tool
List albums saved in the user's Spotify library.
-
list-saved-shows-tool
List podcast shows saved in the user's Spotify library.
-
get-track-tool
Get Spotify track details by ID.
-
get-album-tool
Get Spotify album details by ID.
-
get-artist-tool
Get Spotify artist details by ID.
-
get-user-queue-tool
Get the user's Spotify queue (currently playing plus upcoming tracks).
-
create-playlist-tool
Create a new playlist for the connected Spotify user.
-
add-playlist-tracks-tool
Add tracks to a Spotify playlist by Spotify URI.
-
update-playlist-tool
Update a Spotify playlist name, description, or visibility.
-
remove-playlist-tracks-tool
Remove tracks from a Spotify playlist.
-
start-playback-tool
Start or resume playback on the user's active Spotify device. Requires Premium.
-
pause-playback-tool
Pause playback on the user's active Spotify device. Requires Premium.
-
skip-to-next-tool
Skip to the next track on the user's active Spotify device. Requires Premium.
-
skip-to-previous-tool
Skip to the previous track on the user's active Spotify device. Requires Premium.
-
add-to-queue-tool
Add a track or episode to the end of the user's Spotify queue. Requires Premium.
-
save-tracks-tool
Save tracks to the user's Spotify library (liked songs).
-
remove-saved-tracks-tool
Remove tracks from the user's Spotify library (liked songs).
MCP endpoint:
https://stackgate.ai/mcp/spotify
(HTTP) or via the private gateway.