Debug bare-metal kernels in QEMU through its gdbstub without installing a gdb binary.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent โ or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag โ we're steadily working through the catalog.
๐ก Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by Gdbstub MCP.
debug_connectConnect to a gdbstub (`port`, default 1234) and optionally load an `elf` with symbols. Several named sessions can be open at once.
debug_disconnectRemove breakpoints, detach (the guest keeps running) and close the session.
debug_sessionsList sessions: endpoint, running or halted, ELF, breakpoint count.
debug_registersRead registers: a chosen list, the general set, or `all=True` for control, segment and FPU registers. Flags are decoded and pointers symbolized.
debug_set_registerWrite a register.
debug_memoryRead memory as a hexdump, as symbolized pointer-sized `words`, or as a `string`.
gdbstub-mcp connects an MCP client to a program running under QEMU's built-in gdbstub. It implements the GDB Remote Serial Protocol directly, so the debugging process does not require a gdb executable. The primary use case is bare-metal and kernel development, including failures that occur before the program can print useful diagnostics.
The gdbstub-mcp MCP server can load an ELF file for symbols and source-line information. Addresses may be expressed as numeric values, symbols, symbol offsets, source locations, or stack-pointer expressions. Multiple named debugging sessions can remain open at the same time.
Start QEMU with its gdbstub enabled and, when needed, paused before the first instruction. A typical setup uses port 1234, QEMU's -s option, and -S to halt execution. The MCP client then calls debug_connect, optionally supplying the ELF file. The server communicates with QEMU over TCP while the agent controls execution through MCP tools.
Symbol data is read locally from the ELF file. It can identify functions, source lines, and offsets in register, memory, breakpoint, disassembly, and backtrace results. Backtraces use a frame-pointer walk when possible; the automatic mode can instead scan the stack for likely return addresses when frame pointers are unavailable.
For x86 crashes, debug_explain_fault reads a QEMU log produced with interrupt and CPU-reset logging enabled. It extracts the exception sequence, decodes relevant error information, and identifies how an initial fault escalated to a double or triple fault.
Install the package with:
The server requires Python 3.10 or newer and runs as a stdio MCP server. Claude Code can register it with:
Other MCP clients can launch the same executable as a stdio server. To support fault analysis, configure QEMU to write an interrupt log with -d int,cpu_reset -D int.log -no-reboot. The gdbstub port can be changed when connecting; port 1234 is the default.
The gdbstub-mcp MCP server exposes tools for:
This is a machine-level debugger. It provides symbols, source lines, registers, memory, and disassembly, but does not provide source-level next or finish operations, local-variable inspection, or C-expression evaluation.
Stack scanning is heuristic and can report stale frames. For more reliable backtraces, compile the kernel with frame pointers enabled, such as -fno-omit-frame-pointer. Fault explanation supports x86 QEMU logs only. The project is tested against QEMU's gdbstub; other implementations of the remote protocol are untested.
Factual signals from GitHub, npm, and our automated checks โ not a rating.
No reviews yet โ be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/gdbstub-mcp)<a href="https://allmcps.com/mcp/gdbstub-mcp"><img src="https://allmcps.com/api/badge/gdbstub-mcp?style=directory" alt="Gdbstub MCP on AllMCPs" /></a>