playlist-agent
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@playlist-agent generate a playlist for a road trip"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Playlist MCP Agent
Create, manage, and optimize Spotify playlists through natural language using AI and MCP.
Prerequisites
Python 3.12+
Spotify Developer app
Create an app at https://developer.spotify.com/dashboard
Copy the Client ID and Client Secret
Add redirect URI:
http://127.0.0.1:8888/callbackAdd your Spotify account under User Management (required for write operations in Development Mode)
Related MCP server: spotify-mcp
Setup
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev,llm]"
cp .env.example .env
# Edit .env with your Spotify credentialsAuthenticate with Spotify
Run once to save a refresh token locally:
python authenticate.pyTokens are stored at:
~/.playlist_agent/tokens.jsonRun the MCP Server
Streamable HTTP (Recommended)
python server.py --httpServer URL:
http://127.0.0.1:8080/mcpStdio Mode (Claude Desktop)
python server.py --stdioConnect to Claude Desktop
Edit:
~/Library/Application Support/Claude/claude_desktop_config.jsonAdd:
{
"mcpServers": {
"playlistAgent": {
"command": "/absolute/path/to/.venv/bin/python",
"args": [
"/absolute/path/to/server.py",
"--stdio"
]
}
}
}Example:
{
"mcpServers": {
"playlistAgent": {
"command": "/Users/amankumar/Documents/projects/playlistAgent/.venv/bin/python",
"args": [
"/Users/amankumar/Documents/projects/playlistAgent/server.py",
"--stdio"
]
}
}
}Restart Claude Desktop after updating the configuration.
Verify Claude Connection
Check logs:
~/Library/Logs/Claude/Successful startup should show:
Server started and connected successfullyConnect to Cursor
Add an MCP server with:
Type: MCP (Streamable HTTP)
URL:
http://127.0.0.1:8080/mcp
Example Cursor config:
{
"mcpServers": {
"playlist-agent": {
"url": "http://127.0.0.1:8080/mcp"
}
}
}MCP Tools
Tool | Description |
spotify_login | Check Spotify auth status |
search_track | Search Spotify tracks |
create_playlist | Create a new playlist |
add_tracks | Add tracks to a playlist |
get_playlist | Fetch playlist metadata and tracks |
generate_playlist | Generate a playlist from a natural-language prompt |
remove_tracks | Remove tracks from a playlist |
modify_playlist | Edit a playlist using natural language |
analyze_playlist | Analyze mood, energy, and diversity |
recommend_tracks | Recommend tracks based on a playlist |
optimize_playlist | Improve a playlist for energy, calm, or diversity |
Smoke Test (Phase 1)
After authenticating:
python smoke_test.pyTests
pytestIntegration tests:
RUN_INTEGRATION=1 pytest -m integrationRequires a valid Spotify authentication setup.
Environment Variables
See .env.example for all supported options.
LLM generation (Phase 3+) requires:
LLM_PROVIDER=openaior
LLM_PROVIDER=anthropicand the corresponding API key.
Architecture
Claude / Cursor / ChatGPT
│
▼
PlaylistAgent MCP
│
┌───────┼────────┐
▼ ▼ ▼
Spotify LLM Recommendation
API Provider EngineRoadmap
Phase 1
Spotify OAuth
Search tracks
Create playlists
Add tracks
Phase 2
MCP integration
Claude Desktop support
Cursor support
Phase 3
AI playlist generation
Mood and genre understanding
Phase 4
Playlist editing
Playlist optimization
Recommendation engine
Phase 5
Taste profile engine
Personalized playlist memory
Advanced music discovery
Available Tools
12 toolsadd_tracksAdd TracksC
Add tracks to an existing playlist, skipping duplicates.
Inputs: track_uris (required), playlist_id (required). Returns: object
analyze_playlistAnalyze PlaylistC
Analyze playlist mood, energy, valence, and artist diversity.
Inputs: playlist_id (required). Returns: object
create_playlistCreate PlaylistC
Create a Spotify playlist and optionally add track URIs.
Inputs: name (required), public, track_uris, description. Returns: object
generate_playlistGenerate PlaylistC
Generate a playlist from a natural-language prompt using an LLM.
Inputs: name (required), prompt (required), public, target_length. Returns: object
get_playlistGet PlaylistC
Get playlist metadata and optionally its tracks.
Inputs: playlist_id (required), include_tracks. Returns: object
get_user_preferencesGet User PreferencesA
Return accumulated taste profile from past playlist activity.
Inputs: no named parameters. Returns: object
modify_playlistModify PlaylistC
Modify an existing playlist using a natural-language instruction.
Inputs: instruction (required), playlist_id (required). Returns: object
optimize_playlistOptimize PlaylistC
Improve a playlist for energy, calm, or diversity.
Inputs: playlist_id (required), goal. Returns: object
recommend_tracksRecommend TracksC
Recommend tracks based on an existing playlist.
Inputs: playlist_id (required), limit, target_energy, target_valence, +1 more. Returns: object
remove_tracksRemove TracksB
Remove tracks from a playlist by Spotify track URI.
Inputs: track_uris (required), playlist_id (required). Returns: object
search_trackSearch TrackC
Search Spotify for tracks matching a query.
Inputs: query (required), limit. Returns: object
spotify_loginSpotify LoginC
Check Spotify authentication status and token location.
Inputs: no named parameters. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Most tools target distinct resource+action pairs (search, add, remove, analyze, recommend). The main overlap is among create_playlist, generate_playlist, modify_playlist, and optimize_playlist, which all end up editing/creating playlists; descriptions help but an agent could still hesitate between modify_playlist (NL instruction) and optimize_playlist (energy/calm/diversity).
The set is consistently snake_case verb_noun (create_playlist, add_tracks, get_playlist, remove_tracks, etc.). The only deviation is spotify_login, which uses a noun-prefix form rather than a verb, but it remains readable and unambiguous.
Twelve tools is well within a comfortable range for a playlist agent, and each one maps to a distinct capability (auth, search, CRUD on playlists/tracks, generation, analysis, recommendation, personalization). No obvious filler tools.
Core lifecycle is covered: create, get, modify, add/remove tracks, plus generation and analysis. However, there is no list_playlists (to discover existing playlists) and no delete_playlist, which are notable gaps for a playlist management server and will force agents into dead ends.
Related MCP Connectors
Spotify MCP server for ChatGPT, Claude and any AI agent: search songs and artists, list playlists, read playlist songs, create playlist, add songs to playlist, remove songs from playlist, set playlist public or private and save to Liked Songs in your own Spotify account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Spotify yourself; Cotlet does not store your password and you need no Spotify API key. About the official Spotify API: Spotify has a full Web API and, since 23 Apr 2026, an official connector for Claude (checked 5 Nov 2026). The API needs an app you register, and in development mode the app owner must have Premium and the app allows 5 users; unlimited users need a registered business with at least 250,000 monthly users. Setup and FAQ: https://cotlet.dev/integrations/spotify-api-mcp-server
Manage Superlist tasks and lists in plain language from any MCP-compatible AI agent.
AI playlist engine that turns music prompts into real YouTube playlists and filters bad versions.
Generate AI music via the Lacuna Music API from MCP clients like Claude Desktop & Code.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables creating and managing Spotify playlists using natural language with advanced similarity matching across 8 different algorithms. Supports finding similar tracks based on audio features, mood, energy, genre, and custom weighted parameters to build personalized playlists automatically.92MIT
- AlicenseBqualityDmaintenanceAn MCP server that enables users to control Spotify playback, search music, and manage playlists through natural conversation. It is updated for the February 2026 Spotify Web API changes and supports full playlist CRUD operations.68MIT
- AlicenseAqualityCmaintenanceMCP server for Spotify that enables playlist building and music discovery through 19 tools, allowing LLM agents to search tracks/artists/albums, manage playlists, control playback, and access personal listening data.2031 PyPI1MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to create, manage, and populate Spotify playlists using the Spotify Web API.3MIT