OpenOCD Debugger
Debug microcontrollers via OpenOCD: flash, breakpoints, memory, registers and variables.
Connector by microhenrio · GitHub account verified by the MCP Registry
Install
Works with Claude Code, Codex, VS Code, Cursor, Windsurf, Claude Desktop. Read the repository before you give any tool access to your data.
npx agentmarket install connector/microhenrio-openocd-mcp
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this server can do and what it asks for, from its tool list and install config. Checked Oct 25, 2026.
- Tools
- 13 read · 14 write · 7 delete · 5 not yet classified
- Secrets
- None asked for
- Install scripts
- Not scanned yet
- Runs as
- Python package
Tools by what they do 39
Read from the source code; the running server may list different tools.
Read 13 · Look things up without changing anything.
flash_infolist_breakpointslist_peripheral_registerslist_variablesread_memoryread_peripheralread_peripheral_registerread_registerread_registersread_variableshow_configstatus
Show 1 more tools
watch_variables
Write 14 · Create, change, send or run things.
add_breakpointadd_conditional_breakpointadd_watchpointconfigureflash_writeinstall_openocdset_permissionsstart_openocdstepstop_openocdwrite_memorywrite_peripheral_register
Show 2 more tools
write_registerwrite_variable
Delete 7 · Delete, drop, revoke or wipe things.
flash_erase_sectorremove_all_breakpointsremove_breakpointremove_conditional_breakpointremove_watchpointresetrun_command
Not yet classified 5 · We could not tell from the name and description.
connecthaltload_elfload_svdresume
Secrets and settings it asks for
Other settings (environment variables or headers).
OPENOCD_BINOPENOCD_MCP_CONFIGOPENOCD_MCP_READONLY
Files it touches
- Any path the agent passes to its tools
Tools (39)
Read from the source code; the running server may differ. Descriptions are the server’s own words; hidden characters are shown as [U+…].
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. address : hex address for the breakpoint condition : a TCL expression/block. Use get_reg <name> and get_mem <addr> ?width?. It is evaluated when the breakpoint is hit; non-zero = halt. Examples: 'expr {[get_reg r0] > 100}' 'expr {[get_mem 0x20000000] == 0xdeadbeef}' 'incr ::hit_count; expr {$::hit_count >= 5}'
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. interface_cfg : debug-probe OpenOCD config, e.g. 'interface/stlink.cfg' or 'interface/jlink.cfg' target_cfg : chip OpenOCD config, e.g. 'target/stm32g0x.cfg' transport : 'swd' or 'jtag' — set 'swd' for J-Link on Cortex-M (else it picks JTAG) svd_file : path to the chip's CMSIS-SVD file (peripheral registers) elf_file : path to the firmware .elf (variables by name) Alternatively, put these in an 'openocd-mcp.json' file in your project so they load automati…
connectConnect to OpenOCD. Call this first. If nothing is listening and auto_start is True, the server launches OpenOCD itself using the configured project settings (probe + target) and connects. Set auto_start=False to require an already-running OpenOCD.
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_writeProgram 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.
Show 24 more tools
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_breakpointsRemove every breakpoint and watchpoint that is currently set.
remove_breakpointRemove the breakpoint at the given address.
remove_conditional_breakpointRemove the conditional breakpoint at the given address.
remove_watchpointRemove 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_commandRun 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). read_only : master switch — blocks all writes/flash/erase/raw allow_memory_write : write_memory / write_variable / write_register / write_peripheral_register allow_flash : flash_write (program) allow_flash_erase : flash_erase_sector (destructive; off by default) allow_raw_command : run_command escape hatch flash_max_bytes : reject flashing files larger than this (0 = no limit) For persistent settings, put a "permissions" object in openocd-mcp.json. (flash_allowed_paths is set there, not here.)
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. interface_cfg : debug-probe config (default: project setting, else ST-Link) target_cfg : chip config, e.g. 'target/stm32f4x.cfg' (default: project setting) Leave both empty to use the configured project settings (see configure / openocd-mcp.json). A target_cfg must be set somewhere or this errors.
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.
stepExecute 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. names : comma- or space-separated variable names (requires load_elf). samples : number of snapshots, 1-200. interval_ms : delay between snapshots in milliseconds. Works for RAM globals/statics (read live via background memory access). CPU registers need a halt and aren't supported here. Multi-word values are read non-atomically, so a >4-byte value may be momentarily inconsistent. This tool is one-shot and returns a flat text table. For an open-ende…
write_memoryWrite 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 a 32-bit value to a peripheral register by name (e.g. 'GPIOA.ODR').
write_registerWrite a value to a CPU register. value: hex string, e.g. '0x20001000'
write_variableWrite a scalar global/static variable by name (requires load_elf first). value: hex (e.g. '0x2A') or decimal. Use write_memory for arrays/structs.
Signals
- Stars
- 4
- Forks
- 0
- Open issues
- 0
- Weekly downloads
- 68
- Last commit
- Jul 2, 2026 (3 months ago)
- Last release
- Jul 2, 2026 (3 months ago)
- Last package publish
- Jul 2, 2026 (3 months ago)
From GitHub (fetched Oct 24, 2026) and the package registry.
Details
- Registry name
io.github.microhenrio/openocd-mcp- Version
- 0.4.5
- Auth
- No auth
- Packages
- pypi openocd-mcp
- License
- MIT
- Repository
- github.com/microhenrio/openocd-mcp
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
Cite this page
OpenOCD Debugger MCP server. Agent Mart. https://agentmart.dev/connectors/microhenrio-openocd-mcp (last updated 2026-10-24)