mcp-server-sofabaton
v0.4.0MCP server for Sofabaton universal remote hubs: an X2 over its own MQTT link, or any model via sofabaton-x-server
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
sofabaton_get_status Get hub status
Start here. The hub's model, running activity, and what it can do right now. capabilities lists what works on this hub now: catalog (the sofabaton_list_* tools), activities, buttons, commands, presses, find_remote, hub_info, and on an X2 over MQTT live_activity_state and control_while_app_open. limitations says what doesn't work and how to enable it. via is how commands would be sent: "server" (sofabaton-x-server, any model) or "mqtt" (X2 only). transition is non-null while an X2's power macro may still be running.
sofabaton_list_activities List activities
List the activities set up on the hub, marking the running one.
sofabaton_list_devices List devices
List the devices the hub controls.
sofabaton_list_commands List commands
List the named commands sofabaton_send_command accepts for an activity or device (default: the running activity). For an activity these are its macros and favorites; for a device, its own command list. The remote's hard buttons are separate: use sofabaton_press_button for those.
| Parameter | Type | Description |
|---|---|---|
target | An activity or device name. Omit to use the running activity. |
sofabaton_start_activity Start an activity
Start an activity and wait until the hub confirms it (its power-on macro can take a while). Starting the activity that is already running does nothing (outcome 'unchanged').
| Parameter | Type | Description |
|---|---|---|
activity * | string | Activity name from sofabaton_list_activities, e.g. 'Watch Shield'. |
sofabaton_power_off Turn the running activity off
Power off the running activity and wait until the hub confirms.
sofabaton_press_button Press a remote button
Press one of the remote's hard buttons, e.g. VOL_UP with repeat=3, or PAUSE. Sent to the running activity by default, which routes it to the device it binds that button to. Rapid repeated calls are rate-limited.
| Parameter | Type | Description |
|---|---|---|
button * | string | |
delay_ms | Pause between repeats (default 300 ms). | |
repeat | integer | How many times to press it (1-10). |
target | An activity or device name. Omit to use the running activity. |
sofabaton_send_command Send a named command
Send a named command: an activity macro or favorite, or a device command. Names come from sofabaton_list_commands.
| Parameter | Type | Description |
|---|---|---|
command * | string | A label from sofabaton_list_commands, e.g. 'Netflix' or 'Input HDMI 2'. |
delay_ms | Pause between repeats (default 300 ms). | |
repeat | integer | How many times to press it (1-10). |
target | An activity or device name. Omit to use the running activity. |
sofabaton_find_remote Find the remote
Make the physical remote beep so it can be found. Through sofabaton-x-server (any model), or on an X2 without a server, directly over the hub's own protocol (SOFABATON_HUB_IP), which works only while the Sofabaton app is closed. The direct path has no confirmation: ask the user whether they hear it.
sofabaton_get_recent_presses Get recent button presses
Recent presses of remote keys bound to a Wifi Device on the hub (newest first, or oldest first with after_seq). Lets a button on the remote ask for something. Comes from sofabaton-x-server's log (any model), or on an X2 over MQTT. If instance_id changes, the log restarted and older seqs are gone.
| Parameter | Type | Description |
|---|---|---|
after_seq | Only presses newer than this seq (from a previous call's last_seq). | |
limit | integer |