Features
- Lager MCP server — a Model Context Protocol server now runs on the Lager Box on port 8100 (FastMCP, streamable-http), allowing AI agents to discover a bench and understand how its nets are wired to the DUT. The server has moved from the CLI to the box and is started automatically inside the Docker container.
- Net metadata — nets now support
description,dut_connection,test_hints, andtagsfields. Newlager netsCLI commands and TUI flows let you edit this metadata interactively so AI agents (and humans) can reason about what each net is for. - Capability graph and heuristic engine — a new engine maps test types to the nets available on a bench, giving agents a principled way to pick the right instrument for a given task.
- Auto-generated MCP API reference — the MCP API reference is now generated from driver introspection at Docker image build time. The build fails fast if a driver is renamed, so the agent-facing surface stays in sync with the code.
Improvements
- Every MCP tool call is wired through an
@auditeddecorator that records the call viaaudit.log_tool_call, giving control planes (Stout) a consistent audit trail. quick_iowrites now pass through apreflight_checkthat enforces voltage, current, and dangerous-action constraints before touching hardware.- The
bench.jsonparser is now defensive: a single malformed entry no longer breaksdiscover_bench. - MCP errors no longer return raw tracebacks to agents.
NetType()inputs are validated against the enum. plan_firmware_testuses a regex-based pattern split instead of the previous unsafeget_patternsplit.- New integration test
test_agent_loopplus unit tests for the bench loader, capability graph, heuristic engine, safety preflight, and MCP schemas.
Security
- The
run_lagerMCP passthrough tool is now gated behind theLAGER_MCP_ALLOW_RUN_LAGERenvironment flag and is off by default. Operators must opt in explicitly before agents can invoke arbitrarylagercommands on a box.

