Labsco
danisss9 logo

YouTube Playlist Generator MCP Server

โ˜… 2

from danisss9

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.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedAccount requiredAdvanced setup

Spotify Playlist Generator MCP Server

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)

Available Tools

OAuth-Required Tools (All features require authentication)

authenticate_spotify

Authenticate with Spotify OAuth to enable music search and playlist management features.

Parameters:

  • getAuthUrl (boolean, default: false): Set to true to get the authorization URL
  • authCode (string, optional): Authorization code from OAuth flow

get_auth_status

Check current Spotify authentication status.

Parameters: None

search_tracks

Search Spotify for music tracks.

Parameters:

  • query (string): Search query for tracks
  • limit (number, 1-50, default: 20): Maximum number of results
  • market (string, optional): ISO 3166-1 alpha-2 country code to filter results

get_track_details

Get detailed information about a specific Spotify track.

Parameters:

  • trackId (string): Spotify track ID
  • market (string, optional): ISO 3166-1 alpha-2 country code for market

create_playlist

Create a new Spotify playlist (requires authentication).

Parameters:

  • name (string): Playlist name
  • description (string, optional): Playlist description
  • public (boolean, default: false): Whether the playlist should be public
  • collaborative (boolean, default: false): Whether the playlist should be collaborative

edit_playlist

Edit existing playlist information (requires authentication).

Parameters:

  • playlistId (string): ID of the playlist to edit
  • name (string, optional): New name for the playlist
  • description (string, optional): New description for the playlist
  • public (boolean, optional): New public setting
  • collaborative (boolean, optional): New collaborative setting

Note: At least one field (name, description, public, or collaborative) must be provided to update.

add_to_playlist

Add tracks to a Spotify playlist (requires authentication).

Parameters:

  • playlistId (string): Target playlist ID
  • trackUris (array of strings): Array of Spotify track URIs to add
  • position (number, optional): Position to insert tracks (0-based index)

list_playlists

List user's Spotify playlists (requires authentication).

Parameters:

  • limit (number, 1-50, default: 20): Maximum number of playlists
  • offset (number, min: 0, default: 0): Index offset for pagination

get_playlist_tracks

Get tracks from a Spotify playlist (requires authentication).

Parameters:

  • playlistId (string): ID of the playlist to get tracks from
  • limit (number, 1-100, default: 50): Maximum number of tracks to return
  • offset (number, min: 0, default: 0): Index offset for pagination

remove_from_playlist

Remove tracks from a Spotify playlist (requires authentication).

Parameters:

  • playlistId (string): ID of the playlist to remove tracks from
  • trackUris (array of strings): Array of Spotify track URIs to remove
  • snapshotId (string, optional): Playlist snapshot ID for version control

Development

Building

npm run build

Development Mode

npm run dev

Project Structure

src/
โ””โ”€โ”€ index.ts          # Main server implementation

build/                # Compiled JavaScript output

Security Considerations

  • Never commit API keys to version control
  • Use environment variables for sensitive configuration
  • Validate all user inputs
  • Implement proper error handling and logging
  • Be mindful of Spotify's API terms of service

This project was created using GitHub Copilot