MCP server & tools
Hard Fault ships a local MCP server that exposes board control as tools. The turnkey brain talks to it directly (it launches the server as a subprocess), and you can also point your own MCP client at the same surface.
Start the server
Section titled “Start the server”uv run pyocd-debug-mcpWith a board id set, the server resolves that board’s facts — target, recover
policy, silicon id, baud — from boards/<board>.yaml, so connect needs no raw
target and get_board_info reports the loaded facts.
Tool surface
Section titled “Tool surface”The current tools, all live-validated on the scoped boards:
- Session —
connect,disconnect,get_board_info,get_state - Execution control —
halt,resume,step,reset - Registers & memory —
read_core_register,write_core_register,read_memory,read_memory_block,write_memory - Breakpoints —
set_breakpoint,remove_breakpoint - Firmware & serial —
flash_firmware,read_serial - Recovery —
unlock_recover
connect(...) creates a visible session_id, and each run writes
runs/<session_id>/logs/events.jsonl plus
runs/<session_id>/run-metadata/session.json for inspection.
Guardrails
Section titled “Guardrails”Mutating tools are gated. See Guardrails for how flash and recover gates and the mutation watchers behave.