Debug_Mcp
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., "@Debug_McpRead the variable g_bms.pack[2].soc"
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.
Debug_Mcp
IAR-style non-halting live-attach debug tool for Cortex-M via pyOCD
Debug_Mcp is a read-only MCP (Model Context Protocol) server that connects to a running Cortex-M target without resetting or halting it (connect_mode=attach). It provides DWARF-based C variable resolution, symbol lookup, memory read, register snapshot, and more - all through a JSON-lines stdio interface.
Features
Non-halting live attach - connects to a running Cortex-M via pyOCD without reset or halt (connect_mode=attach, auto_unlock=false, jlink.power=false)
C variable expression resolver - resolves symbols through DWARF debug info from the matching AXF/ELF/OUT file
Read-only safety - no write, flash, erase, breakpoint, reset, or run-control operations are exposed
Snapshot mode - halts the target briefly, reads multiple variables coherently, then resumes
Register read - captures r0-r12, sp, lr, pc, xpsr (halts briefly if running)
Memory read - chunked reads up to a 64 KB safety cap
Auto-discovery of AXF/ELF/OUT files under a project root directory
Symtab fallback - when DWARF is not available, falls back to the ELF symbol table
Bitfield support - decodes DWARF4 LSB-based and DWARF3 MSB-based bitfields
Enum mapping - resolves enum names from debug info
JSON-lines stdio - stdin/stdout MCP protocol
Related MCP server: jlink-mcp
Operations (MCP tools)
Operation | Description |
attach | Select a pyOCD probe (J-Link, ST-Link, CMSIS-DAP) and attach via SWD/JTAG |
detach | Close the pyOCD session and release the probe |
status | Return current connection state and target run status |
read_memory | Read raw bytes from target memory at a given address |
resolve_symbol | Look up a linker symbol address and size from the AXF |
read_symbol | Resolve a symbol, then read its stored bytes from target memory |
read_variable | Read a single C variable (DWARF-resolved, supports member/array/pointer) |
read_variables | Batch read up to 64 C variables in one call |
read_registers | Read core registers (halts briefly if running, then resumes) |
snapshot | Halt, read registers + variables coherently in one instant, then resume |
find_axf | Recursively search a directory for .axf/.elf/.out files |
shutdown | Detach and exit |
C Expression Support
The DWARF resolver supports:
symbol
symbol.member
symbol.arr[5]
symbol.member[2].subfield
Pointer dereference: *ptr or ptr->field
Function calls, address-of, and casts are rejected.
Requirements
Python 3.10+
pyocd >= 0.45.0
pyelftools >= 0.33
cmsis-pack-manager >= 0.6.0
pylink-square >= 1.7.0
A supported debug probe (J-Link, ST-Link, CMSIS-DAP, etc.)
A Cortex-M target built with debug symbols (AXF/ELF/OUT, e.g. Keil MDK output)
Quick Start
1. Install dependencies
pip install -r requirements.txt2. List probes
python -m pyocd listTake note of the probe serial number, e.g. J-Link [000123456789].
3. Connect as an MCP server
The server speaks JSON-lines over stdin/stdout. Register it in your MCP client (Claude Desktop, Claude Code, etc.):
{
"command": "python",
"args": ["live_attach.py"]
}Example JSON-lines transcript:
{"id": 1, "operation": "attach", "arguments": {"probe_serial": "000123456789", "protocol": "swd", "clock_hz": 2000000}}
{"id": 2, "operation": "read_variable", "arguments": {"axf_file": "C:/firmware/project.axf", "expression": "g_bms.pack[2].soc"}}
{"id": 3, "operation": "read_registers"}
{"id": 4, "operation": "shutdown"}4. Using the pre-built executable
A pre-built Windows executable (DebugMcp.exe) is included. Run it directly; it behaves exactly like live_attach.py:
DebugMcp.exeSafety
connect_mode=attach - the target is never reset or halted on connect
No write tools - there are no variable-write, memory-write, flash, erase, breakpoint, reset, or run-control operations
Read failure is not zero - errors are returned faithfully; callers must not treat a failed read as a zero value
Probe state preserved - the probe is left in its original connection state when the session ends
Notes
This project does not use Keil UVSC64.dll / UVSOCK; it talks to the probe directly via pyOCD, so it does not require Keil MDK.
It works with any toolchain that produces DWARF debug info: Keil MDK (.axf), GCC (.elf), IAR (.out).
snapshot and read_registers halt the target briefly; everything else is non-halting.
License
MIT - see LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
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.
Related MCP Connectors
Live browser debugging for AI assistants — DOM, console, network via MCP.
Drive real devices from your AI Coding tool. Embed a client SDK (Unity, Godot, Flutter, iOS/macOS, Android, React Native, Web) in your app, then capture screenshots, traverse the UI tree, inject taps and key events, and run automated test tasks on the physical device over a secure relay.
Enable secure connectivity between Sentry issues and debugging data, and LLM clients, using a Model Context Protocol (MCP) server.
The Cortex MCP server provides read-only access to real-time engineering context from the Cortex developer portal, allowing AI coding assistants to answer natural language questions about your organization's catalog (microservices, libraries, domains, teams, infrastructure), scorecards (engineering standards and best practices), initiatives (goals and deadlines), and Engineering Intelligence metrics. It includes tools for querying documentation, tracking personal entities, and accessing AI-assisted insights across the entire Cortex ecosystem.
Related MCP Servers
- AlicenseBqualityCmaintenanceСonnects to live JVMs via JDWP protocol, enabling LLM agents to autonomously debug Java applications — attach to a running process, pause threads, set breakpoints (including conditional), inspect stacks with auto-resolved object fields, evaluate methods, set variable values, and diagnose issues like deadlocks and hung queries.281MIT
- AlicenseAqualityDmaintenanceEnables AI assistants like Claude to directly debug microcontrollers via JLink, supporting breakpoints, single-step, memory/register access, variable inspection, RTT logging, and firmware flashing.255MIT
- AlicenseNot gradedqualityDmaintenanceAttaches to a running C++ process and exposes tools to inspect live memory via a resident GDB subprocess, enabling LLMs to read fields, follow pointers, and access STL containers without modifying target code.MIT
- AlicenseAqualityDmaintenanceEnables AI tools to perform full-featured embedded microcontroller debugging via pyOCD and CMSIS-DAP probes, including probe management, flashing, breakpoints, register/memory access, fault analysis, and RTT communication.581MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- 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/xhw949/Debug_Mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server