DebugForge
Integrates with GitHub Copilot to perform TRACE32 debugging via MCP, allowing AI-driven hardware debugging.
Allows Hermes agents to connect to TRACE32 for autonomous debugging tasks via MCP.
Enables Codex CLI (OpenAI) to access and control a TRACE32 debugger for autonomous hardware debugging.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@DebugForgeSet a breakpoint at main and read the call stack"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Highlights
47 MCP Tools — Full TRACE32 access for AI agents: execution control, breakpoints, memory, registers, variables, symbols, and more
Autonomous Debugging — AI agents can independently connect to your target, reproduce issues, locate root causes, and suggest fixes
Project-Aware — Configure once via
debugforge.toml, your AI agent automatically knows your ELF paths, flash scripts, and TRACE32 setupReal Hardware — Battle-tested on TC397 TriCore via USB. Your AI agent controls actual silicon, not a simulator
Advanced Breakpoints — Conditional, data watchpoints, hit-count, task-specific, action triggers, and temporary breakpoints
Deep Inspection — AI agents can read call stacks with locals, expand structs, view disassembly, inspect peripherals
Any MCP Agent — Works with Claude Code, Codex CLI, Qwen, or any MCP-compatible AI assistant
Zero Lock-in — MIT licensed, open source, no vendor dependencies beyond TRACE32 itself
Related MCP server: gdb_mcp
Architecture
┌─────────────────┐ MCP (stdio) ┌──────────────┐ PYRCL/TCP ┌──────────────┐
│ │◄───────────────────────────►│ │◄─────────────────────►│ │
│ AI Agent │ JSON-RPC tool calls │ DebugForge │ Remote Control API │ TRACE32 │
│ (Claude Code, │ (47 debugging tools) │ MCP Server │ (lauterbach-trace32 │ PowerView │
│ Codex, etc.) │ │ │ -rcl) │ │
│ │◄───────────────────────────►│ │◄─────────────────────►│ │
└─────────────────┘ Results └──────────────┘ Hardware └──────┬───────┘
│
┌──────▼───────┐
│ Target MCU │
│ (e.g. TC397) │
└──────────────┘Quick Start
# 1. Install DebugForge
pip install debugforge
# 2. Install TRACE32 Python package (from your TRACE32 installation)
pip install <YOUR_T32_PATH>/demo/api/python/rcl/dist/lauterbach_trace32_rcl-*.whl
# 3. Add to your AI agent's MCP config (e.g. .claude/settings.json){
"mcpServers": {
"debugforge": {
"command": "debugforge"
}
}
}# 4. Start TRACE32 with API port enabled, then ask your AI agent:
# "Connect to TRACE32, load the firmware, find why the system crashes at boot"Installation
Prerequisites
Requirement | Details |
Python | 3.10 or higher |
TRACE32 | PowerView running with Remote API enabled |
PYRCL |
|
Step 1: Install DebugForge
pip install debugforgeOr install from source:
git clone https://github.com/YangPan2020/debugforge.git
cd debugforge
pip install -e .Step 2: Install TRACE32 Python Library
The PYRCL wheel is bundled with your TRACE32 installation:
pip install <T32_INSTALL_PATH>/demo/api/python/rcl/dist/lauterbach_trace32_rcl-*.whlReplace
<T32_INSTALL_PATH>with your TRACE32 installation directory (e.g.,/opt/t32,C:\T32).
Step 3: Enable TRACE32 Remote API
Add these lines to your TRACE32 configuration file (.t32 or config.t32):
RCL=NETTCP
PORT=20000Then restart TRACE32 PowerView.
Configuration
MCP Client Setup
All MCP-compatible AI agents use the same configuration — register debugforge as an MCP server:
{
"mcpServers": {
"debugforge": {
"command": "debugforge"
}
}
}Agent | Config File | Notes |
Claude Code |
| Also supports |
Gemini CLI |
| |
GitHub Copilot |
| VS Code extension |
Antigravity CLI | MCP config | |
Codex CLI | MCP config | |
DeepSeek | MCP config | |
Hermes Agent | MCP config |
Auto-connect example (skip manual connect() call):
{
"mcpServers": {
"debugforge": {
"command": "debugforge",
"env": {
"T32_AUTO_CONNECT": "true",
"T32_PORT": "20000"
}
}
}
}Project Configuration (debugforge.toml)
Create a debugforge.toml in your project root to tell your AI agent about your debugging environment:
[trace32]
install_path = "/opt/t32" # TRACE32 installation directory
[connection]
node = "localhost" # TRACE32 host address
port = 20000 # API port (match your .t32 config)
protocol = "TCP" # TCP or UDP
auto_connect = true # Connect when server starts
[project]
elf = "output/build/firmware.elf" # ELF file with debug symbols
map = "output/build/firmware.map" # MAP file (optional)
[scripts]
flash = "tools/Trace32/flash.cmm" # Flash programming script
init = "tools/Trace32/startup.cmm" # Target init scriptAll relative paths are resolved from the directory containing debugforge.toml.
See debugforge.example.toml for a complete template.
Environment Variables
Environment variables override debugforge.toml values (highest priority):
Variable | Default | Description |
| — | TRACE32 installation directory |
|
| TRACE32 host address |
|
| TRACE32 API port |
|
| Communication protocol (TCP/UDP) |
|
| Auto-connect on server start |
|
| Path to config file |
Priority: Environment Variables > debugforge.toml > Built-in Defaults
Available Tools (47)
Connection & Configuration
Tool | Description |
| Connect to a TRACE32 PowerView instance |
| Disconnect from TRACE32 |
| Get connection status, TRACE32 version, and system state |
| Get the loaded project configuration (paths, scripts, settings) |
Execution Control
Tool | Description |
| Start/continue program execution |
| Single-step execution (into, over, or out) |
| Stop program execution |
| Reset the target CPU |
| Get current CPU execution state |
| Run until a specific address (temporary breakpoint) |
| Run until current function returns to caller |
| Run to the return instruction of current function |
Breakpoints
Tool | Description |
| Set a program/read/write/readwrite breakpoint |
| List all active breakpoints |
| Delete a breakpoint |
| Enable/disable a breakpoint without deleting |
Advanced Breakpoints
Tool | Description |
| Breakpoint with HLL condition (e.g., |
| Trigger on memory access with optional value match |
| Stop after N-th hit (loop debugging) |
| Trigger only for a specific OS task/thread |
| Execute a TRACE32 command on hit |
| Auto-deletes after first hit |
Memory
Tool | Description |
| Read target memory (hex dump format) |
| Write data to target memory |
| Write a value to a memory address using Data.Set |
Registers
Tool | Description |
| Read a single CPU register |
| Read multiple registers at once |
| Write a value to a CPU register |
Variables
Tool | Description |
| Read a C/C++ variable by symbol name |
| Write a value to a C/C++ variable |
| View a variable/struct/array with full expansion |
| Set a C/C++ variable to a new value |
Symbols
Tool | Description |
| Look up symbol address by name |
| Look up symbol name by address |
Commands & Scripting
Tool | Description |
| Execute any TRACE32 PRACTICE command |
| Run a PRACTICE (.cmm) script with timeout |
| Evaluate a TRACE32 expression or function |
Debug Views
Tool | Description |
| Get call stack with function names |
| Get call stack with all local variables per frame |
| Formatted memory dump (hex + ASCII) |
| Full register view with all flags |
| Disassembly listing at address or current PC |
| Source code around current execution point |
| Get text content of any TRACE32 window command |
System & OS Awareness
Tool | Description |
| List OS tasks/threads |
| Get stack info for OS tasks |
| View peripheral register contents |
Usage Examples
Basic Debug Session
You: "Connect to TRACE32 and help me find why the system crashes after boot"
AI Agent workflow:
1. get_project_config() → learns your ELF path and scripts
2. connect() → connects to TRACE32
3. execute_command("SYStem.Up") → powers up the target
4. execute_command("Data.LOAD.Elf /path/to/firmware.elf")
5. set_breakpoint("main")
6. go() → runs to main
7. step("over") → steps through code
8. get_callstack() → analyzes the call stack
9. read_variable("error_code") → checks variables
→ "Found it: error_code = -1 because init_hardware() fails at line 84"Flash and Debug
You: "Flash the new firmware and verify it boots correctly"
AI Agent workflow:
1. get_project_config() → gets flash script path
2. connect()
3. run_practice("tools/flash.cmm") → flashes firmware
4. reset()
5. set_breakpoint("main")
6. go()
7. get_state() → confirms target stopped at main
→ "Firmware flashed and verified — target stopped at main() successfully"Advanced Debugging
You: "The buffer overflow happens somewhere in process_packet(). Set a watchpoint."
AI Agent workflow:
1. symbol_by_name("rx_buffer") → gets buffer address
2. set_data_breakpoint(address="0xD0001000", access="write", size=256)
3. go()
4. get_callstack() → sees who wrote beyond the buffer
5. get_disassembly() → examines the offending instruction
6. read_memory("0xD0001000", 512) → shows the corrupted data
→ "Overflow at process_packet+0x4C: memcpy writes 320 bytes into 256-byte buffer"Supported AI Agents
Agent | Status | Configuration |
✅ Tested |
| |
✅ Compatible |
| |
✅ Compatible |
| |
✅ Compatible | MCP stdio transport | |
✅ Compatible | MCP stdio transport | |
✅ Compatible | MCP stdio transport | |
✅ Compatible | MCP stdio transport | |
✅ Compatible | MCP stdio transport | |
Any MCP Client | ✅ Compatible | Standard MCP protocol |
Development
Setup
git clone https://github.com/YangPan2020/debugforge.git
cd debugforge
pip install -e ".[dev]"Run Tests
pytest tests/ -vCode Style
This project uses Ruff for linting and formatting:
ruff check src/ tests/
ruff format src/ tests/Contributing
See CONTRIBUTING.md for guidelines.
Roadmap
HTTP/SSE transport for remote debugging
Auto-start/manage TRACE32 lifecycle
ELF/MAP static analysis tools
Multi-core debugging (multiple simultaneous connections)
Trace data analysis and visualization
Flash programming tools (dedicated, beyond script execution)
License
MIT — free for personal and commercial use.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/YangPan2020/debugforge'
If you have feedback or need assistance with the MCP directory API, please join our Discord server