Spotify Playlist Curator MCP Server

Spotify Playlist Curator MCP Server

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

lechiffre1

Research & Data
Visit Server

README

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

Recommended Servers

Crypto Price & Market Analysis MCP Server

Crypto Price & Market Analysis MCP Server

A Model Context Protocol (MCP) server that provides comprehensive cryptocurrency analysis using the CoinCap API. This server offers real-time price data, market analysis, and historical trends through an easy-to-use interface.

Featured
TypeScript
MCP PubMed Search

MCP PubMed Search

Server to search PubMed (PubMed is a free, online database that allows users to search for biomedical and life sciences literature). I have created on a day MCP came out but was on vacation, I saw someone post similar server in your DB, but figured to post mine.

Featured
Python
dbt Semantic Layer MCP Server

dbt Semantic Layer MCP Server

A server that enables querying the dbt Semantic Layer through natural language conversations with Claude Desktop and other AI assistants, allowing users to discover metrics, create queries, analyze data, and visualize results.

Featured
TypeScript
mixpanel

mixpanel

Connect to your Mixpanel data. Query events, retention, and funnel data from Mixpanel analytics.

Featured
TypeScript
Sequential Thinking MCP Server

Sequential Thinking MCP Server

This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.

Featured
Python
Nefino MCP Server

Nefino MCP Server

Provides large language models with access to news and information about renewable energy projects in Germany, allowing filtering by location, topic (solar, wind, hydrogen), and date range.

Official
Python
Vectorize

Vectorize

Vectorize MCP server for advanced retrieval, Private Deep Research, Anything-to-Markdown file extraction and text chunking.

Official
JavaScript
Mathematica Documentation MCP server

Mathematica Documentation MCP server

A server that provides access to Mathematica documentation through FastMCP, enabling users to retrieve function documentation and list package symbols from Wolfram Mathematica.

Local
Python
kb-mcp-server

kb-mcp-server

An MCP server aimed to be portable, local, easy and convenient to support semantic/graph based retrieval of txtai "all in one" embeddings database. Any txtai embeddings db in tar.gz form can be loaded

Local
Python
Research MCP Server

Research MCP Server

The server functions as an MCP server to interact with Notion for retrieving and creating survey data, integrating with the Claude Desktop Client for conducting and reviewing surveys.

Local
Python