mcp_server_gdb
MCP Server to expose the GDB debugging capabilities
claude mcp add --transport stdio pansila-mcp_server_gdb docker run -i pansila/mcp_server_gdb
How to use
MCP Server GDB provides a remote debugging experience built on the MCP protocol, exposing GDB/MI-style debugging capabilities over lightweight transport. It supports multiple concurrent debugging sessions, allowing you to create and manage separate GDB sessions, set breakpoints, inspect stack frames and variables, and control program execution (run, pause, step, continue, etc.). The server also offers a built-in, work-in-progress TUI to inspect agent behaviors, which can help you refine prompts and prompts-driven workflows during debugging sessions.
Usage typically involves starting the server (via Docker in this configuration) and then connecting a client that speaks the MCP/GDB protocol. You can manage sessions, retrieve debugging information, and issue control commands through the available MCP endpoints such as create_session, get_session, set_breakpoint, get_stack_frames, read_memory, and more. By supporting both standard Stdio-like and SSE transports, the server can accommodate a variety of client setups and tooling ecosystems.
How to install
Prerequisites:
- Docker installed and running (recommended for this deployment).
- Basic familiarity with GDB/MI debugging workflow.
Installation steps:
-
Pull and run the MCP GDB server container: docker pull pansila/mcp_server_gdb docker run -it --rm pansila/mcp_server_gdb
-
Alternative: Build locally with Dockerfile (if you prefer to build your own image): git clone https://github.com/pansila/mcp_server_gdb.git cd mcp_server_gdb docker build -t pansila/mcp_server_gdb . docker run -it --rm pansila/mcp_server_gdb
-
If you want to run without Docker, you would need a compatible Rust build environment and run the binary directly (not covered by this Docker-based setup). Ensure you have Rust and Cargo installed, then build and run the server accordingly.
Note: The provided repository primarily demonstrates a Dockerized deployment path. If you require a non-Docker setup, please refer to the repository's build instructions for cargo-based execution.
Additional notes
Environment and configuration tips:
- The server accepts multiple MCP tools for session management, debug control, breakpoint management, and debug information retrieval. Use create_session to start a new GDB session, then issue commands like start_debugging, set_breakpoint, and get_stack_frames to drive the session.
- Transport mode: The README notes Stdio (default) and SSE transports. Ensure your client is configured to communicate over the supported transport. For the Docker image, the container will expose the appropriate ports unless overridden; consult the container's runtime docs for port mappings.
- GDB command timeout and server IP/port are configurable via environment variables or the source configuration (refer to the README’s Configuration section). Adjust as needed to fit your network environment and debugging requirements.
- If you encounter issues with multi-session isolation, verify that each session has unique identifiers and that your client properly scopes commands per session.
- The TUI feature is WIP; rely on standard MCP tooling for debugging tasks and use the TUI for exploratory agent behavior inspection when available.
Related MCP Servers
hyper
📦️ A fast, secure MCP server that extends its capabilities through WebAssembly plugins.
MCP-PostgreSQL-Ops
🔍Professional MCP server for PostgreSQL operations & monitoring: 30+ extension-independent tools for performance analysis, table bloat detection, autovacuum monitoring, schema introspection, and database management. Supports PostgreSQL 12-17.
robot_MCP
A simple MCP server for the SO-ARM100 control
ummon
The semantic layer for software engineering: Connect code to meaning, build on understanding
your-money-left-the-chat
A Rust + MCP powered financial tracker that knows exactly where your money ghosted you.
mcp-framework
Rust MCP framework for building AI agents