Problem
server.py:292 hardcodes self.deck = decks[0], so when more than one Stream Deck is connected (e.g. an Original and a Plus on the same machine), the MCP can only ever talk to whichever device DeviceManager().enumerate() returns first. There is no tool argument to choose, and no list_devices tool to discover what's attached.
Repro on a machine with two decks plugged in:
streamdeck_connect → always opens the same one regardless of intent
Suggested fix
Two small additions:
- New tool
streamdeck_list_devices — enumerate without opening, return [{serial, deck_type, key_count}, ...]. No connection required, safe to call any time.
- Optional arg on
streamdeck_connect — serial: str | None = None. If provided, match against enumerated devices; if not, keep current behavior (open first). On a non-matching serial, error with the list of available serials so the caller can self-correct.
Sketch:
def connect(self, serial: str | None = None) -> dict[str, Any]:
...
decks = DeviceManager().enumerate()
if not decks:
raise StreamDeckError("No Stream Deck found...")
if serial is None:
self.deck = decks[0]
else:
match = next((d for d in decks if d.get_serial_number() == serial), None)
if match is None:
available = [d.get_serial_number() for d in decks]
raise StreamDeckError(f"No deck with serial {serial!r}. Available: {available}")
self.deck = match
...
Out of scope (worth noting, not solving here)
State persistence (~/.streamdeck-mcp/pages.json, buttons.json) is currently global. True multi-deck support eventually wants per-serial state files, but that's a larger change — selecting which deck to open is the prerequisite and useful on its own.
Problem
server.py:292hardcodesself.deck = decks[0], so when more than one Stream Deck is connected (e.g. an Original and a Plus on the same machine), the MCP can only ever talk to whichever deviceDeviceManager().enumerate()returns first. There is no tool argument to choose, and nolist_devicestool to discover what's attached.Repro on a machine with two decks plugged in:
Suggested fix
Two small additions:
streamdeck_list_devices— enumerate without opening, return[{serial, deck_type, key_count}, ...]. No connection required, safe to call any time.streamdeck_connect—serial: str | None = None. If provided, match against enumerated devices; if not, keep current behavior (open first). On a non-matching serial, error with the list of available serials so the caller can self-correct.Sketch:
Out of scope (worth noting, not solving here)
State persistence (
~/.streamdeck-mcp/pages.json,buttons.json) is currently global. True multi-deck support eventually wants per-serial state files, but that's a larger change — selecting which deck to open is the prerequisite and useful on its own.