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.
- π 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
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β MCP Client βββββΊβ Embedded βββββΊβ Debug Probe β
β (Claude/AI) β β Debugger MCP β β Hardware β
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β
βΌ
ββββββββββββββββββββ
β Target Device β
β (ARM/RISC-V) β
ββββββββββββββββββββ
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
# Clone and build from source
git clone https://github.com/adancurusul/embedded-debugger-mcp.git
cd embedded-debugger-mcp
cargo build --release
Configure MCP Clients
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
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
π View STM32 Demo Documentation β
Please list available debug probes on the system
Connect to my STM32G431CBTx using ST-Link probe, then flash the firmware at examples/STM32_demo/target/thumbv7em-none-eabi/release/STM32_demo
Please attach RTT and show me the data from the terminal channel. Then send a command 'L' to toggle the LED.
Read 64 bytes of memory from address 0x08000000 and analyze the data format
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.
All tools tested and validated with real STM32 hardware:
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 |
Tool | Description | Status |
---|---|---|
read_memory |
Read flash/RAM with multiple formats | β Production Ready |
write_memory |
Write to target memory | β Production Ready |
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 |
Tool | Description | Status |
---|---|---|
set_breakpoint |
Set hardware/software breakpoints | β Production Ready |
clear_breakpoint |
Remove breakpoints | β Production Ready |
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 |
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 |
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
- 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
- ARM Cortex-M: M0, M0+, M3, M4, M7, M23, M33
- RISC-V: Various RISC-V cores
- ARM Cortex-A: Basic support
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
Thanks to the following open source projects:
This project is licensed under the MIT License. See the LICENSE file for details.
β If this project helps you, please give us a Star!