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.