Debug microcontrollers from Claude via OpenOCD: flash, breakpoints, memory and registers by name.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
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.
Once connected to a target through a debug probe (ST-Link, J-Link, CMSIS-DAP, β¦), your AI assistant can:
.elf / .bin / .hex images.elf symbols (e.g. read_variable uart_rx_count)RCC.CR, GPIOA.MODER)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.
Any MCP-compatible client works. Tested and known to work:
| Client | Platform |
|---|---|
| Claude Code | CLI / IDE |
| Claude Desktop | macOS / Windows |
| Cursor | IDE |
| Windsurf | IDE |
| Cline | VS Code extension |
| Continue | VS Code / JetBrains |
| Zed | Editor |
| VS Code + GitHub Copilot | IDE (agent mode) |
| Gemini CLI | CLI |
Prerequisites: Python 3.10+ and a debug probe connected to your target.
Clone and install the package into a virtual environment:
Install it (creates the openocd-mcp command):
Windows shortcut: run
setup.batβ it creates the environment, installs the package, and registers it with Claude Code automatically.
OpenOCD is obtained automatically: a build for your OS/architecture is
downloaded and cached on first connect (checksum-verified). You can also fetch it
ahead of time with openocd-mcp install-openocd, or use an existing install by
setting the OPENOCD_BIN environment variable.
The server executable is:
Restart Claude Code, then verify with claude mcp list.
Add to claude_desktop_config.json (Edit β Settings β Developer β Edit Config):
Restart Claude Desktop.
Add to ~/.cursor/mcp.json (or .cursor/mcp.json in your project):
Restart Cursor.
Add to ~/.codeium/windsurf/mcp_config.json:
Restart Windsurf.
Open the Cline panel β MCP Servers β Add Server β Manual, then enter:
Add to ~/.continue/config.json:
Add to .vscode/mcp.json in your workspace (or user settings.json):
Enable via Chat β Agent mode in VS Code.
There's no self-update tool exposed over MCP β updating means running commands in
a terminal, either yourself or by asking an AI that has shell access (e.g. Claude
Code). After updating, restart your AI client so it loads the new server;
if it was mid-session, it may need to stop the old openocd-mcp process first
(a file lock can block the reinstall while it's running).
PyPI install (pip install openocd-mcp or uvx):
Editable git-clone install (what setup.bat / this repo's instructions set up):
Check the installed version with pip show openocd-mcp.
Each firmware project tells the server which target it's debugging. Create an
openocd-mcp.json in your project root (a template is in
openocd-mcp.example.json):
target_cfg / interface_cfg β OpenOCD configs (relative to its scripts dir).
Defaults to an ST-Link probe; set target_cfg for your chip.transport β "swd" or "jtag". Set "swd" for a J-Link on Cortex-M
(with interface_cfg: "interface/jlink.cfg"); leave empty for ST-Link.svd_file β CMSIS-SVD file for the chip (enables peripheral registers by name).elf_file β your firmware build output (enables variables by name).J-Link on Windows: OpenOCD reaches J-Links via libusb, so bind the J-Link's debug interface to libusbK (or WinUSB) with Zadig once (Interface 2 / MI_02). Newer SEGGER software (v7.x+) is compatible with libusbK, so both OpenOCD and SEGGER tools can coexist. ST-Link works without that step.
Or simply tell the AI the chip you're using and it will configure the session for
you. show_config reports the active settings at any time.
With the board plugged in, describe what you want β the AI picks the right tools:
| You say⦠| What happens |
|---|---|
| "connect and halt the target" | Starts OpenOCD if needed, attaches, halts the CPU |
| "what's the status?" | Reports running/halted and the current program counter |
"read the variable sensor_value" | Looks it up in the .elf and reads it off the chip |
"set motor_enabled to 1" | Writes the variable by name |
"watch tick_count live for 2 seconds" | Calls watch_variables β samples it repeatedly without halting and returns a table of values over time, right in the chat |
"read GPIOA.MODER" | Reads the register and decodes its named bitfields |
"list the RCC registers" | Lists registers from the SVD |
"break at 0x08001234, then reset and run" | Sets a breakpoint and resets |
"break at 0x08001234 when r0 is 42" | Sets a conditional breakpoint (using [get_reg r0] == 42) |
"break at 0x08001234 after 5 hits" | Sets a hit-count breakpoint |
"watch for writes to 0x20000000" | Sets a hardware data watchpoint |
"flash build/firmware.elf and run it" | Programs, verifies, and restarts |
"dump 64 bytes of RAM at 0x20000000" | Reads memory |
You don't call tools by name β describe the goal and the AI maps it to the underlying tools.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/openocd-debugger)<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>