OpenOCD Debugger MCP server
io.github.microhenrio/openocd-mcp·v0.4.5·4 starsDebug microcontrollers via OpenOCD: flash, breakpoints, memory, registers and variables.
4 stars37 downloads/wk
Reviews
Write oneNobody has reviewed OpenOCD Debugger yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
OpenOCD Debugger tools (39, 11 write)
write = sends, deletes, buys or postsRead from the package source without running it. The installed server may list more.
add_breakpointAdd a breakpoint. address : hex address, e.g. '0x08001234' hardware : True for hardware breakpoint (recommended for flash); False for software
add_conditional_breakpointAdd a conditional breakpoint. The target halts at `address` only if `condition` evaluates true; otherwise resume/reset-run skips past it.
add_watchpointAdd a data watchpoint. address : hex address to watch length : size in bytes (usually 1, 2, or 4) type : 'r' (read), 'w' (write), or 'a' (access/any) value : optional hex value to match (hardware dependent) mask : optional hex mask for the value match
configureSet the chip/project settings for this session. Only non-empty arguments are applied; the rest keep their current values.
connectConnect to OpenOCD. Call this first.
flash_erase_sectorErase a range of flash sectors. bank : flash bank index (usually 0) first : first sector number to erase last : last sector number to erase (inclusive)
flash_infoDisplay information about the flash bank (size, sectors, erase state).
flash_writewrite actionProgram a firmware file onto the target flash. path : full path to .elf, .bin, or .hex file verify : read back and verify after programming (recommended) reset_after : reset and run the new firmware after flashing
haltHalt the target CPU so registers and memory can be inspected.
install_openocdDownload and cache OpenOCD for this OS/architecture (if not already present), so the server can run without a separate OpenOCD install. Verifies a pinned SHA-256. Needed only when OpenOCD isn't bundled or on PATH (e.g. a pip install).
list_breakpointsList all currently set breakpoints and watchpoints.
list_peripheral_registersWith no argument: list all peripheral names. With a peripheral name (e.g. 'RCC'): list that peripheral's registers.
list_variablesList known variable names, optionally filtered by a substring.
load_elfLoad variable names and addresses from a firmware .elf file, so you can read and write variables by name. Build the firmware with debug symbols. path: full path to the .elf (defaults to the configured elf_file if set).
load_svdLoad peripheral register definitions from a CMSIS-SVD file. Loaded automatically on first use from the configured svd_file; call this only to use a different SVD. path defaults to the configured svd_file.
read_memoryRead memory from the target. address : hex address, e.g. '0x20000000' count : number of units to read width : unit size in bits — 8, 16, or 32
read_peripheralRead memory-mapped peripheral registers. base_address : peripheral base, e.g. '0x40020000' for GPIOA on STM32 count : number of 32-bit registers to read (default 16)
read_peripheral_registerRead a peripheral register by name (e.g. 'RCC.CR', 'GPIOA.MODER') and decode its named bitfields. The target should be halted for a stable read.
read_registerRead a single CPU register by name. Examples: 'r0', 'pc', 'sp', 'lr', 'xpsr', 'msp', 'psp'
read_registersDump all CPU registers (r0-r15, pc, sp, lr, xpsr, etc.).
read_variableRead a global/static variable by name (requires load_elf first). Scalars (1/2/4 bytes) are decoded to hex and decimal; larger objects (arrays, structs) are dumped as words.
remove_all_breakpointswrite actionRemove every breakpoint and watchpoint that is currently set.
remove_breakpointwrite actionRemove the breakpoint at the given address.
remove_conditional_breakpointwrite actionRemove the conditional breakpoint at the given address.
remove_watchpointwrite actionRemove the watchpoint at the given address.
resetReset the target. mode: 'halt' — reset and immediately halt (good for debugging) 'run' — reset and start running 'init' — reset and run init scripts With 'run' and conditional breakpoints set, this honors those conditions (skipping false ones) just like resume.
resumeResume CPU execution. Optionally resume from a specific address. If conditional breakpoints are set, this skips past those whose condition is false and stops at the first one whose condition is true (or on any other halt).
run_commandwrite actionRun any raw OpenOCD TCL command and return its output. Use this for anything not covered by the other tools.
set_permissionsAdjust safety permissions for this session (only provided args change).
show_configShow the current effective project settings and where they came from.
start_openocdStart OpenOCD as a subprocess (so you don't have to launch it manually). Detects an already-running instance and won't start a duplicate.
statusReport current debug state: whether OpenOCD is running, whether the target is halted or running, and the current program counter (PC) if halted. Does not disturb execution.
stepwrite actionExecute a single instruction and halt again.
stop_openocdStop the OpenOCD process this server started.
watch_variablesLive-watch one or more variables WITHOUT halting the CPU: sample them repeatedly while the target runs and return a time-series table.
write_memorywrite actionWrite a value to a memory address. address : hex address, e.g. '0x20000000' value : hex value, e.g. '0xDEADBEEF' width : 8, 16, or 32
write_peripheral_registerwrite actionWrite a 32-bit value to a peripheral register by name (e.g. 'GPIOA.ODR').
write_registerwrite actionWrite a value to a CPU register. value: hex string, e.g. '0x20001000'
write_variablewrite actionWrite a scalar global/static variable by name (requires load_elf first). value: hex (e.g. '0x2A') or decimal. Use write_memory for arrays/structs.
Public scan report
scanner v0.1.9 · 2026-09-26 · same rubric, same numbers if you re-run it
- Code scan13 source files scanned25/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitylocal package, no credentials required12/15
- Maintenancelast push 86 days ago12/15
- Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
How OpenOCD Debugger compares
Against every graded MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 88/100
- higher than 75% of 48,255 servers
- Tools
- 39
- the typical server has 7
- Tools that change things
- 28%
- typical: 0%. Fewer write tools means less an agent can break
- GitHub stars
- 4
- more than 82% of 28,688 servers
- Downloads a week
- 37
- more than 28% of 12,191 servers with a package
What its tools let an agent do: 21 read · 7 create · 3 change · 4 delete · 4 run or deploy
Install OpenOCD Debugger in Claude Code, Cursor or VS Code
claude mcp add openocd-mcp -- uvx openocd-mcp
What the publisher says
From the OpenOCD Debugger repository's README, as published. We do not edit it. Read it on GitHub
<!-- mcp-name: io.github.microhenrio/openocd-mcp --> <!-- Estado del repositorio -->
<!-- Compatibilidad MCP -->
<!-- Compatibilidad con uvx -->
<!-- Badges que funcionarán cuando publiques en PyPI -->
OpenOCD MCP Server
Debug microcontrollers directly from your AI assistant. This is an MCP server that drives OpenOCD, letting any MCP-compatible AI flash firmware, control execution, and inspect a running target — and read your variables and peripheral registers by name instead of raw addresses.
Description
Once connected to a target through a debug probe (ST-Link, J-Link, CMSIS-DAP, …), your AI assistant can:
(halt only when an expression is true) and hit-count breakpoints
- Flash firmware — program and verify .elf / .bin / .hex images
- Control execution — halt, resume, single-step, reset
- Inspect state — read/write CPU registers and memory
- Set breakpoints — hardware & software, including conditional breakpoints
- Watch memory — hardware watchpoints that halt on read/write/access to an address
- Read variables by name — from your firmware's .elf symbols (e.g. readvariable uartrx_count)
- Live-watch variables — a window that samples variables over time without halting the CPU, with expandable structs/arrays auto-typed from DWARF (signed/float/pointer/enum)
- Read peripheral registers by name — from a CMSIS-SVD file, decoded into named bitfields (e.g. RCC.CR, GPIOA.MODER)
- Safety gates — permission layer (read-only mode, gated flash-erase, flash path/size limits) so the agent can't damage a target unexpectedly
The server is chip-agnostic — it works with any target OpenOCD supports; you point it at your chip's config and (optionally) SVD/ELF. It can also start OpenOCD for you and download OpenOCD automatically for your platform, so there's nothing else to install by hand.
Supported AI clients
Any MCP-compatible client works. Tested and known to work:
Installation
Prerequisites: Python 3.10+ and a debug probe connected to your target.
Clone and install the package into a virtual environment:
git clone https://github.com/microhenrio/openocd-mcp
cd openocd-mcp
python -m venv .venvInstall it (creates the openocd-mcp command):
# Windows
.venv\Scripts\python -m pip install -e .
# macOS / Linux
.venv/bin/python -m pip install -e .Windows shortcut: run setup.bat — it creates the environment, installs
the package, and registers it with Claude Code automatically.
Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
OpenOCD Debugger: common questions
- Is OpenOCD Debugger MCP server safe?
- Yes, by our scan: it is graded A (88/100). Read the OpenOCD Debugger safety report
- How do I install OpenOCD Debugger?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does OpenOCD Debugger need an API key?
- No secret keys are declared. It reads 3 settings from the environment.
- Is OpenOCD Debugger maintained?
- The last commit was 125 days ago (2026-07-02). The latest release is v0.4.5.
- How does OpenOCD Debugger compare with other MCP servers?
- safety score 88/100 (higher than 75% of 48,255 servers); tools 39 (the typical server has 7); tools that change things 28% (typical: 0%. Fewer write tools means less an agent can break). Full comparison.