← Back to OpenOCD MCP

Install OpenOCD MCP

Pick your client, copy the command, done.

1

Add it to Claude Code

claude mcp add openocd-mcp -- uv run openocd-mcp

Environment Variables

Set these before running OpenOCD MCP.

VariableDescriptionRequired
OPENOCD_PATHPath to the OpenOCD executableNo
GDB_PATHPath to the GDB executableNo
OPENOCD_SCRIPTSPath to OpenOCD scripts directoryNo

Available Tools (8)

Once configured, OpenOCD MCP gives your AI agent access to:

set_projectSets the current project directory.
project_dir
refresh_debug_targetsRefreshes the available debug targets.
flash_downloadPerforms a firmware flash download.
config_namefirmware_path
debug_startStarts a debug session.
config_namefirmware_path
debug_stopStops the current debug session.
debug_commandExecutes a GDB command.
command
debug_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 -sse

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

Remember this setup