Spotify MCP for AI Agents

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with Spotify MCP or direct API to search tracks, manage playlists, control playback, and discover new music through natural language.
Trusted by
AWS
Glean
Zoom
Airtable

30 min · no commitment · see it on your stack

Spotify Logo
Gradient Top
Gradient Middle
Gradient Bottom
divider

Try Spotify now

Enter a prompt below to test the integration in our Tool Router playground. You'll be redirected to sign in and try it live.

Supported Tools and Triggers

Tools
Triggers
Add items to playlistAdd one or more items to a user's playlist.
Add item to playback queueAdd an item to the end of the user's current playback queue.
Change playlist detailsChange a playlist's name and public/private state.
Check if user follows artists or usersCheck to see if the current user is following one or more artists or other Spotify users.
Check if users follow playlistCheck if the current authenticated user is following a specified playlist.
Check user s saved albumsCheck if one or more albums is already saved in the current Spotify user's 'Your Music' library.
Check user s saved audiobooksCheck if one or more audiobooks are already saved in the current Spotify user's library.
Check User's Saved EpisodesCheck if one or more podcast episodes are saved in the current Spotify user's 'Your Episodes' library.
Check user's saved showsCheck if one or more shows is already saved in the current Spotify user's library.
Check User's Saved TracksCheck if one or more tracks is already saved in the current Spotify user's 'Your Music' library.
Create playlistCreate a playlist for a Spotify user.
Follow artists or usersFollow one or more artists or Spotify users on behalf of the current authenticated user.
Follow playlistAdd the current user as a follower of a playlist.
Get a chapterGet Spotify catalog information for a single audiobook chapter including name, description, duration, release date, narrators, and playback information.
Get Album DetailsGet Spotify catalog information for a single album.
Get album tracksGet Spotify catalog information about an album's tracks.
Get an audiobookGet Spotify catalog information for a single audiobook.
Get artistGet detailed Spotify catalog information for a single artist.
Get artist s albumsGet Spotify catalog information about an artist's albums.
Get artist s related artistsGet Spotify catalog information about artists similar to a given artist.
Get Artist's Top TracksGet Spotify catalog information about an artist's top tracks by country/market.
Get audiobook chaptersGet Spotify catalog information about an audiobook's chapters.
Get Available DevicesGet information about the user's available Spotify Connect devices.
Get available marketsGet the list of markets where Spotify is available.
Get currently playing trackGet the object currently being played on the user's Spotify account.
Get current user s playlistsGet a list of the playlists owned or followed by the current Spotify user.
Get current user s profileGet detailed profile information about the current authenticated user.
Get episodeGet Spotify catalog information for a single podcast episode identified by its unique Spotify ID.
Get featured playlistsGet a list of Spotify's editorially curated featured playlists.
Get followed artistsGet all artists followed by the current user.
Get new releasesGet a list of new album releases featured in Spotify (shown, for example, on a Spotify player's "Browse" tab).
Get playback stateGet information about the user's current playback state, including track or episode, progress, and active device.
Get playlistGet a playlist owned by a Spotify user.
Get playlist cover imageGet the current image(s) associated with a specific playlist.
Get playlist itemsGet full details of the items of a playlist owned by a Spotify user.
Get recently played tracksGet tracks from the current user's recently played tracks.
Get recommendationsGet track recommendations based on seed artists, genres, and/or tracks.
Get several albumsGet Spotify catalog information for multiple albums identified by their Spotify IDs.
Get several artistsGet Spotify catalog information for several artists based on their Spotify IDs.
Get several audiobooksRetrieve Spotify catalog information for multiple audiobooks in a single request.
Get several browse categoriesGet a list of categories used to tag items in Spotify (on, for example, the Spotify player's "Browse" tab).
Get several chaptersGet Spotify catalog information for several audiobook chapters identified by their Spotify IDs.
Get several episodesGet Spotify catalog information for several episodes based on their Spotify IDs.
Get several showsGet Spotify catalog information for several shows (podcasts) based on their Spotify IDs.
Get several tracksGet Spotify catalog information for multiple tracks based on their Spotify IDs.
Get showGet Spotify catalog information for a single show (podcast) identified by its unique Spotify ID.
Get show episodesGet Spotify catalog information about a show's episodes.
Get single browse categoryGet a single category used to tag items in Spotify (on, for example, the Spotify player's "Browse" tab).
Get the user's queueGet the list of tracks and episodes in the user's playback queue.
Get trackGet Spotify catalog information for a single track identified by its unique Spotify ID.
Get Track's Audio AnalysisGet a comprehensive audio analysis for a Spotify track.
Get user's playlistsGet a paginated list of playlists owned or followed by a Spotify user.
Get user's profileGet public profile information about a Spotify user.
Get user s saved albumsGet a list of albums saved in the current Spotify user's library ('Your Music').
Get user s saved audiobooksGet a list of the audiobooks saved in the current Spotify user's 'Your Music' library.
Get user's saved episodesGet a list of episodes saved in the current Spotify user's library.
Get User's Saved ShowsGet a list of shows saved in the current Spotify user's library.
Get User's Saved TracksGet a list of the songs saved in the current Spotify user's 'Your Music' library.
Get User's Top ArtistsGet the current user's top artists based on calculated affinity.
Get User's Top TracksGet the current user's top tracks based on calculated affinity.
Pause playbackPause playback on the user's account.
Remove playlist itemsRemove one or more items from a user's playlist.
Remove users saved albumsRemove one or more albums from the current user's 'Your Music' library.
Remove User's Saved AudiobooksRemove one or more audiobooks from the current user's Spotify library.
Remove user's saved episodesRemove one or more episodes from the current user's library.
Remove user s saved showsDelete one or more shows from current Spotify user's library.
Remove user s saved tracksRemove one or more tracks from the current user's 'Your Music' library.
Save albums for current userSave one or more albums to the current user's 'Your Music' library.
Save audiobooks for current userSave one or more audiobooks to the current user's library.
Save episodes for current userSave one or more podcast episodes to the current user's library.
Save shows for current userSave one or more shows to current Spotify user's library.
Save tracks for current userSave one or more tracks to the current user's 'Your Music' library.
Search for itemGet Spotify catalog information about albums, artists, playlists, tracks, shows, episodes or audiobooks that match a keyword string.
Seek to positionSeek to a specific position in the user's currently playing track.
Set playback volumeSet the volume for the user's current playback device.
Set repeat modeSet the repeat mode for the user's playback.
Skip to nextSkips to next track in the user's queue.
Skip to previousSkips to the previous track in the user's queue.
Start resume playbackStart a new context or resume current playback on the user's active device.
Toggle playback shuffleToggle shuffle on or off for user's playback.
Transfer playbackTransfer playback to a new device and optionally begin playback.
Unfollow artists or usersRemove the current user as a follower of one or more artists or other Spotify users.
Unfollow playlistRemove the current user as a follower of a playlist.
Update playlist itemsEither replace all tracks in a playlist OR reorder existing tracks within it.
Python
TypeScript

Install Composio

python
pip install composio claude-agent-sdk
Install the Composio SDK and Claude Agent SDK

Create Tool Router Session

python
from composio import Composio
from claude_agent_sdk import ClaudeSDKClient, ClaudeAgentOptions

composio = Composio(api_key='your-composio-api-key')
session = composio.create(user_id='your-user-id')
url = session.mcp.url
Initialize the Composio client and create a Tool Router session

Connect to AI Agent

python
import asyncio

options = ClaudeAgentOptions(
    permission_mode='bypassPermissions',
    mcp_servers={
        'tool_router': {
            'type': 'http',
            'url': url,
            'headers': {
                'x-api-key': 'your-composio-api-key'
            }
        }
    },
    system_prompt='You are a helpful assistant with access to Spotify tools.',
    max_turns=10
)

async def main():
    async with ClaudeSDKClient(options=options) as client:
        await client.query('Add these tracks to my playlist called Chill Vibes')
        async for message in client.receive_response():
            if hasattr(message, 'content'):
                for block in message.content:
                    if hasattr(block, 'text'):
                        print(block.text)

asyncio.run(main())
Use the MCP server with your AI agent

Why Use Composio?

AI Native Spotify Integration

  • Supports both Spotify MCP and direct API based integrations
  • Structured, LLM-friendly schemas for reliable tool execution
  • Rich coverage for searching, playing, and managing your Spotify music and podcasts

Managed Auth

  • Built-in OAuth handling with automatic token refresh and rotation
  • Central place to manage, scope, and revoke Spotify access
  • Per user and per environment credentials instead of hard-coded keys

Agent Optimized Design

  • Tools are tuned using real error and success rates to improve reliability over time
  • Comprehensive execution logs so you always know what ran, when, and on whose behalf

Enterprise Grade Security

  • Fine-grained RBAC so you control which agents and users can access Spotify
  • Scoped, least privilege access to Spotify resources
  • Full audit trail of agent actions to support review and compliance

Frequently Asked Questions

Do I need my own developer credentials to use Spotify with Composio?

Yes, Spotify requires you to configure your own OAuth credentials. Once set up, Composio handles token storage, refresh, and lifecycle management for you.

Can I use multiple toolkits together?

Yes! Composio's Tool Router enables agents to use multiple toolkits. Learn more.

Is Composio secure?

Composio is SOC 2 and ISO 27001 compliant with all data encrypted in transit and at rest. Learn more.

What if the API changes?

Composio maintains and updates all toolkit integrations automatically, so your agents always work with the latest API versions.

Used by agents from

Context
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai
Context
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai
Context
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai

Never worry about agent reliability

We handle tool reliability, observability, and security so you never have to second-guess an agent action.