Debug AI Applications Remotely with GDB
Drives GDB remotely via GDB/MI - breakpoints, stepping, stack/register/memory inspection - with support for concurrent multi-session debugging.
Maintainer of this project? Claim this page to edit the listing.
0.2.3Add to Favorites
Why it matters
Enable remote debugging of AI assistants by providing a GDB/MI protocol server. Facilitates breakpoint management, execution control, and multi-session debugging for enhanced development and troubleshooting.
Outcomes
What it gets done
Create and manage GDB debugging sessions remotely.
Control program execution including start, stop, step, and continue.
Set, delete, and retrieve breakpoints for targeted debugging.
Inspect stack frames, local variables, and registers during debugging.
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/vb-gdb | bash Capabilities
Tools your agent gets
Create a new GDB debugging session
Get information about a specific session
Get all sessions
Close a session
Start debugging
Stop debugging
Continue execution
Step to the next line
Overview
GDB MCP Server
This MCP server implements GDB/MI to give an AI assistant remote debugging capabilities - breakpoints, execution control, and stack/register/memory inspection - with concurrent multi-session support. Use it when an assistant needs to actively debug a running program rather than analyze code statically. Requires GDB installed on the system.
What it does
MCP Server GDB implements the GDB/MI protocol as an MCP server, giving AI assistants remote application debugging capabilities: creating and managing GDB debug sessions, setting and managing breakpoints, controlling program execution (run, pause, step into, step over), and inspecting stack frames, local variables, registers, and raw memory. It supports concurrent multi-session debugging, so multiple debug sessions can run side by side, and includes a built-in TUI (work in progress) for inspecting how the AI agent is behaving during a debugging session, useful for refining prompts.
When to use - and when NOT to
Use this when you want an AI assistant to debug a running program directly - setting breakpoints, stepping through execution, examining the call stack, local variables, or memory contents at a specific point - rather than reasoning about code statically. It requires GDB itself to be available on the system since this server drives GDB through the machine-oriented GDB/MI interface. It supports stdio (default) or SSE transport (default http://127.0.0.1:8080).
Capabilities
Session: create_session, get_session, get_all_sessions, close_session. Debug control: start_debugging, stop_debugging, continue_execution, step_execution (step into), next_execution (step over). Breakpoints: get_breakpoints, set_breakpoint, delete_breakpoint. Debug info: get_stack_frames, get_local_variables, get_registers, read_memory.
How to install
Download a pre-built binary for your platform from the releases page, or build from source:
cargo build --release
cargo run
Or with Nix: nix run . (local) or nix run "git+https://github.com/pansila/mcp_server_gdb.git" (remote). Run directly with ./mcp-server-gdb. Server IP, port, and GDB command timeout are configurable via src/config.rs or environment variables.
Who it's for
Developers who want an AI assistant to actively debug a running program via GDB - setting breakpoints, stepping through code, and inspecting live state - rather than just reading source statically, including workflows that debug multiple sessions concurrently. Licensed MIT.
Source README
MCP Server GDB
A GDB/MI protocol server based on the MCP protocol, providing remote application debugging capabilities with AI assistants.
Features
- Create and manage GDB debug sessions
- Set and manage breakpoints
- View stack information and variables
- Control program execution (run, pause, step, etc.)
- Support concurrent multi-session debugging
- A built-in TUI to inspect agent behaviors so that you can improve your prompt (WIP)
Installation
Pre-built Binaries
Find the binaries in the release page, choose one per your working platform, then you can run it directly.
Build From Source
Clone the repository and build it by cargo
cargo build --release
cargo run
Using Nix
If you have Nix installed, you can run the project without cloning:
Run locally (after cloning)
nix run .
Run remotely from GitHub
nix run "git+https://github.com/pansila/mcp_server_gdb.git" -- --help
Development environment
To enter a development shell with all dependencies:
nix develop
Usage
- Just run it directly:
./mcp-server-gdb - The server supports two transport modes:
- Stdio (default): Standard input/output transport
- SSE: Server-Sent Events transport, default at
http://127.0.0.1:8080
Configuration
You can adjust server configuration by modifying the src/config.rs file or by environment variables:
- Server IP Address
- Server port
- GDB command timeout time (in seconds)
Supported MCP Tools
Session Management
create_session- Create a new GDB debugging sessionget_session- Get specific session informationget_all_sessions- Get all sessionsclose_session- Close session
Debug Control
start_debugging- Start debuggingstop_debugging- Stop debuggingcontinue_execution- Continue executionstep_execution- Step into next linenext_execution- Step over next line
Breakpoint Management
get_breakpoints- Get breakpoint listset_breakpoint- Set breakpointdelete_breakpoint- Delete breakpoint
Debug Information
get_stack_frames- Get stack frame informationget_local_variables- Get local variablesget_registers- Get registersread_memory- Read memory contents
FAQ
Common questions
Discussion
Questions & comments ยท 0
Sign In Sign in to leave a comment.