Spotify Playlist Generator Mcp Server

by danisss9

286 downloads Not rated yet
GitHub

About

A Model Context Protocol (MCP) server that enables AI applications to search for YouTube music videos and manage playlists using the official YouTube Data API v3.

Explore

- Search Music Tracks: Find music tracks on Spotify with customizable search parameters
- Get Track Details: Retrieve comprehensive information about specific tracks
- Get Playlist Tracks: List tracks from playlists
- Playlist Management: Complete playlist management including creating, editing, and managing playlists (requires OAuth setup)

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Spotify Playlist Generator Mcp Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

- Node.js 18 or higher
- A Spotify Developer Account
- Spotify App credentials (Client ID and Client Secret)

For development with auto-rebuild:

npm run dev

For production:

npm start

Add to your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "spotify-playlist-generator": {
      "command": "node",
      "args": ["/absolute/path/to/spotify-playlist-generator/build/index.js"],
      "env": {
        "SPOTIFY_CLIENT_ID": "your_client_id_here",
        "SPOTIFY_CLIENT_SECRET": "your_client_secret_here"
      }
    }
  }
}

To use this MCP server with GitHub Copilot in Visual Studio Code, you need to configure it in your VS Code settings:

1. Open VS Code Settings: Press Ctrl+, (Windows/Linux) or Cmd+, (macOS)

2. Search for MCP: Type "mcp" in the search bar

3. Add MCP Server Configuration: Add the following to your VS Code settings JSON:

{
  "github.copilot.chat.mcp.servers": {
    "spotify-playlist-generator": {
      "command": "node",
      "args": ["/absolute/path/to/spotify-playlist-generator/build/index.js"],
      "env": {
        "SPOTIFY_CLIENT_ID": "your_client_id_here",
        "SPOTIFY_CLIENT_SECRET": "your_client_secret_here"
      }
    }
  }
}

Alternative: Use Settings UI

1. Go to File > Preferences > Settings (or use Ctrl+,)
2. Search for "GitHub Copilot MCP"
3. Click "Edit in settings.json" next to "Github › Copilot › Chat: Mcp Servers"
4. Add the server configuration as shown above

Environment Variables Setup

For security, you can also set environment variables system-wide instead of in the config:

Windows (PowerShell):

[Environment]::SetEnvironmentVariable("SPOTIFY_CLIENT_ID", "your_client_id_here", "User")
[Environment]::SetEnvironmentVariable("SPOTIFY_CLIENT_SECRET", "your_client_secret_here", "User")

Windows (Command Prompt):

setx SPOTIFY_CLIENT_ID "your_client_id_here"
setx SPOTIFY_CLIENT_SECRET "your_client_secret_here"

macOS/Linux:

export SPOTIFY_CLIENT_ID="your_client_id_here"
export SPOTIFY_CLIENT_SECRET="your_client_secret_here"

For all functionality, you need to set up OAuth 2.0 with Spotify:

1. Go to Spotify Developer Dashboard
2. Log in with your Spotify account
3. Click "Create an App"
4. Fill in app name and description
5. Add http://localhost:8888/callback to redirect URIs
6. Copy your Client ID and Client Secret

Add your OAuth credentials to the .env file:

bash
SPOTIFY_CLIENT_ID=your_client_id_here
SPOTIFY_CLIENT_SECRET=your_client_secret_here
``

1. Use the authenticate_spotify tool with getAuthUrl: true
2. Open the provided URL in your browser
3. Sign in to your Spotify account and grant permissions
4. Copy the authorization code from the callback URL
5. Use
authenticate_spotify tool again with the authCode` parameter

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "spotify playlist generator mcp server": {
            "spotify-playlist-generator": {
                "command": "node",
                "args": [
                    "/absolute/path/to/spotify-playlist-generator/build/index.js"
                ],
                "env": {
                    "SPOTIFY_CLIENT_ID": "your_client_id_here",
                    "SPOTIFY_CLIENT_SECRET": "your_client_secret_here"
                }
            }
        }
    }
}

McpServers

{
    "spotify-playlist-generator": {
        "command": "node",
        "args": [
            "/absolute/path/to/spotify-playlist-generator/build/index.js"
        ],
        "env": {
            "SPOTIFY_CLIENT_ID": "your_client_id_here",
            "SPOTIFY_CLIENT_SECRET": "your_client_secret_here"
        }
    }
}

A Model Context Protocol (MCP) server that enables AI applications to search for music tracks and manage playlists using the official Spotify Web API.

Features

- Search Music Tracks: Find music tracks on Spotify with customizable search parameters
- Get Track Details: Retrieve comprehensive information about specific tracks
- Get Playlist Tracks: List tracks from playlists
- Playlist Management: Complete playlist management including creating, editing, and managing playlists (requires OAuth setup)

Setup

Prerequisites

- Node.js 18 or higher
- A Spotify Developer Account
- Spotify App credentials (Client ID and Client Secret)

Installation

1. Clone this repository:

git clone https://github.com/danisss9/spotify-playlist-generator-mcp-server

2. Install dependencies:

npm install

3. Create a Spotify App:
- Go to the Spotify Developer Dashboard
- Create a new app
- Note down your Client ID and Client Secret
- Add http://localhost:8888/callback to your redirect URIs

4. Set up environment variables:
```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.