labgrid-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LG_HOSTNAME | No | Identity hostname, as in labgrid-client; defaults to the real hostname | |
| LG_USERNAME | No | Identity username, as in labgrid-client; defaults to the real username | |
| LG_COORDINATOR | No | Coordinator address | 127.0.0.1:20408 |
| LABGRID_MCP_ALLOW | No | Comma-separated list of tool categories to register; 'flash' and 'place_delete' must be explicitly listed | |
| LABGRID_MCP_READONLY | No | Set to '1' to register only read-only tools: the Read group plus wait_for_change and forward_list | off |
| LABGRID_MCP_SSH_KEYFILE | No | Private key for the SSH tools; if unset, SSH tools error clearly at call time | |
| LABGRID_MCP_ACQUIRE_TIMEOUT | No | Max seconds acquire_place waits for allocation | 120 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| coordinator_infoA | Report the coordinator connection. Returns the coordinator address, the client's claimed identity, whether the subscription is currently connected, and the coordinator version if the protocol provides one (currently null). |
| list_placesA | All places known to the coordinator, as labgrid place dicts. |
| show_placeA | One place by exact name. Raises a tool error if unknown. |
| whoA | Currently acquired places by host/user (derived from the snapshot). |
| list_resourcesA | All exporter resources known to the coordinator. |
| list_reservationsC | Current reservations (live unary RPC to the coordinator). |
| wait_for_changeA | Long-poll for the next place/resource change (design §11.12 -- the live-monitor substitute; FastMCP has no subscription surface). |
| reserveA | Create a reservation (with the given filters/priority) and keep it alive in the background until it is cancelled, expires, or is invalidated. Returns the serialized reservation, including its token. |
| cancel_reservationA | Cancel a reservation by token and stop its keepalive task. |
| reservation_waitA | Block-and-poll a reservation until it allocates a place, or times out. |
| acquire_placeA | Acquire a place by name for this session. |
| release_placeA | Release a place by name. By default this verifies we currently hold the place before releasing it; pass kick=True to release unconditionally regardless of the current holder. |
| allow_placeA | Allow another user to use a place this session has acquired. |
| release_fromA | Release |
| get_power_stateA | Current power state for a place this server has acquired. |
| set_powerA | Drive power on/off/cycle on an acquired place, then return the resulting state. |
| get_ioA | Current digital IO state for an acquired place (HttpDigitalOutputDriver.get()). |
| set_ioA | Set digital IO on an acquired place, then re-read and return the resulting state (HttpDigitalOutputDriver.set() then .get()). |
| get_sd_muxA | Current SD-mux mode for an acquired place ( |
| set_sd_muxA | Set the SD mux mode on an acquired place (USBSDMuxDriver.set_mode()). |
| set_usb_muxB | Set USB mux links on an acquired place (LXAUSBMuxDriver.set_links()). |
| console_openA | Open an interactive console session on an acquired place. |
| console_readA | Drain up to |
| console_sendA | Write |
| console_closeA | Close a console session: stop and join its reader, then deactivate the driver. Idempotent; an unknown session is a tool error. |
| forward_listA | List all live forward tunnels across every place (forwards.sessions()). |
| ssh_runA | Run |
| put_fileA | Copy a local file to |
| get_fileA | Copy |
| forward_openA | Open a local port-forward tunnel to |
| forward_remote_openA | Open a REMOTE ( |
| forward_closeA | Close a forward tunnel by id ( |
| add_placeA | Create a new place by name. No ownership check -- a brand-new name can never collide with an existing acquisition. |
| add_place_aliasA | Add an alias to an existing place. |
| delete_place_aliasA | Remove an alias from an existing place. |
| set_place_tagsA | Set tags on an existing place. |
| set_place_commentA | Set an existing place's free-form comment (unvalidated by the coordinator). |
| add_place_matchA | Add a resource match to an existing place. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| places | JSON array of the places known to the coordinator (empty until synced). |
| resources_resource | JSON array of the resources known to the coordinator. |
| reservations_resource | JSON array of current reservations. |
| sessions_resource | JSON of live console sessions, forward tunnels, AND background flash jobs. ``{"consoles": [...], "forwards": [...], "jobs": [...]}`` (consoles.sessions(), forwards.sessions(), jobs.jobs()). Unconditional like the other resources -- registered even when Category.CONSOLE/ Category.SSH/Category.FLASH tools are gated off (readonly mode included). ``created``/``finished`` inside each job entry are MONOTONIC-clock values (process-relative, not wall-clock timestamps) -- passed through as-is, never rendered or converted here. Each job entry is normalized like ``flash_status``: canonical ``kind`` plus the additive ``loader`` field (``None`` except non-default bootstrap). |
TDQS
Scored across 38 tools
Most tools have distinct purposes (e.g., get_power_state vs set_power, console_open vs console_read). A few pairs like release_place/release_from and who/list_places could be confused, but their descriptions clearly differentiate them. Overall boundaries are clear.
The vast majority of tool names follow a verb_noun pattern (list_places, reserve, acquire_place, set_power). Exceptions like coordinator_info and who break the pattern, but they are minor and the naming is otherwise predictable.
38 tools is well above the 25-tool threshold, making the surface feel heavy. While the domain is broad, the high count may overwhelm agents, and some tools could be consolidated (e.g., a single console tool with subcommands). The scope justifies some breadth, but this exceeds reasonable limits.
The tool set covers core lifecycle operations: place inspection, reservation management, acquisition/release, hardware control (power/IO/SD/USB), console, SSH, file transfer, and port forwarding. Minor gaps include no delete_place, no get_reservation by token, and no explicit listing of console sessions, but these are workable shortcomings.