Spotify Integration for AI Agents



Spotify is a streaming service for music and podcasts with millions of tracks from artists worldwide. Enjoy personalized playlists, recommendations, and seamless listening across all your devices.
Connect Spotify without Auth hassles
We manage OAuth, API Key, token refresh, and scopes, you just build.
Try for FreeTry 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
Install Composio
pip install composio claude-agent-sdkCreate Tool Router Session
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.urlConnect to AI Agent
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())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
Use Spotify with any AI Agent Framework
Choose a Framework you want to connect Spotify with
OpenAI Agents SDK
Use Spotify MCP with OpenAI Agents SDK
Claude Agents SDK
Use Spotify MCP with Claude Agents SDK
Claude Code
Use Spotify MCP with Claude Code
Claude Cowork
Use Spotify MCP with Claude Cowork
Codex
Use Spotify MCP with Codex

OpenClaw
Use Spotify MCP with OpenClaw

Hermes
Use Spotify MCP with Hermes
CLI
Use Spotify MCP with CLI
Google ADK
Use Spotify MCP with Google ADK
Langchain
Use Spotify MCP with Langchain
AI SDK
Use Spotify MCP with AI SDK
Mastra AI
Use Spotify MCP with Mastra AI
LlamaIndex
Use Spotify MCP with LlamaIndex
CrewAI
Use Spotify MCP with CrewAI
Pydantic AI
Use Spotify MCP with Pydantic AI
Autogen
Use Spotify MCP with Autogen
Explore Other Toolkits
Amara
Amara is a collaborative platform for creating and managing subtitles and captions for videos. It helps make content accessible and multilingual for global audiences.
Cats
Cats is an API with a huge library of cat images, breed data, and cat facts. It makes finding adorable cat photos and trivia effortless for your apps and users.
Chatfai
Chatfai is an AI platform that lets users talk to AI versions of fictional characters from books, movies, and games. It offers an engaging, interactive experience for fans to chat, roleplay, and explore creative dialogues.
Frequently Asked Questions
Do I need my own developer credentials to use Spotify with Composio?
Can I use multiple toolkits together?
Is Composio secure?
What if the API changes?

Used by agents from



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





