# mcu-debug-mcp

> mcu-debug-mcp is an MCP server for developer tools. Embedded-hardware debugging for AI: serial ports, fault decoding and log analysis. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Platforms:** CLI
- **Repository:** https://github.com/stillsurge/mcu-debug-mcp
- **MCP Registry name:** io.github.stillsurge/mcu-debug-mcp
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools), [manufacturing](https://ai-powered.com/categories/manufacturing)
- **Listing updated:** 2026-11-23

## About

This server lets an assistant read real bytes from an attached development board instead of relying on a description of what went wrong. It combines serial port tools with a built-in library of 45 fault patterns, flash-failure explanations, Modbus and NMEA parsing, pin-conflict checks across three engines, board notes for boards such as the Blue Pill and Black Pill, and a set of verified driver templates. The README counts 59 tools and 16 MCP resources.

Hardware safety is the main design point. The default mode is read-only: opening ports to write, sending AT commands, baud scans and flashing are refused with an explanation, and writing needs MCU_DEBUG_MCP_MODE=write. A port deny list protects devices you are using, and flashing needs both dry_run=False and confirm=True.

It also decodes Cortex-M fault registers, traces stacks, parses linker map files, and, with a bridge firmware on an STM32 board, scans I2C, SPI and 1-Wire buses. The README is written in Chinese; the server is installed from PyPI.

## Features

- **Safe by default:** Read-only mode with a port deny list and a two-step gate before flashing.
- **Fault knowledge:** 45 log patterns plus flash-failure rules explain common embedded problems.
- **Protocol parsing:** Parses Modbus RTU, NMEA GPS sentences and custom binary frames.
- **Cortex-M tools:** Decodes fault registers, unwinds stacks and looks up symbols.
- **Pin and board checks:** Catches conflicting or invented pin assignments against board data.

## Good for

- Diagnose why a sensor returns garbage over UART
- Work out why a flash tool cannot connect to a chip
- Check a wiring plan for pin conflicts before building
- Decode a hard fault from register values

## Install

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

```sh
claude mcp add mcu-debug-mcp -- uvx mcu-debug-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": {
    "mcu-debug-mcp": {
      "command": "uvx",
      "args": [
        "mcu-debug-mcp"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "mcu-debug-mcp": {
      "command": "uvx",
      "args": [
        "mcu-debug-mcp"
      ]
    }
  }
}
```

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

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

```json
{
  "mcpServers": {
    "mcu-debug-mcp": {
      "command": "uvx",
      "args": [
        "mcu-debug-mcp"
      ]
    }
  }
}
```

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

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

```json
{
  "mcpServers": {
    "mcu-debug-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "mcu-debug-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 mcu-debug-mcp -- uvx mcu-debug-mcp
```

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

```toml
[mcp_servers.mcu-debug-mcp]
command = "uvx"
args = ["mcu-debug-mcp"]
```

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

```json
{
  "mcpServers": {
    "mcu-debug-mcp": {
      "command": "uvx",
      "args": [
        "mcu-debug-mcp"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user mcu-debug-mcp uvx -- mcu-debug-mcp

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

```json
{
  "mcpServers": {
    "mcu-debug-mcp": {
      "command": "uvx",
      "args": [
        "mcu-debug-mcp"
      ]
    }
  }
}
```

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

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

```json
{
  "mcpServers": {
    "mcu-debug-mcp": {
      "command": "uvx",
      "args": [
        "mcu-debug-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": {
    "mcu-debug-mcp": {
      "command": "uvx",
      "args": [
        "mcu-debug-mcp"
      ]
    }
  }
}
```

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

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "mcu-debug-mcp": {
      "command": "uvx",
      "args": [
        "mcu-debug-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": {
    "mcu-debug-mcp": {
      "command": "uvx",
      "args": [
        "mcu-debug-mcp"
      ]
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "mcu-debug-mcp": {
      "command": "uvx",
      "args": [
        "mcu-debug-mcp"
      ]
    }
  }
}
```

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

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

```json
{
  "mcpServers": {
    "mcu-debug-mcp": {
      "command": "uvx",
      "args": [
        "mcu-debug-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": {
    "mcu-debug-mcp": {
      "command": "uvx",
      "args": [
        "mcu-debug-mcp"
      ]
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 4 of 10 tools read data; 6 names don't say. From the server's own tool labels and tool names; not verified by us.

- `serial_list` (name suggests: reads): Lists serial ports and recognises common USB-serial chips.
- `analyze_log` (name suggests: reads): Analyses logs against the built-in fault patterns.
- `modbus_parse`: Parses Modbus RTU frames.
- `pin_check` (name suggests: reads): Checks pin assignments for conflicts.
- `decode_fault`: Decodes Cortex-M fault registers.
- `flash_firmware`: Flashes firmware, in dry-run mode by default.
- `flash_verify`: Compares a file with the contents of the chip.
- `i2c_scan`: Scans an I2C bus through a bridge board.
- `nmea_parse`: Parses NMEA 0183 GPS sentences.
- `env_status` (name suggests: reads): Reports the current mode, port lists and disabled operations.

## FAQ

### Will mcu-debug-mcp write to my hardware by default?

No. The default isolation mode is readonly; writes, baud scans and flashing are refused until you set MCU_DEBUG_MCP_MODE=write.

### How do I protect a port I am using?

Set MCU_DEBUG_MCP_PORT_DENY to a comma-separated list such as COM6,COM28; deny overrides allow.

### How is flashing gated?

It needs both dry_run=False and confirm=True; otherwise it only previews.

### What do the bus tools need?

A microcontroller running the MCUDBG/1 bridge firmware; source is included for NUCLEO-H563ZI.

### How do I add mcu-debug-mcp to Claude Code?

Run this command in your terminal: claude mcp add mcu-debug-mcp -- uvx mcu-debug-mcp

### What are the best alternatives to mcu-debug-mcp?

The closest alternatives to mcu-debug-mcp 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.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [awesome-mcp-servers](https://ai-powered.com/mcp/awesome-mcp-servers-2): awesome-mcp-servers is an open-source MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/mcu-debug-mcp
