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_playbackreturnsactive: falsewhen nothing is playing.
Available tools
-
add_playlist_tracks
Add tracks to a Spotify playlist by Spotify URI.
-
add_to_queue
Add a track or episode to the end of the user's Spotify queue. Requires Premium.
-
create_playlist
Create a new playlist for the connected Spotify user.
-
get_album
Get Spotify album details by ID.
-
get_artist
Get Spotify artist details by ID.
-
get_currently_playing_track
Get the track currently playing on the user's active Spotify device.
-
get_current_playback
Get information about the user's current playback state, including device and track.
-
get_playlist
Get full details for a Spotify playlist.
-
get_profile
Get the connected Spotify user profile.
-
get_top_artists
Get the user's top artists over a time range.
-
get_top_tracks
Get the user's top tracks over a time range.
-
get_track
Get Spotify track details by ID.
-
get_user_queue
Get the user's Spotify queue (currently playing plus upcoming tracks).
-
list_playlist_tracks
List tracks in a Spotify playlist.
-
list_recently_played_tracks
List tracks the user recently played on Spotify.
-
list_saved_albums
List albums saved in the user's Spotify library.
-
list_saved_shows
List podcast shows saved in the user's Spotify library.
-
list_saved_tracks
List tracks saved in the user's Spotify library.
-
list_user_playlists
List playlists owned or followed by the connected Spotify user.
-
pause_playback
Pause playback on the user's active Spotify device. Requires Premium.
-
remove_playlist_tracks
Remove tracks from a Spotify playlist.
-
remove_saved_tracks
Remove tracks from the user's Spotify library (liked songs).
-
save_tracks
Save tracks to the user's Spotify library (liked songs).
-
search
Search Spotify for tracks, albums, artists, playlists, shows, or episodes.
-
skip_to_next
Skip to the next track on the user's active Spotify device. Requires Premium.
-
skip_to_previous
Skip to the previous track on the user's active Spotify device. Requires Premium.
-
start_playback
Start or resume playback on the user's active Spotify device. Requires Premium.
-
update_playlist
Update a Spotify playlist name, description, or visibility.
MCP endpoint:
https://stackgate.ai/mcp/spotify
(HTTP) or via the
private gateway.