# STM32 GDB Debugger

> STM32 GDB Debugger is an open-source MCP server for developer tools. Debug STM32 firmware on real hardware through GDB and OpenOCD, ST-Link or J-Link. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Windows, macOS, Linux
- **Repository:** https://github.com/zeraissh/stm32-gdb-mcp
- **MCP Registry name:** io.github.Zeraissh/stm32-gdb-mcp
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-23

## About

This server gives an AI agent a structured way to debug STM32 microcontrollers rather than reading raw GDB text. It drives arm-none-eabi-gdb with a GDB server such as OpenOCD, J-Link or st-util, and returns decoded results with suggested next actions. The README positions it against generic GDB servers and probe-rs-based ones, noting that probe-rs servers suit RISC-V or ESP32 targets while this one is for STM32 Cortex-M.

Tools span bring-up and flashing (detect_probe, flash_and_run, self_check), execution control (run_and_wait, breakpoint, step, debug_until), state inspection (capture_state, read_memory, read_registers, read_peripheral_register decoded from SVD files), fault triage (reconstruct_fault_context, diagnose_fault, analyze_stack), FreeRTOS inspection and logging over RTT, SWO or UART. A symbolized PC sampler, scenario replay and exported debug reports are also provided, and sessions let several boards be handled by name.

Compact mode is on by default, showing a core set of tools while the rest stay reachable through call(tool, args). Everything runs locally; the README says nothing leaves your machine unless an agent calls report_issue, which files a GitHub issue through your own gh login, and that there is no telemetry. It needs a GDB and a GDB server on PATH.

## Features

- **Decoded results:** Returns structured output with suggested next actions instead of raw GDB text.
- **HardFault triage:** Maps a fault PC to source and analyses the stack.
- **FreeRTOS awareness:** Reads tasks, stacks and queues.
- **SVD peripheral registers:** Decodes peripheral registers from SVD files.
- **One-call composites:** flash_and_run and debug_until collapse many calls into one.
- **Multi-board sessions:** Name sessions to handle several boards.
- **Log capture:** Collects RTT, SWO and UART output.

## Good for

- Flash firmware and run it with one call
- Find the source line behind a HardFault
- Inspect FreeRTOS tasks and stack usage
- Read decoded peripheral registers while halted
- Sample the program counter to find hot spots

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add stm32-gdb-mcp -- uvx stm32-gdb-mcp
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "stm32-gdb-mcp": {
      "command": "uvx",
      "args": [
        "stm32-gdb-mcp"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "stm32-gdb-mcp": {
      "command": "uvx",
      "args": [
        "stm32-gdb-mcp"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "stm32-gdb-mcp": {
      "command": "uvx",
      "args": [
        "stm32-gdb-mcp"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "stm32-gdb-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "stm32-gdb-mcp"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add stm32-gdb-mcp -- uvx stm32-gdb-mcp
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.stm32-gdb-mcp]
command = "uvx"
args = ["stm32-gdb-mcp"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "stm32-gdb-mcp": {
      "command": "uvx",
      "args": [
        "stm32-gdb-mcp"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user stm32-gdb-mcp uvx -- stm32-gdb-mcp

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "stm32-gdb-mcp": {
      "command": "uvx",
      "args": [
        "stm32-gdb-mcp"
      ]
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "stm32-gdb-mcp": {
      "command": "uvx",
      "args": [
        "stm32-gdb-mcp"
      ]
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "stm32-gdb-mcp": {
      "command": "uvx",
      "args": [
        "stm32-gdb-mcp"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "stm32-gdb-mcp": {
      "command": "uvx",
      "args": [
        "stm32-gdb-mcp"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "stm32-gdb-mcp": {
      "command": "uvx",
      "args": [
        "stm32-gdb-mcp"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "stm32-gdb-mcp": {
      "command": "uvx",
      "args": [
        "stm32-gdb-mcp"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "stm32-gdb-mcp": {
      "command": "uvx",
      "args": [
        "stm32-gdb-mcp"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "stm32-gdb-mcp": {
      "command": "uvx",
      "args": [
        "stm32-gdb-mcp"
      ]
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 2 of 14 tools change data; 7 names don't say. From the server's own tool labels and tool names; not verified by us.

- `flash_and_run` (name suggests: changes): Flashes firmware and runs it in one call.
- `debug_until`: Runs the target until a condition is hit.
- `run_and_wait` (name suggests: changes): Runs and returns a structured stop event.
- `breakpoint`: Sets a breakpoint.
- `capture_state`: Captures target state while halted.
- `read_memory` (name suggests: reads): Reads target memory.
- `read_registers` (name suggests: reads): Reads CPU registers.
- `read_peripheral_register` (name suggests: reads): Reads a peripheral register decoded from SVD.
- `diagnose_fault`: Diagnoses a fault.
- `reconstruct_fault_context`: Maps a fault PC to source.
- `analyze_stack` (name suggests: reads): Analyses the stack.
- `read_freertos` (name suggests: reads): Reads FreeRTOS tasks, stacks and queues.
- `sample_pc`: Symbolized program counter sampler.
- `detect_probe`: Detects the connected debug probe.

## FAQ

### What hardware does STM32 GDB Debugger need?

An STM32 target with a probe such as ST-Link, J-Link or CMSIS-DAP via OpenOCD, plus a GDB server and arm-none-eabi-gdb or gdb-multiarch.

### Does STM32 GDB Debugger send data anywhere?

No telemetry; only report_issue contacts GitHub, using your own gh login.

### Which targets are covered?

STM32 Cortex-M; for RISC-V or ESP32 the README suggests probe-rs-based servers.

### How do I install STM32 GDB Debugger?

Run uvx stm32-gdb-mcp or install the Claude Code plugin.

### Is STM32 GDB Debugger free?

Yes. STM32 GDB Debugger is open source, so you can use and self-host it for free.

### How do I add STM32 GDB Debugger to Claude Code?

Run this command in your terminal: claude mcp add stm32-gdb-mcp -- uvx stm32-gdb-mcp

### What are the best alternatives to STM32 GDB Debugger?

The closest alternatives to STM32 GDB Debugger are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [awesome-mcp-servers](https://ai-powered.com/mcp/awesome-mcp-servers-2): awesome-mcp-servers is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/stm32-gdb-debugger
