mirror of
https://github.com/varunneal/spotify-mcp.git
synced 2026-04-26 13:15:50 +03:00
[PR #46] feat: Add device selection and management for multi-room audio control #46
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotify-mcp-varunneal#46
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/varunneal/spotify-mcp/pull/46
Author: @jmward09
Created: 11/5/2025
Status: 🔄 Open
Base:
main← Head:feature/device-selection📝 Commits (1)
3568e21feat: Add device selection and management features📊 Changes
1 file changed (+65 additions, -1 deletions)
View changed files
📝
src/spotify_mcp/server.py(+65 -1)📄 Description
Overview
This PR adds device selection and management capabilities to enable multi-room audio control through Spotify Connect. This feature enables voice assistants and automation systems to route playback to specific devices (e.g., "play this in the kitchen" or "transfer to the living room speaker").
Implementation
This PR implements a hybrid approach that addresses the concerns raised in #11:
Approach 1: Separate Devices Tool (For Simplicity)
Devicestool withlistandtransferactionsApproach 2: Enhanced Playback Tool (For Convenience)
device_idparameter toPlaybacktool'sstartactionThis hybrid approach provides:
Devicestool for discovery and transferChanges
1. Enhanced Playback Tool
When
device_idis provided, the handler uses direct spotipy calls for device control:urisparameter) and context URIs (context_uriparameter)device_idis omitted2. New Devices Tool
Actions:
list: Returns all available Spotify Connect devices with id, name, type, volume, is_activetransfer: Transfers playback to specified device with optional auto-playTesting
Tested with 13 Spotify Connect devices including:
Test Cases:
Use Cases
Relation to #11
This PR addresses the design discussion in #11 where:
device_idto existing toolsOur hybrid approach implements both suggestions, providing the simplicity of a dedicated tool while also offering the convenience of inline device control. This gives users maximum flexibility while maintaining clean separation of concerns.
Backward Compatibility
All existing functionality is preserved:
Playbacktool works exactly as before whendevice_idis omittedDocumentation
Comprehensive documentation included in production deployment:
Would be happy to add documentation to the repo if desired.
Related PRs:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.