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,
Add this skill
npx mdskills install adancurusul/embedded-debugger-mcpComprehensive embedded debugging toolkit with 22 production-ready tools validated on real STM32 hardware
1# Embedded Debugger MCP Server23[](https://rust-lang.org)4[](https://github.com/modelcontextprotocol/rust-sdk)5[](LICENSE)67A 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.89> π **Language Versions**: [English](README.md) | [δΈζ](README_zh.md)1011## β¨ Features1213- π **Production Ready**: Real hardware integration with 22 comprehensive debugging tools14- π **Multi-Probe Support**: J-Link, ST-Link V2/V3, DAPLink, Black Magic Probe15- π― **Complete Debug Control**: Connect, halt, run, reset, single-step execution16- πΎ **Memory Operations**: Read/write flash and RAM with multiple data formats17- π **Breakpoint Management**: Hardware and software breakpoints with real-time control18- π± **Flash Programming**: Complete flash operations - erase, program, verify19- π‘ **RTT Bidirectional**: Real-Time Transfer with interactive command/response system20- ποΈ **Multi-Architecture**: ARM Cortex-M, RISC-V with tested STM32 integration21- π€ **AI Integration**: Perfect compatibility with Claude and other AI assistants22- π§ͺ **Comprehensive Testing**: All 22 tools validated with real STM32G431CBTx hardware2324## ποΈ Architecture2526```27βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ28β MCP Client βββββΊβ Embedded βββββΊβ Debug Probe β29β (Claude/AI) β β Debugger MCP β β Hardware β30βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ31 β32 βΌ33 ββββββββββββββββββββ34 β Target Device β35 β (ARM/RISC-V) β36 ββββββββββββββββββββ37```3839## π Quick Start4041### Prerequisites4243**Hardware Requirements:**44- **Debug Probe**: ST-Link V2/V3, J-Link, or DAPLink compatible probe45- **Target Board**: STM32 or other supported microcontroller46- **Connection**: USB cables for probe and target board4748**Software Requirements:**49- Rust 1.70+50- probe-rs compatible debug probe drivers5152### Installation5354```bash55# Clone and build from source56git clone https://github.com/adancurusul/embedded-debugger-mcp.git57cd embedded-debugger-mcp58cargo build --release59```6061### Basic Usage6263**Configure MCP Clients**6465#### Claude Desktop Configuration Example6667Add to Claude Desktop configuration file:6869**Windows Example:**70```json71{72 "mcpServers": {73 "embedded-debugger": {74 "command": "C:\\path\\to\\debugger-mcp-rs\\target\\release\\embedded-debugger-mcp.exe",75 "args": [],76 "env": {77 "RUST_LOG": "info"78 }79 }80 }81}82```8384**macOS/Linux Example:**85```json86{87 "mcpServers": {88 "embedded-debugger": {89 "command": "/path/to/debugger-mcp-rs/target/release/embedded-debugger-mcp",90 "args": [],91 "env": {92 "RUST_LOG": "info"93 }94 }95 }96}97```9899Other examples for other tools like cursor ,claude code etc. please refer to the corresponding tool documentation100101## π― Try the STM32 Demo102103We provide a comprehensive **STM32 RTT Bidirectional Demo** that showcases all capabilities:104105```bash106# Navigate to the example107cd examples/STM32_demo108109# Build the firmware110cargo build --release111112# Use with MCP server for complete debugging experience113```114115**What the demo shows:**116- β **Interactive RTT Communication**: Send commands and get real-time responses117- β **All 22 MCP Tools**: Complete validation with real STM32 hardware118- β **Fibonacci Calculator**: Live data streaming with control commands119- β **Hardware Integration**: Tested with STM32G431CBTx + ST-Link V2120121[π View STM32 Demo Documentation β](examples/STM32_demo/README.md)122123### Usage Examples with AI Assistants124125#### List Available Debug Probes126```127Please list available debug probes on the system128```129130#### Connect and Flash Firmware131```132Connect to my STM32G431CBTx using ST-Link probe, then flash the firmware at examples/STM32_demo/target/thumbv7em-none-eabi/release/STM32_demo133```134135#### Interactive RTT Communication136```137Please attach RTT and show me the data from the terminal channel. Then send a command 'L' to toggle the LED.138```139140#### Memory Analysis141```142Read 64 bytes of memory from address 0x08000000 and analyze the data format143```144145#### Test All 22 MCP Tools146```147Please 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.148```149150## π οΈ Complete Tool Set (22 Tools)151152All tools tested and validated with real STM32 hardware:153154### π Probe Management (3 tools)155| Tool | Description | Status |156|------|-------------|---------|157| `list_probes` | Discover available debug probes | β Production Ready |158| `connect` | Connect to probe and target chip | β Production Ready |159| `probe_info` | Get detailed session information | β Production Ready |160161### πΎ Memory Operations (2 tools)162| Tool | Description | Status |163|------|-------------|---------|164| `read_memory` | Read flash/RAM with multiple formats | β Production Ready |165| `write_memory` | Write to target memory | β Production Ready |166167### π― Debug Control (4 tools)168| Tool | Description | Status |169|------|-------------|---------|170| `halt` | Stop target execution | β Production Ready |171| `run` | Resume target execution | β Production Ready |172| `reset` | Hardware/software reset | β Production Ready |173| `step` | Single instruction stepping | β Production Ready |174175### π Breakpoint Management (2 tools)176| Tool | Description | Status |177|------|-------------|---------|178| `set_breakpoint` | Set hardware/software breakpoints | β Production Ready |179| `clear_breakpoint` | Remove breakpoints | β Production Ready |180181### π± Flash Operations (3 tools)182| Tool | Description | Status |183|------|-------------|---------|184| `flash_erase` | Erase flash memory sectors/chip | β Production Ready |185| `flash_program` | Program ELF/HEX/BIN files | β Production Ready |186| `flash_verify` | Verify flash contents | β Production Ready |187188### π‘ RTT Communication (6 tools)189| Tool | Description | Status |190|------|-------------|---------|191| `rtt_attach` | Connect to RTT communication | β Production Ready |192| `rtt_detach` | Disconnect RTT | β Production Ready |193| `rtt_channels` | List available RTT channels | β Production Ready |194| `rtt_read` | Read from RTT up channels | β Production Ready |195| `rtt_write` | Write to RTT down channels | β Production Ready |196| `run_firmware` | Complete deployment + RTT | β Production Ready |197198### π Session Management (2 tools)199| Tool | Description | Status |200|------|-------------|---------|201| `get_status` | Get current debug status | β Production Ready |202| `disconnect` | Clean session termination | β Production Ready |203204**β 22/22 Tools - 100% Success Rate with Real Hardware**205206## π Supported Hardware207208### Debug Probes209- **J-Link**: Segger J-Link (all variants)210- **ST-Link**: ST-Link/V2, ST-Link/V3211- **DAPLink**: ARM DAPLink compatible probes212- **Black Magic Probe**: Black Magic Probe213- **FTDI**: FTDI-based debug probes214215### Target Architectures216- **ARM Cortex-M**: M0, M0+, M3, M4, M7, M23, M33217- **RISC-V**: Various RISC-V cores218- **ARM Cortex-A**: Basic support219220## π Production Status221222### β Fully Implemented and Tested223224**Current Status: PRODUCTION READY**225226- β **Complete probe-rs Integration**: Real hardware debugging with all 22 tools227- β **Hardware Validation**: Tested with STM32G431CBTx + ST-Link V2228- β **RTT Bidirectional**: Full interactive communication with real-time commands229- β **Flash Operations**: Complete erase, program, verify workflow230- β **Session Management**: Multi-session support with robust error handling231- β **AI Integration**: Perfect MCP protocol compatibility232233## π Acknowledgments234235Thanks to the following open source projects:236237- [probe-rs](https://probe.rs/) - Embedded debugging toolkit238- [rmcp](https://github.com/modelcontextprotocol/rust-sdk) - Rust MCP SDK239- [tokio](https://tokio.rs/) - Async runtime240241## π License242243This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.244245---246247β If this project helps you, please give us a Star!
Full transparency β inspect the skill content before installing.