mcp-server-harmony
v0.4.0MCP server for the Logitech Harmony Hub (local websocket API), activity-first and allow-listed by the hub's own config
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
harmony_get_status Get hub status
Start here. Lists every hub (one per TV) with whether it's reachable, on or off, and its running activity. transition is non-null while an activity is starting or powering off; that hub's commands wait until it clears. dry_run true means this server reports writes instead of sending them. sleep_timer is a pending harmony_set_sleep_timer (when it fires, minutes left) or null. last_sleep_timer says how the previous one ended (fired, cancelled or failed, and why): nothing else tells you when a timer fires, so check here after the time has passed.
harmony_list_activities List activities
List the activities on each hub (e.g. 'Watch Shield'), marking the running ones. Each has a ref usable anywhere an activity name is.
| Parameter | Type | Description |
|---|---|---|
hub | Hub name from harmony_get_status. Omit to look across all hubs (needed only if a name repeats). |
harmony_list_devices List devices
List the devices each hub controls, with how many commands each knows. Use only when an activity doesn't cover what you need (harmony_send_command with device).
| Parameter | Type | Description |
|---|---|---|
hub | Hub name from harmony_get_status. Omit to look across all hubs (needed only if a name repeats). |
harmony_list_commands List commands
List the commands harmony_send_command accepts for an activity or device (default: the running activity). Each entry says which device actually receives it. Activities expose the buttons they route; devices expose everything they know.
| Parameter | Type | Description |
|---|---|---|
hub | Hub name from harmony_get_status. Omit to look across all hubs (needed only if a name repeats). | |
target | Activity or device name or ref. Omit for the running activity's buttons. |
harmony_start_activity Start an activity
Start an activity: its hub powers on the devices and sets their inputs, then this returns (a few seconds). Starting the activity that is already running does nothing (outcome 'unchanged'). Switching activities on the same hub needs no harmony_power_off first.
| Parameter | Type | Description |
|---|---|---|
activity * | string | Activity name or ref from harmony_list_activities, e.g. 'Den/Watch TV'. |
hub | Hub name from harmony_get_status. Omit to look across all hubs (needed only if a name repeats). |
harmony_power_off Turn a TV system off
Run a hub's power-off, turning off every device in its running activity. With no hub and several hubs on, this asks which; hub='all' turns off every one and reports each hub separately (one unreachable hub doesn't stop the others). force=True is for a hub stuck mid-sequence (harmony_get_status shows a transition that never clears): it sends the power off anyway. Use it only after a normal harmony_power_off was refused as busy. Without hub it acts on hubs that are on or mid-sequence; to force one that reports off, name it.
| Parameter | Type | Description |
|---|---|---|
force | boolean | Force power-off even if an activity sequence is in progress. |
hub | Hub name, or 'all' for every hub. Omit when only one hub is on. |
harmony_send_command Send a command
Press a button, e.g. command='VolumeUp' with repeat=3, or command='Pause'. Without device, the running activity decides which device gets it. Names come from harmony_list_commands; there is no way to send a raw IR code. Rapid repeated calls are rate-limited per hub.
| Parameter | Type | Description |
|---|---|---|
command * | string | Command name or label from harmony_list_commands, e.g. 'VolumeUp'. |
delay_ms | Pause between repeats (default 400 ms). | |
device | Send straight to this device (name or ref). Omit to send through the running activity. | |
hold_ms | integer | Hold each press this long (a long press). 0 is a tap. |
hub | Hub name from harmony_get_status. Omit to look across all hubs (needed only if a name repeats). | |
repeat | integer | Presses, 1-10. |
harmony_describe_activity Describe an activity
What an activity sets up, read from the hub's config; sends nothing. Lists each device it involves with its expected power (on, off or unknown) and input, and which device each group of buttons goes to (e.g. Volume to the receiver). expected_state 'unknown' means the hub's config doesn't say: report it as unknown, don't guess. Useful to rebuild an activity on another remote.
| Parameter | Type | Description |
|---|---|---|
activity * | string | Activity name or ref from harmony_list_activities, e.g. 'Den/Watch TV'. |
hub | Hub name from harmony_get_status. Omit to look across all hubs (needed only if a name repeats). |
harmony_set_sleep_timer Set a sleep timer
Turn a hub's TV system off in `minutes` minutes (the same power-off as harmony_power_off); 0 cancels. "Turn the bedroom TV off in 45 minutes" is one call. A new timer replaces the one already set on that hub. With no hub and several hubs on, this asks which. A hub that is off is refused. The timer is held in this server's memory, not on the hub, and is not saved: under `serve --http` it outlives the chat, but over stdio the server exits when the MCP client closes, and the timer goes with it. It is dropped if the hub is powered off first (by anyone); switching activities k…
| Parameter | Type | Description |
|---|---|---|
minutes * | integer | Minutes from now, 1-720. 0 cancels the timer. |
hub | Hub name from harmony_get_status. Omit when only one hub is on. |
harmony_tune_channel Tune to a channel
Tune to a channel by pressing its digit buttons, e.g. channel='702', '5.1' or a favorite like 'ESPN'. The digits go out as one sequence, refused whole if the hub is busy or rate-limited. Without device they go through the running activity, which must route the digit buttons to the tuner (an activity that doesn't says so; name a device that has them). Set enter=True only if the box waits for a confirm press. This presses buttons like harmony_send_command does; it does not use the hub's own change-channel command.
| Parameter | Type | Description |
|---|---|---|
channel * | string | A channel number such as 702, 5.1 or 5-1, or a favorite's name (e.g. 'ESPN'). |
device | Press the digits on this device (name or ref). Omit to use the running activity's buttons. | |
enter | boolean | Press the select button (OK/Enter) after the digits, for boxes that wait for it. |
hub | Hub name from harmony_get_status. Omit to look across all hubs (needed only if a name repeats). |
harmony_get_history Get activity history
What each hub's activity changed from and to, and when (newest first, or oldest first with after_seq). Answers "what was on at 9 last night?", "how long was the office TV on?" and "was it turned on from the remote?". Each change has from_activity and to_activity (null means everything off), previous_lasted_seconds (how long the previous state lasted), and source: 'this_server' for a start or power off this server sent, 'elsewhere' for anything else (the physical remote, the Harmony app, Home Assistant): the hub can't say which. A recording_started event is where this serve…
| Parameter | Type | Description |
|---|---|---|
after_seq | Only events newer than this seq (from a previous call's last_seq). | |
hub | Hub name from harmony_get_status. Omit to look across all hubs (needed only if a name repeats). | |
limit | integer | Most events to return, 1-100. |