Skip to content
Agentmart
Submit a tool

OpenOCD Debugger

Debug microcontrollers via OpenOCD: flash, breakpoints, memory, registers and variables.

Connector by microhenrio · GitHub account verified by the MCP Registry

IndexedMITLocal (stdio)★ 4
Write a review

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.

We use your email only for this newsletter. Privacy

About

Debug microcontrollers via OpenOCD: flash, breakpoints, memory, registers and variables.

No 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_info
  • list_breakpoints
  • list_peripheral_registers
  • list_variables
  • read_memory
  • read_peripheral
  • read_peripheral_register
  • read_register
  • read_registers
  • read_variable
  • show_config
  • status
Show 1 more tools
  • watch_variables

Write 14 · Create, change, send or run things.

  • add_breakpoint
  • add_conditional_breakpoint
  • add_watchpoint
  • configure
  • flash_write
  • install_openocd
  • set_permissions
  • start_openocd
  • step
  • stop_openocd
  • write_memory
  • write_peripheral_register
Show 2 more tools
  • write_register
  • write_variable

Delete 7 · Delete, drop, revoke or wipe things.

  • flash_erase_sector
  • remove_all_breakpoints
  • remove_breakpoint
  • remove_conditional_breakpoint
  • remove_watchpoint
  • reset
  • run_command

Not yet classified 5 · We could not tell from the name and description.

  • connect
  • halt
  • load_elf
  • load_svd
  • resume

Secrets and settings it asks for

Other settings (environment variables or headers).

  • OPENOCD_BIN
  • OPENOCD_MCP_CONFIG
  • OPENOCD_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_breakpoint

    Add a breakpoint. address : hex address, e.g. '0x08001234' hardware : True for hardware breakpoint (recommended for flash); False for software

  • add_conditional_breakpoint

    Add 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_watchpoint

    Add 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

  • configure

    Set 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…

  • connect

    Connect 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_sector

    Erase 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_info

    Display information about the flash bank (size, sectors, erase state).

  • flash_write

    Program 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

  • halt

    Halt the target CPU so registers and memory can be inspected.

  • install_openocd

    Download 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_breakpoints

    List all currently set breakpoints and watchpoints.

  • list_peripheral_registers

    With no argument: list all peripheral names. With a peripheral name (e.g. 'RCC'): list that peripheral's registers.

  • list_variables

    List known variable names, optionally filtered by a substring.

  • load_elf

    Load 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_svd

    Load 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_memory

    Read 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_peripheral

    Read 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_register

    Read 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_register

    Read a single CPU register by name. Examples: 'r0', 'pc', 'sp', 'lr', 'xpsr', 'msp', 'psp'

  • read_registers

    Dump all CPU registers (r0-r15, pc, sp, lr, xpsr, etc.).

  • read_variable

    Read 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_breakpoints

    Remove every breakpoint and watchpoint that is currently set.

  • remove_breakpoint

    Remove the breakpoint at the given address.

  • remove_conditional_breakpoint

    Remove the conditional breakpoint at the given address.

  • remove_watchpoint

    Remove the watchpoint at the given address.

  • reset

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

  • resume

    Resume 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_command

    Run any raw OpenOCD TCL command and return its output. Use this for anything not covered by the other tools.

  • set_permissions

    Adjust 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_config

    Show the current effective project settings and where they came from.

  • start_openocd

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

  • status

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

  • step

    Execute a single instruction and halt again.

  • stop_openocd

    Stop the OpenOCD process this server started.

  • watch_variables

    Live-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_memory

    Write 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_register

    Write a 32-bit value to a peripheral register by name (e.g. 'GPIOA.ODR').

  • write_register

    Write a value to a CPU register. value: hex string, e.g. '0x20001000'

  • write_variable

    Write 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
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)