keyboards-mcp
v2.1.0MCP server for controlling MIDI keyboards (Nord Electro 5D and more)
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_midi_devices
List all MIDI output and input ports as structured data. Each output port carries optional `mock` (registry metadata for ports that belong to a running mock-runner mock, including `instanceId` and `stale` flag), `poolMarkers` (entries from this MCP's local pool that bind to the port), and `lease` (annotation from MCB if any session currently holds a lease on that port as primary or shadow, including `mockInstanceId`). Use `mock.instanceId` vs `lease.mockInstanceId` to diagnose connection loss: if they differ, the lease is bound to a closed mock and the agent should reconnect manually. Fails fa…
connect_to_keyboard
Connect to a MIDI keyboard. Claims a lease via midi-connections-broker (MCB) before opening MIDI/WS, so concurrent agent sessions cannot step on each other. Required: `port` (exact OS port name or registered mock label) and `model` (e.g. nord-electro-5d). Optional: `with_shadow` (a mock label or OS port to mirror MIDI to — typical pattern is real hw + mock UI), `input_port` (the OS port the keyboard sends from), `label`, channel options. The keyboards-mcp broker daemon must be running. If a connection fails with mcb-unreachable, run 'keyboards-mcp doctor' (or 'keyboards-mcp install').
| Parameter | Type | Description |
|---|---|---|
model * | string | Model id (e.g. 'nord-electro-5d', 'roland-juno-x', 'prophet-6'). |
port * | string | Exact OS port name or registered mock label (e.g. 'Nord Electro 5 MIDI Input' or 'nordi'). |
channel | number | Global MIDI channel (1-16, default 1) |
input_port | string | OS input port name (the keyboard's MIDI Output). Required for physical-knob mirroring to a shadow. |
label | string | Optional user-assigned label for this device instance (e.g. 'studio Nord'). |
lower_channel | number | MIDI channel for Lower part (1-16, default 2) |
upper_channel | number | MIDI channel for Upper part (1-16, default 3) |
with_shadow | string | Optional shadow port — every outgoing MIDI is teed to this port. Typical: a mock label so the UI mirrors a real hardware connection. |
disconnect_from_keyboard
Disconnect a connected MIDI device. If multiple devices are connected, pass `device` (1-based index from is_connected). If only one device is connected, the index can be omitted.
| Parameter | Type | Description |
|---|---|---|
device | integer | 1-based device index from is_connected. Required when more than one device is connected. |
set_parameters
Set one or more keyboard parameters by name and value.
| Parameter | Type | Description |
|---|---|---|
parameters * | array | Array of parameter name/value pairs to set |
device | integer | 1-based device index from is_connected. Required when more than one device is connected. |
part | string | Target part for per-part params (default: upper) |
get_current_state
Get the current state of all (or a section of) keyboard parameters. Shows what values have been sent to the keyboard in this session.
| Parameter | Type | Description |
|---|---|---|
device | integer | 1-based device index from is_connected. Required when more than one device is connected. |
section | string | Optional section filter (e.g. organ, piano, effect1, reverb, etc.) |
list_parameters
List all available keyboard parameters with their names, types, ranges, and descriptions. Use this to understand what you can control on the keyboard. Omit the section parameter to list ALL parameters across all sections.
| Parameter | Type | Description |
|---|---|---|
device | integer | 1-based device index from is_connected. Required when more than one device is connected. |
section | string | Optional section filter (e.g. organ, piano, effect1, reverb, etc.). Omit to list all parameters. |
list_programs
List stored programs from the device's backup inventory. Requires a backup to have been extracted first via extract_backup.
| Parameter | Type | Description |
|---|---|---|
bank | number | Optional bank number to filter by |
device | integer | 1-based device index from is_connected. Required when more than one device is connected. |
filter | string | Optional name filter (case-insensitive substring match) |
list_songs
List set list songs from the device's backup inventory. Requires a backup to have been extracted first via extract_backup.
| Parameter | Type | Description |
|---|---|---|
bank | number | Optional set list bank number to filter by |
device | integer | 1-based device index from is_connected. Required when more than one device is connected. |
filter | string | Optional name filter (case-insensitive substring match) |
is_connected
List all connected MIDI keyboards with their indices, models, labels, and shadow ports. Source of truth is midi-connections-broker (MCB); the local pool provides 1-based indices. Use the returned indices in other tools' optional `device` parameter.
load_program
Load a stored program on the keyboard by bank and program number. Sends MIDI Bank Select (CC0 + CC32) followed by Program Change.
| Parameter | Type | Description |
|---|---|---|
bank * | number | Program bank |
slot * | number | Program number within bank |
device | integer | 1-based device index from is_connected. Required when more than one device is connected. |
load_song
Load a song from a keyboard set list. Switches to set list mode, selects the set list bank and song slot, and optionally picks a part.
| Parameter | Type | Description |
|---|---|---|
bank * | number | Set list number |
slot * | number | Song number within the set list |
device | integer | 1-based device index from is_connected. Required when more than one device is connected. |
part | string | Part to select (e.g. A, B, C, D). Default: first available part. |
extract_backup
Read a keyboard backup file and generate a comprehensive inventory of all sounds, programs, and settings stored on the keyboard. Automatically detects the mode based on whether the path is a file (full backup) or a directory (programs-only). Backup data is keyed by `label` so two units of the same model don't share one cache. When multiple matching devices are connected, pass `device` (1-based) or `label` to choose which instance receives the inventory.
| Parameter | Type | Description |
|---|---|---|
file_path * | string | Absolute path to a backup file or a folder of program files |
device | integer | Optional 1-based device index to update with the parsed inventory. |
label | string | Optional label this backup belongs to (e.g. 'studio nord'). If omitted, the connected device's label is used; otherwise '_default'. |
output_path | string | Optional path to write the generated markdown file. Defaults to data/backups/<label>/<model_id>_backup_inventory.md. |
get_last_backup_location
Return the file path of the last keyboard backup that was extracted. Use this to suggest the same path when the user asks to extract a backup again. Backup paths are keyed by label — pass `label` (or `device` to use that device's label) to disambiguate when multiple labels have stored paths.
| Parameter | Type | Description |
|---|---|---|
device | integer | Optional 1-based device index. Uses that device's model + label. |
label | string | Optional label whose cached path should be returned (overrides `device`'s label). |
get_system_prompt
Get the model-specific system prompt for AI agents. Returns a detailed description of the connected keyboard's signal path, engine capabilities, and sound design guidelines. Requires an active connection. When multiple devices are connected, the response also enumerates each device with its index.
| Parameter | Type | Description |
|---|---|---|
device | integer | 1-based device index from is_connected. Required when more than one device is connected. |
get_health
Report this MCP's broker connectivity, current MCB session id, and local device-pool size. `mcbReachable` is true when GET /v1/health returned 200; `mcbHealth` is the broker payload verbatim when reachable, otherwise null. `sessionId` is the MCP's current cached MCB session id, or null if no session has been minted yet (the session is created lazily on the first connect_to_keyboard call) or was dropped after a session-lost event. `deviceCount` is the number of devices in the local pool.