Sortune
MCP API Access

What is MCP?

Model Context Protocol (MCP) lets AI agents — like Claude, ChatGPT, or custom bots — connect to your YouTube Music library. Once connected, an agent can list playlists, search for music, add or remove tracks, and create new playlists on your behalf.

Manual setup

  1. 1Generate an API token below — this is the key your AI agent will use to authenticate.
  2. 2Copy the endpoint URL and token, then add them to your AI agent's MCP configuration.
  3. 3The agent can now call any of the available tools listed below to manage your library.

After connecting

Just tell Claude:

Organize my liked music into playlists by season, year and genre

Analyze my liked music and sort into playlists like winter-2026-ambient

Claude will read the MCP server instructions, fetch your liked tracks, classify genres for each one, group by season + year + genre, create playlists and add tracks.

Get your token from the API Token section below.

Available tools

list_playlists

Get a list of all your playlists with track counts

get_playlist_tracks

Get all tracks in a playlist with artist, genre, and metadata

create_playlist

Create a new playlist with a title and privacy setting

add_tracks_to_playlist

Add one or more videos to a playlist

remove_tracks_from_playlist

Remove tracks from a playlist by video ID

move_tracks_between_playlists

Move tracks from one playlist to another

search_youtube_music

Search YouTube Music for videos matching a query

get_track_details

Get detailed metadata for specific videos

delete_playlist

Delete a playlist

save_track_genres

Save AI-classified genres for tracks to the database

get_saved_genres

Retrieve previously classified genres from the database

mark_tracks_sorted

Mark tracks as sorted into a season-year-genre playlist