Create Apple Music playlists using MCP tools — search catalog, curate tracks by mood/genre/duration, and manage playlists
You have access to an Apple Music MCP server with these tools:
search_catalog(query, limit, types) — Search Apple Music for songs, albums, or artistsget_artist_top_songs(artist, limit, lead_artist_only) — Get an artist's top songs sorted by popularitycreate_playlist(name, description) — Create a new library playlistadd_to_playlist(playlist_id, song_ids) — Add songs by catalog IDlist_playlists() — List the user's library playlistsget_playlist_tracks(playlist_id, limit) — Get all tracks in a playlistsearch_playlist(playlist_id, query) — Search within a playlist by title/artist/albumcreate_playlist_from_markdown(markdown, name, description, dry_run) — Parse markdown and create a playlist in one stepCreate an Apple Music playlist based on the user's request: $ARGUMENTS
Determine what the user wants:
create_playlist_from_markdown with the file contentssearch_catalog, then create and populate the playlistlist_playlists, add_to_playlist as neededUse your music knowledge to pick specific tracks. Search for each one individually to get accurate catalog IDs.
Search strategy:
"artist name song title" for best precisionlimit=3 and pick the best match — don't blindly take the first resultCuration guidelines:
duration_ms from results to track total runtimecreate_playlist to create it, then add_to_playlist with all collected song IDscreate_playlist_from_markdown if working from markdown inputPresent a clean summary:
"90 minutes of ambient electronic for deep work" → Search for specific ambient tracks (Brian Eno, Stars of the Lid, Tim Hecker, etc.), accumulate ~90 min using duration_ms, create playlist
"Create a playlist from examples/road_trip.md"
→ Read the file, pass contents to create_playlist_from_markdown
"Add some Radiohead to my existing playlist"
→ list_playlists to find it, search_catalog for Radiohead tracks, add_to_playlist
"80s new wave workout mix, 20 songs" → Curate 20 upbeat new wave tracks, search each, create and populate
types: "songs" is default and usually what you want"1440345678" — always pass as strings to add_to_playlistcreate_playlist_from_markdown- Artist - Title format (dash-separated)