sonos-control
Original:🇺🇸 English
Translated
Control Sonos speakers through MCP tools - search and play music, manage queue and playlists, adjust volume. Use when users request music playback, mention artists/songs/albums, want to control Sonos speakers, manage playlists, or ask about what's playing.
1installs
Sourceslzatz/sonos_mcp
Added on
NPX Install
npx skill4agent add slzatz/sonos_mcp sonos-controlTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Sonos Control
Overview
This skill provides comprehensive control over Sonos speaker systems through MCP tools. Use it to search for and play music, manage playback queues and playlists, control volume, and switch between speakers. The skill handles both simple requests ("play some Neil Young") and complex multi-step workflows ("create a mix of 5 tracks from these artists").
Core Principle: Multi-Step Workflows
Most music requests require multiple tool calls in sequence. Execute workflows automatically without asking permission at each step - just complete the workflow and confirm the result.
Critical Rule: Search results are ephemeral. After using or , immediately select and add desired tracks/albums to the queue before executing another search, as each new search clears previous results.
search_for_tracksearch_for_albumAvailable MCP Tools
Speaker Management
- - Get current active speaker name
sonos:get_master_speaker - - Switch to a different speaker (e.g., "Bedroom", "Kitchen")
sonos:set_master_speaker
Search and Selection
- - Search by track title, artist, album (e.g., "Heart of Gold Neil Young")
sonos:search_for_track - - Search by album title and artist (e.g., "Harvest Neil Young")
sonos:search_for_album - - Add track from search results by position (1-based)
sonos:add_track_to_queue - - Add album from search results by position (1-based)
sonos:add_album_to_queue
Queue Management
- - View all queued tracks
sonos:list_queue - - Remove all tracks from queue
sonos:clear_queue - - Remove a track from the queue by position (1-based)
sonos:remove_from_queue - - Play track at specific queue position (1-based)
sonos:play_from_queue
Playback Control
- - Get information about currently playing track
sonos:current_track - - Toggle play/pause
sonos:play_pause - - Skip to next track
sonos:next_track
Volume Control
- - Adjust volume by 10 ("louder" or "quieter")
sonos:turn_volume - - Set absolute volume (0-100)
sonos:set_volume - - Mute or unmute (True/False)
sonos:mute
Playlist Management
Terminology:
- "playlist" or "local playlist" = Playlists stored locally on the filesystem ()
~/.sonos/playlists/ - "native Sonos playlist" = Playlists stored on the Sonos system (accessible from Sonos mobile app)
Local Playlist Tools:
- - Display all local playlists
sonos:list_playlists - - Show tracks in a specific local playlist
sonos:list_playlist_tracks - - Add queue track to local playlist by position
sonos:add_to_playlist_from_queue - - Add search result to local playlist by position
sonos:add_to_playlist_from_search - - Load entire local playlist into queue (optionally shuffled with shuffle=True)
sonos:add_playlist_to_queue - - Remove track from local playlist by position
sonos:remove_track_from_playlist
Native Sonos Playlist Tools:
- - Display all native Sonos playlists
sonos:list_native_sonos_playlists - - Convert a local playlist to a native Sonos playlist
sonos:create_native_sonos_playlist_from_local(local_playlist, native_playlist_name=None)- Checks for naming conflicts and reports if native playlist already exists
- Temporarily uses queue but restores original queue contents
- Makes playlist accessible from Sonos mobile app and other Sonos controllers
Basic Workflow: Play a Track or Album
To play a specific track or album:
- Search - Use or
sonos:search_for_tracksonos:search_for_album - Select - Use or
sonos:add_track_to_queuewith position numbersonos:add_album_to_queue - Find Position - Use to see where track(s) were added
sonos:list_queue - Play - Use with the position from step 3
sonos:play_from_queue - Verify - Use to confirm correct track is playing
sonos:current_track
Example: User says "play Like a Hurricane by Neil Young"
1. sonos:search_for_track "Like a Hurricane Neil Young"
2. sonos:add_track_to_queue 1 (select best match)
3. sonos:list_queue (find it was added at position 15)
4. sonos:play_from_queue 15
5. sonos:current_track (confirm)Advanced Workflows
Creating Custom Mixes
To build a custom mix from multiple artists:
- For each artist: Execute search → select → add cycle
- Between searches: Ensure previous track is added to queue before next search
- Play first track when all selections complete
- Verify the queue contains all desired tracks
Example: User says "play a mix of Springsteen, Jackson Browne, and Patty Griffin"
1. sonos:search_for_track "Born to Run Springsteen"
2. sonos:add_track_to_queue 1
3. sonos:search_for_track "Running on Empty Jackson Browne"
4. sonos:add_track_to_queue 1
5. sonos:search_for_track "Let Him Fly Patty Griffin"
6. sonos:add_track_to_queue 1
7. sonos:list_queue (verify all added)
8. sonos:play_from_queue 1 (start first track)Finding Live Performances
To find live tracks or albums:
- Include "live" or "unplugged" in search queries
- Look for venue names in search results: "Massey Hall", "Nashville", "The Troubadour", "Red Rocks", "The Fillmore", "The Ryman"
- Check album titles for indicators: "Live at", "Unplugged", "In Concert"
Example: User says "play 5 live tracks from Patty Griffin"
1. sonos:search_for_track "Patty Griffin live"
2. Review results for venue names or "live" indicators
3. sonos:add_track_to_queue 1
4. sonos:add_track_to_queue 3
5. sonos:add_track_to_queue 5
6. sonos:add_track_to_queue 7
7. sonos:add_track_to_queue 9
8. sonos:play_from_queue 1Multi-Room Control
To play music in a specific room:
- Switch speaker first - Use with room name
sonos:set_master_speaker - Verify switch - Check response confirms speaker change
- Continue with normal workflow - Search, add, play as usual
Example: User says "play some Neil Young in the bedroom"
1. sonos:set_master_speaker "Bedroom"
2. sonos:search_for_track "Neil Young"
3. sonos:add_track_to_queue 1
4. sonos:play_from_queue 1Playlist Workflows
Adding Tracks to Playlists
From queue:
- Use to find track position
sonos:list_queue - Use with playlist name and position
sonos:add_to_playlist_from_queue
From search:
- Use to find track
sonos:search_for_track - Use with playlist name and position
sonos:add_to_playlist_from_search
Example: User says "add the current track to my Chill Vibes playlist"
1. sonos:current_track (get what's playing)
2. sonos:list_queue (find its position)
3. sonos:add_to_playlist_from_queue "Chill Vibes" <position>Copying Entire Queue to New Playlist
To save the current queue as a new playlist (useful for preserving a curated queue):
- Use to see all tracks and count them
sonos:list_queue - For each track position (1 through N), use with the new playlist name
sonos:add_to_playlist_from_queue - The first call creates the new playlist; subsequent calls append tracks
- Optionally verify with
sonos:list_playlist_tracks
Important: When removing multiple tracks from a queue or playlist, always remove from highest position to lowest to avoid position shifts affecting remaining targets.
Example: User says "save everything in the queue as playlist20250119"
1. sonos:list_queue (count 59 tracks)
2. sonos:add_to_playlist_from_queue "playlist20250119" 1
3. sonos:add_to_playlist_from_queue "playlist20250119" 2
... (continue for all 59 positions)
60. sonos:list_playlist_tracks "playlist20250119" (verify)Note: For large queues (50+ tracks), execute all additions in sequence without requesting permission at each step, following the "Multi-Step Workflows" principle.
Selecting Multiple Tracks from One Artist
When a user requests N tracks from an artist without specific guidance:
Default Strategy (No Prior Context)
- Mix popular and quality tracks - Include 1-2 well-known hits, rest can be deep cuts
- Album variety - Spread selections across 2-3 different albums when possible
- Career representation - For established artists, vary across different periods
- Mood consistency - Ensure tracks flow well together in sequence
Contextual Adjustments
- If user mentions "favorites" - Prioritize most-streamed/canonical tracks
- If user says "best of" - Focus on greatest hits and popular tracks
- If user mentions specific album - Select all tracks from that album
- If user says "variety" or "mix" - Maximize album and style diversity
When to Ask for Clarification
Only ask if the request is genuinely ambiguous:
- ✗ Don't ask: "play 3 Vienna Teng songs" (use default strategy)
- ✓ Do ask: "play Neil Young songs" when user has requested both acoustic and electric in past
- ✓ Do ask: "play some Beatles" (too many eras/styles to assume)
Selection Transparency
In your response, briefly mention your selection reasoning:
- "I've added 3 tracks mixing popular hits and album favorites..."
- "Here are 3 tracks spanning her early and recent work..."
Playing Playlists
To play a saved playlist:
- Use to load all tracks (optionally with shuffle=True)
sonos:add_playlist_to_queue - Use to start playing
sonos:play_from_queue 1
Example: User says "play my favorites playlist"
1. sonos:add_playlist_to_queue "favorites"
2. sonos:play_from_queue 1Example: User says "play my workout playlist in random order"
1. sonos:add_playlist_to_queue "workout" shuffle=True
2. sonos:play_from_queue 1Converting Local Playlists to Native Sonos Playlists
To make a local playlist accessible in the Sonos mobile app and other Sonos controllers:
- Check for conflicts - Use to see if the name already exists
sonos:list_native_sonos_playlists - Convert - Use with the local playlist name
sonos:create_native_sonos_playlist_from_local - Optionally specify different name - Pass parameter if desired
native_playlist_name - Verify - Use to confirm creation
sonos:list_native_sonos_playlists
Example: User says "create a native Sonos playlist from my favorites playlist"
1. sonos:list_native_sonos_playlists (check if "favorites" already exists)
2. sonos:create_native_sonos_playlist_from_local "favorites"
3. sonos:list_native_sonos_playlists (verify it was created)Example: User says "make a Sonos playlist called favorites_backup from my favorites playlist"
1. sonos:create_native_sonos_playlist_from_local "favorites" native_playlist_name="favorites_backup"
2. sonos:list_native_sonos_playlists (verify)Important Notes:
- The conversion temporarily uses the queue but restores it automatically
- If a native playlist with that name already exists, you'll get an error with a clear message
- Ask the user if they want to use a different name or if they want you to proceed differently
- Local and native playlists are independent - changes to one don't affect the other
Common Request Patterns
Simple Requests
- "What's playing?" →
sonos:current_track - "Show me the queue" →
sonos:list_queue - "Turn it up" →
sonos:turn_volume "louder" - "Set volume to 50" →
sonos:set_volume 50 - "Mute" →
sonos:mute True - "Next song" →
sonos:next_track - "Pause" →
sonos:play_pause - "What playlists do I have?" →
sonos:list_playlists - "Show my native Sonos playlists" →
sonos:list_native_sonos_playlists
Complex Requests
- "Play [specific track]" → Execute Basic Workflow
- "Play [number] tracks by [artist]" → Execute Advanced Workflow with multiple searches
- "Create a mix of [artists]" → Execute Custom Mix Workflow
- "Play some [artist] in [room]" → Execute Multi-Room Workflow
- "Add [track] to [playlist]" → Execute Playlist Workflow
- "Play [playlist] shuffled/randomized/in random order" → Use with shuffle=True
add_playlist_to_queue - "Create a native Sonos playlist from [local playlist]" → Execute Converting Local Playlists Workflow
- "Make [local playlist] available in the Sonos app" → Execute Converting Local Playlists Workflow
Response Guidelines
After Completing Workflows
Provide natural, music-focused responses:
- Confirm what's playing
- Share relevant context (album, year, interesting facts)
- Explain selection reasoning for custom mixes
- Mention notable aspects (live performance, rare version, etc.)
When Making Selections
Use music knowledge to select best matches:
- Prefer original studio versions unless user requests otherwise
- For "live" requests, prioritize well-known live albums
- For deep cuts, select lesser-known but high-quality tracks
- Consider chronology and artist periods when building mixes
Handling Ambiguity
If search results are unclear:
- Make best judgment based on context
- Select most popular/canonical version
- Only ask for clarification if results are completely ambiguous
- Provide reasoning for selection in response
Error Handling
Search Returns No Results
- Try simplified search (fewer keywords)
- Suggest alternative artist/track names
- Offer to search for similar artists or tracks
- Consult for search strategies
references/search_tips.md
Queue Issues
- If queue is full, suggest clearing old tracks
- If position is invalid, list queue to find correct position
Playback Issues
- Verify track is in queue using
sonos:list_queue - Confirm correct speaker using
sonos:get_master_speaker - Check current status with
sonos:current_track
Additional Resources
For detailed search strategies, artist name variations, and mix-building tips, reference the bundled file:
- - Comprehensive guide for effective music searches
references/search_tips.md