embedded-debugger-mcp

Adancurusul/embedded-debugger-mcp

3.4

If you are the rightful owner of embedded-debugger-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The Embedded Debugger MCP Server is a professional Model Context Protocol server designed for embedded debugging with real hardware integration, supporting ARM Cortex-M and RISC-V microcontrollers.

Tools
22
Resources
0
Prompts
0

Embedded Debugger MCP Server

Rust RMCP

A professional Model Context Protocol (MCP) server for embedded debugging with probe-rs. Provides AI assistants with comprehensive debugging capabilities for embedded systems including ARM Cortex-M, RISC-V microcontrollers with real hardware integration.

๐Ÿ“– Language Versions: |

โœจ Features

  • ๐Ÿš€ Production Ready: Real hardware integration with 22 comprehensive debugging tools
  • ๐Ÿ”Œ Multi-Probe Support: J-Link, ST-Link V2/V3, DAPLink, Black Magic Probe
  • ๐ŸŽฏ Complete Debug Control: Connect, halt, run, reset, single-step execution
  • ๐Ÿ’พ Memory Operations: Read/write flash and RAM with multiple data formats
  • ๐Ÿ›‘ Breakpoint Management: Hardware and software breakpoints with real-time control
  • ๐Ÿ“ฑ Flash Programming: Complete flash operations - erase, program, verify
  • ๐Ÿ“ก RTT Bidirectional: Real-Time Transfer with interactive command/response system
  • ๐Ÿ—๏ธ Multi-Architecture: ARM Cortex-M, RISC-V with tested STM32 integration
  • ๐Ÿค– AI Integration: Perfect compatibility with Claude and other AI assistants
  • ๐Ÿงช Comprehensive Testing: All 22 tools validated with real STM32G431CBTx hardware

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   MCP Client    โ”‚โ—„โ”€โ”€โ–บโ”‚  Embedded        โ”‚โ—„โ”€โ”€โ–บโ”‚  Debug Probe    โ”‚
โ”‚   (Claude/AI)   โ”‚    โ”‚  Debugger MCP    โ”‚    โ”‚  Hardware       โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                              โ”‚
                              โ–ผ
                       โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                       โ”‚  Target Device   โ”‚
                       โ”‚  (ARM/RISC-V)    โ”‚
                       โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿš€ Quick Start

Prerequisites

Hardware Requirements:

  • Debug Probe: ST-Link V2/V3, J-Link, or DAPLink compatible probe
  • Target Board: STM32 or other supported microcontroller
  • Connection: USB cables for probe and target board

Software Requirements:

  • Rust 1.70+
  • probe-rs compatible debug probe drivers

Installation

# Clone and build from source
git clone https://github.com/adancurusul/embedded-debugger-mcp.git
cd embedded-debugger-mcp
cargo build --release

Basic Usage

Configure MCP Clients

Claude Desktop Configuration Example

Add to Claude Desktop configuration file:

Windows Example:

{
  "mcpServers": {
    "embedded-debugger": {
      "command": "C:\\path\\to\\debugger-mcp-rs\\target\\release\\embedded-debugger-mcp.exe",
      "args": [],
      "env": {
        "RUST_LOG": "info"
      }
    }
  }
}

macOS/Linux Example:

{
  "mcpServers": {
    "embedded-debugger": {
      "command": "/path/to/debugger-mcp-rs/target/release/embedded-debugger-mcp",
      "args": [],
      "env": {
        "RUST_LOG": "info"
      }
    }
  }
}

Other examples for other tools like cursor ,claude code etc. please refer to the corresponding tool documentation

๐ŸŽฏ Try the STM32 Demo

We provide a comprehensive STM32 RTT Bidirectional Demo that showcases all capabilities:

# Navigate to the example
cd examples/STM32_demo

# Build the firmware  
cargo build --release

# Use with MCP server for complete debugging experience

What the demo shows:

  • โœ… Interactive RTT Communication: Send commands and get real-time responses
  • โœ… All 22 MCP Tools: Complete validation with real STM32 hardware
  • โœ… Fibonacci Calculator: Live data streaming with control commands
  • โœ… Hardware Integration: Tested with STM32G431CBTx + ST-Link V2

