Skip to content

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.

Terminal window
uv run pyocd-debug-mcp

With 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.

The current tools, all live-validated on the scoped boards:

  • Sessionconnect, disconnect, get_board_info, get_state
  • Execution controlhalt, resume, step, reset
  • Registers & memoryread_core_register, write_core_register, read_memory, read_memory_block, write_memory
  • Breakpointsset_breakpoint, remove_breakpoint
  • Firmware & serialflash_firmware, read_serial
  • Recoveryunlock_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.

Mutating tools are gated. See Guardrails for how flash and recover gates and the mutation watchers behave.