OpenOCD Debugger logo

OpenOCD Debugger

Debug OpenOCD-supported microcontrollers through an MCP-compatible AI client, including flashing, execution control, variables, memory, and registers.

Install OpenOCD Debugger

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "openocd-debugger": {
      "command": "uvx",
      "args": [
        "openocd-mcp"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

OpenOCD Debugger MCP server connects an MCP-compatible AI client to microcontrollers through OpenOCD and a debug probe. It can flash ELF, BIN, and HEX firmware, control execution, inspect memory and CPU registers, and set breakpoints or watchpoints. Optional ELF and CMSIS-SVD files enable variable and peripheral-register access by name. Reach for it when an AI-assisted debugging workflow needs direct access to an OpenOCD-supported target.

Use cases

  • Flash and verify microcontroller firmware
  • Halt and step through embedded code
  • Inspect variables and peripheral registers by name
  • Set conditional breakpoints and memory watchpoints
  • Monitor variables without stopping the target

Key features

  • OpenOCD-backed microcontroller debugging
  • ELF, BIN, and HEX flashing with verification
  • Execution control and register or memory access
  • Conditional, hit-count, and hardware breakpoints
  • ELF variables and CMSIS-SVD registers by name
  • Live variable sampling with safety gates

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 2d ago

Recent health check succeeded.

4/4 checks healthy over the last 41d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 14d ago via OSV.dev · openocd-mcp (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars4Stargazers on the source repository.
Last commit3mo agoMost recent push to the default branch.

How OpenOCD Debugger works

What OpenOCD Debugger MCP server does

The OpenOCD Debugger MCP server exposes microcontroller debugging operations through MCP. It works with targets supported by OpenOCD and uses a connected debug probe such as ST-Link, J-Link, or CMSIS-DAP. The server is chip-agnostic at the MCP layer; the target is selected through OpenOCD configuration.

Firmware images in ELF, BIN, or HEX formats can be programmed and verified. An AI client can also halt, resume, single-step, and reset the CPU, inspect or modify memory, and read or write CPU registers. Hardware and software breakpoints are supported, including conditional and hit-count variants. Hardware watchpoints can stop execution when an address is read, written, or accessed.

An ELF file adds symbol-aware variable access, so variables can be read or written by name. A CMSIS-SVD file adds named peripheral-register access with decoded bitfields, such as RCC.CR or GPIOA.MODER. Live variable watching samples values over time without halting the CPU and can expand structs and arrays using DWARF type information.

How it works

The server communicates with OpenOCD, either by starting it when a session needs it or by using an existing executable. OpenOCD then connects to the target through the configured probe and transport. The project configuration identifies the target configuration and can optionally identify the interface, transport, ELF, and SVD files.

A typical session starts with connecting to and halting the target, followed by status inspection or a debugging action selected by the AI client. The active settings can be checked with show_config. SWD and JTAG transports are supported; the README specifically describes J-Link on Cortex-M with a J-Link interface configuration and SWD transport.

The OpenOCD Debugger MCP server includes permission controls intended to limit unexpected target changes. These include read-only mode, gated flash erase, and flash path and size limits.

Setup and configuration

Use Python 3.10 or newer and connect a debug probe to the target. The repository can be installed in a virtual environment, producing the openocd-mcp executable. A Windows setup.bat shortcut creates the environment, installs the package, and registers it with Claude Code.

OpenOCD is downloaded for the local platform and cached on first connection with checksum verification. It can also be installed in advance with openocd-mcp install-openocd. To use an existing OpenOCD installation, set OPENOCD_BIN to its executable.

Create openocd-mcp.json in the firmware project. Set target_cfg to the chip configuration, and optionally set interface_cfg, transport, svd_file, and elf_file. Paths and configuration names must match the OpenOCD installation and the project layout. A J-Link on Windows requires its debug interface to be bound to libusbK or WinUSB for OpenOCD access.

Register the executable as a local stdio MCP server in the chosen client, then restart that client. The README provides registration examples for Claude Code, Claude Desktop, Cursor, Windsurf, Cline, Continue, and VS Code with GitHub Copilot.

Tools and capabilities

The documented operations cover:

  • Programming and verifying ELF, BIN, and HEX firmware.
  • Halting, resuming, stepping, and resetting execution.
  • Reading and writing memory and CPU registers.
  • Creating hardware or software breakpoints, including conditional and hit-count breakpoints.
  • Creating hardware watchpoints for read, write, or access events.
  • Reading and writing ELF-backed variables by symbol name.
  • Sampling variables without stopping the CPU, with typed struct and array expansion.
  • Reading CMSIS-SVD peripheral registers and named bitfields.
  • Reporting the active debugging configuration.

The OpenOCD Debugger MCP server does not expose an MCP self-update tool. Updating requires a terminal command such as a package upgrade, a refreshed uvx invocation, or a Git pull followed by installation when dependencies change. Restart the AI client after updating.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about OpenOCD Debugger

OpenOCD Debugger is an MCP server that connects AI clients to microcontrollers through OpenOCD and a debug probe such as ST-Link, J-Link, or CMSIS-DAP. Its main tools cover firmware flashing, execution control, memory and CPU-register access, breakpoints, watchpoints, named ELF variables, and CMSIS-SVD peripheral registers.

Install it in a Python 3.10+ virtual environment from the repository, then register the resulting `openocd-mcp` executable as a local stdio server in your MCP client. OpenOCD downloads automatically on first connection, or you can run `openocd-mcp install-openocd` first.

Yes, OpenOCD Debugger works with Cursor through a local MCP configuration. Add the server executable to `~/.cursor/mcp.json` or the project’s `.cursor/mcp.json`, then restart Cursor.

Provide the firmware ELF through `elf_file` in `openocd-mcp.json`, then request the variable by symbol name. The ELF supplies the symbols and DWARF type information used for named reads, writes, and live watching.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewOpenOCD Debugger AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/openocd-debugger?style=directory)](https://allmcps.com/mcp/openocd-debugger)
HTML Embed
<a href="https://allmcps.com/mcp/openocd-debugger"><img src="https://allmcps.com/api/badge/openocd-debugger?style=directory" alt="OpenOCD Debugger on AllMCPs" /></a>