Usage Examples with AI Assistants

List Available Debug Probes
Please list available debug probes on the system
Connect and Flash Firmware
Connect to my STM32G431CBTx using ST-Link probe, then flash the firmware at examples/STM32_demo/target/thumbv7em-none-eabi/release/STM32_demo
Interactive RTT Communication
Please attach RTT and show me the data from the terminal channel. Then send a command 'L' to toggle the LED.
Memory Analysis
Read 64 bytes of memory from address 0x08000000 and analyze the data format
Test All 22 MCP Tools
Please help me test all 22 MCP embedded debugger tools with my STM32 board. Start by connecting to the probe, then systematically test each tool category: probe management, memory operations, debug control, breakpoints, flash operations, RTT communication, and session management.

๐Ÿ› ๏ธ Complete Tool Set (22 Tools)

All tools tested and validated with real STM32 hardware:

๐Ÿ”Œ Probe Management (3 tools)

ToolDescriptionStatus
list_probesDiscover available debug probesโœ… Production Ready
connectConnect to probe and target chipโœ… Production Ready
probe_infoGet detailed session informationโœ… Production Ready

๐Ÿ’พ Memory Operations (2 tools)

ToolDescriptionStatus
read_memoryRead flash/RAM with multiple formatsโœ… Production Ready
write_memoryWrite to target memoryโœ… Production Ready

๐ŸŽฏ Debug Control (4 tools)

ToolDescriptionStatus
haltStop target executionโœ… Production Ready
runResume target executionโœ… Production Ready
resetHardware/software resetโœ… Production Ready
stepSingle instruction steppingโœ… Production Ready

๐Ÿ›‘ Breakpoint Management (2 tools)

ToolDescriptionStatus
set_breakpointSet hardware/software breakpointsโœ… Production Ready
clear_breakpointRemove breakpointsโœ… Production Ready

๐Ÿ“ฑ Flash Operations (3 tools)

ToolDescriptionStatus
flash_eraseErase flash memory sectors/chipโœ… Production Ready
flash_programProgram ELF/HEX/BIN filesโœ… Production Ready
flash_verifyVerify flash contentsโœ… Production Ready

๐Ÿ“ก RTT Communication (6 tools)

ToolDescriptionStatus
rtt_attachConnect to RTT communicationโœ… Production Ready
rtt_detachDisconnect RTTโœ… Production Ready
rtt_channelsList available RTT channelsโœ… Production Ready
rtt_readRead from RTT up channelsโœ… Production Ready
rtt_writeWrite to RTT down channelsโœ… Production Ready
run_firmwareComplete deployment + RTTโœ… Production Ready

๐Ÿ“Š Session Management (2 tools)

ToolDescriptionStatus
get_statusGet current debug statusโœ… Production Ready
disconnectClean session terminationโœ… Production Ready

โœ… 22/22 Tools - 100% Success Rate with Real Hardware

๐ŸŒ Supported Hardware

Debug Probes

  • J-Link: Segger J-Link (all variants)
  • ST-Link: ST-Link/V2, ST-Link/V3
  • DAPLink: ARM DAPLink compatible probes
  • Black Magic Probe: Black Magic Probe
  • FTDI: FTDI-based debug probes

Target Architectures

  • ARM Cortex-M: M0, M0+, M3, M4, M7, M23, M33
  • RISC-V: Various RISC-V cores
  • ARM Cortex-A: Basic support

๐Ÿ† Production Status

โœ… Fully Implemented and Tested

Current Status: PRODUCTION READY

  • โœ… Complete probe-rs Integration: Real hardware debugging with all 22 tools
  • โœ… Hardware Validation: Tested with STM32G431CBTx + ST-Link V2
  • โœ… RTT Bidirectional: Full interactive communication with real-time commands
  • โœ… Flash Operations: Complete erase, program, verify workflow
  • โœ… Session Management: Multi-session support with robust error handling
  • โœ… AI Integration: Perfect MCP protocol compatibility

๐Ÿ™ Acknowledgments

Thanks to the following open source projects:

๐Ÿ“„ License

This project is licensed under the MIT License. See the file for details.


โญ If this project helps you, please give us a Star!