The Embedded Debugger MCP Server provides a professional debugging solution for embedded systems using the Model Context Protocol (MCP). It enables AI assistants to interact with microcontroller hardware through various debug probes, offering comprehensive debugging capabilities for ARM Cortex-M and RISC-V architectures.
# Clone and build from source
git clone https://github.com/adancurusul/embedded-debugger-mcp.git
cd embedded-debugger-mcp
cargo build --release
Add to Claude Desktop configuration file:
Windows:
{
"mcpServers": {
"embedded-debugger": {
"command": "C:\\path\\to\\debugger-mcp-rs\\target\\release\\embedded-debugger-mcp.exe",
"args": [],
"env": {
"RUST_LOG": "info"
}
}
}
}
macOS/Linux:
{
"mcpServers": {
"embedded-debugger": {
"command": "/path/to/debugger-mcp-rs/target/release/embedded-debugger-mcp",
"args": [],
"env": {
"RUST_LOG": "info"
}
}
}
}
A comprehensive STM32 RTT Bidirectional Demo is available to showcase the capabilities:
# Navigate to the example
cd examples/STM32_demo
# Build the firmware
cargo build --release
# Use with MCP server for complete debugging experience
The demo showcases:
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
list_probes
: Discover available debug probesconnect
: Connect to probe and target chipprobe_info
: Get detailed session informationread_memory
: Read flash/RAM with multiple formatswrite_memory
: Write to target memoryhalt
: Stop target executionrun
: Resume target executionreset
: Hardware/software resetstep
: Single instruction steppingset_breakpoint
: Set hardware/software breakpointsclear_breakpoint
: Remove breakpointsflash_erase
: Erase flash memory sectors/chipflash_program
: Program ELF/HEX/BIN filesflash_verify
: Verify flash contentsrtt_attach
: Connect to RTT communicationrtt_detach
: Disconnect RTTrtt_channels
: List available RTT channelsrtt_read
: Read from RTT up channelsrtt_write
: Write to RTT down channelsrun_firmware
: Complete deployment + RTTget_status
: Get current debug statusdisconnect
: Clean session terminationTo add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "embedded-debugger" '{"command":"/path/to/debugger-mcp-rs/target/release/embedded-debugger-mcp","args":[],"env":{"RUST_LOG":"info"}}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"embedded-debugger": {
"command": "/path/to/debugger-mcp-rs/target/release/embedded-debugger-mcp",
"args": [],
"env": {
"RUST_LOG": "info"
}
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"embedded-debugger": {
"command": "/path/to/debugger-mcp-rs/target/release/embedded-debugger-mcp",
"args": [],
"env": {
"RUST_LOG": "info"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect