Adancurusul/embedded-debugger-mcp
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.
Embedded Debugger MCP Server
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)
Tool | Description | Status |
---|---|---|
list_probes | Discover available debug probes | โ Production Ready |
connect | Connect to probe and target chip | โ Production Ready |
probe_info | Get detailed session information | โ Production Ready |
๐พ Memory Operations (2 tools)
Tool | Description | Status |
---|---|---|
read_memory | Read flash/RAM with multiple formats | โ Production Ready |
write_memory | Write to target memory | โ Production Ready |
๐ฏ Debug Control (4 tools)
Tool | Description | Status |
---|---|---|
halt | Stop target execution | โ Production Ready |
run | Resume target execution | โ Production Ready |
reset | Hardware/software reset | โ Production Ready |
step | Single instruction stepping | โ Production Ready |
๐ Breakpoint Management (2 tools)
Tool | Description | Status |
---|---|---|
set_breakpoint | Set hardware/software breakpoints | โ Production Ready |
clear_breakpoint | Remove breakpoints | โ Production Ready |
๐ฑ Flash Operations (3 tools)
Tool | Description | Status |
---|---|---|
flash_erase | Erase flash memory sectors/chip | โ Production Ready |
flash_program | Program ELF/HEX/BIN files | โ Production Ready |
flash_verify | Verify flash contents | โ Production Ready |
๐ก RTT Communication (6 tools)
Tool | Description | Status |
---|---|---|
rtt_attach | Connect to RTT communication | โ Production Ready |
rtt_detach | Disconnect RTT | โ Production Ready |
rtt_channels | List available RTT channels | โ Production Ready |
rtt_read | Read from RTT up channels | โ Production Ready |
rtt_write | Write to RTT down channels | โ Production Ready |
run_firmware | Complete deployment + RTT | โ Production Ready |
๐ Session Management (2 tools)
Tool | Description | Status |
---|---|---|
get_status | Get current debug status | โ Production Ready |
disconnect | Clean 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!