1
Add it to Claude Code
claude mcp add openocd-mcp -- uv run openocd-mcpEnvironment Variables
Set these before running OpenOCD MCP.
VariableDescriptionRequired
OPENOCD_PATHPath to the OpenOCD executableNoGDB_PATHPath to the GDB executableNoOPENOCD_SCRIPTSPath to OpenOCD scripts directoryNoAvailable Tools (8)
Once configured, OpenOCD MCP gives your AI agent access to:
set_projectSets the current project directory.project_dirrefresh_debug_targetsRefreshes the available debug targets.flash_downloadPerforms a firmware flash download.config_namefirmware_pathdebug_startStarts a debug session.config_namefirmware_pathdebug_stopStops the current debug session.debug_commandExecutes a GDB command.commanddebug_statusQueries the current debug status.get_runtime_configRetrieves the current runtime configuration.Try It Out
After setup, try these prompts with your AI agent:
→Refresh my debug targets and start a new debug session for the current project.
→Flash the firmware located at build/firmware.elf to my target device.
→Check the current status of the debug session.
→Execute a GDB command to reset the target device.
→Stop the active debug session.
Alternative installation methods
SSE Mode
uv run openocd-mcp -sseKeep this setup from going cold
Save the docs, env vars, and workflow around OpenOCD MCP in Conare so Claude Code, Codex, and Cursor remember it next time.