Sponsored by Deepsite.site

Spotify Playlist Curator MCP Server

Created By
lechiffre18 months ago
MCP server that can analyze your Spotify playlists and use Claude to recommend songs based on the mood, vibe, BPM, and other musical attributes.
Content

Spotify Playlist Curator MCP Server

An MCP server that helps curate Spotify playlists by analyzing your existing tracks and using Claude AI to recommend songs based on mood, vibe, BPM, and other musical attributes.

Features

  • Connect to your Spotify account and access your playlists
  • Analyze the audio features of tracks in your playlists
  • Generate a summary of playlist mood, energy, tempo, and other characteristics
  • Get song recommendations from Claude AI based on the playlist analysis
  • Search for tracks on Spotify
  • Add recommended tracks to your playlists
  • Create new playlists

Setup

Prerequisites

  • Node.js (v14 or higher)
  • A Spotify Developer account and registered application
  • Claude access via MCP (Machine Conversation Protocol)

Installation

  1. Clone this repository:

    git clone https://github.com/lechiffre1/Spotify-Playlist-Curator-MCP-Server.git
    cd Spotify-Playlist-Curator-MCP-Server
    
  2. Install dependencies:

    npm install
    
  3. Create a .env file based on the provided .env.example:

    cp .env.example .env
    
  4. Set up your Spotify Developer credentials:

    • Go to Spotify Developer Dashboard
    • Create a new application
    • Add http://localhost:3000/callback as a Redirect URI
    • Copy your Client ID and Client Secret to the .env file
  5. Start the server:

    npm start
    

Usage

Authentication

When you start the server, you'll need to authenticate with Spotify first:

  1. Visit http://localhost:3000/login in your browser
  2. Log in with your Spotify account and authorize the application
  3. After successful authentication, you can close the browser window and return to your MCP client

MCP Methods

The following MCP methods are available:

getPlaylists

Returns a list of your Spotify playlists.

const response = await client.getPlaylists();

getPlaylistDetails

Gets detailed information about a specific playlist, including track analysis.

const response = await client.getPlaylistDetails({
  playlistId: "your_playlist_id"
});

getClaudeRecommendations

Gets song recommendations from Claude AI based on playlist analysis.

const response = await client.getClaudeRecommendations({
  playlistId: "your_playlist_id",
  count: 10 // Optional, defaults to 10
});

addRecommendationsToPlaylist

Adds recommended tracks to a playlist.

const response = await client.addRecommendationsToPlaylist({
  playlistId: "your_playlist_id",
  trackUris: ["spotify:track:id1", "spotify:track:id2", ...]
});

searchTracks

Searches for tracks on Spotify.

const response = await client.searchTracks({
  query: "search query",
  limit: 10 // Optional, defaults to 10
});

createPlaylist

Creates a new Spotify playlist.

const response = await client.createPlaylist({
  name: "My New Playlist",
  description: "Created by Spotify Playlist Curator", // Optional
  isPublic: false // Optional, defaults to false
});

Example Client Usage

import { createClient } from '@anthropic-ai/mcp-client';

async function main() {
  // Create MCP client
  const client = createClient({
    serverUrl: 'http://localhost:3000',
    anthropicApiKey: 'your_anthropic_api_key' // Required for Claude integration
  });

  // 1. Get user playlists
  const playlists = await client.getPlaylists();
  console.log('Your playlists:', playlists);

  // 2. Select a playlist and get its details
  const playlistId = playlists.playlists[0].id;
  const playlistDetails = await client.getPlaylistDetails({ playlistId });
  console.log('Playlist summary:', playlistDetails.summary);

  // 3. Get recommendations from Claude
  const recommendations = await client.getClaudeRecommendations({ playlistId });
  console.log('Claude recommendations:', recommendations.claudeRecommendations);

  // 4. Add recommendations to the playlist
  const trackUris = recommendations.claudeRecommendations
    .filter(track => track.matched)
    .map(track => track.uri);
  
  if (trackUris.length > 0) {
    const result = await client.addRecommendationsToPlaylist({ playlistId, trackUris });
    console.log('Added recommendations:', result);
  }
}

main().catch(console.error);

License

MIT

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Tavily Mcp
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
DeepChatYour AI Partner on Desktop
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
CursorThe AI Code Editor
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Serper MCP ServerA Serper MCP Server
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Playwright McpPlaywright MCP server
ChatWiseThe second fastest AI chatbot™
Amap Maps高德地图官方 MCP Server
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
WindsurfThe new purpose-built IDE to harness magic
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.