SuperAPI AI Directory

mcp_server_gdb

mcp_server_gdb is a GDB/MI protocol server based on the MCP protocol, used to let AI assistants remotely debug applications. It supports creating and managing GDB debugging sessions, setting and managing breakpoints, viewing stack information and variables, controlling program execution (run, pause, step, etc.), and supports concurrent multi-session debugging. The project also provides a built-in TUI for inspecting agent behavior (in development). The server supports two transport modes: Stdio (default) and SSE, with the SSE default address being http://127.0.0.1:8080,可通过修改 src/config.rs or environment variables to adjust the server IP address and GDB command timeout.

Open website

About this tool

mcp_server_gdb is a GDB/MI protocol server based on the MCP protocol, with the goal of providing AI assistants with remote application debugging capabilities.

Purpose: Expose GDB's debugging capabilities to AI assistants through the MCP protocol, enabling AI assistants to participate in remote debugging workflows.

Main capabilities:

  • Create and manage GDB debugging sessions;
  • Set and manage breakpoints;
  • View stack information and variables;
  • Control program execution (run, pause, step, etc.);
  • Support concurrent multi-session debugging;
  • Built-in TUI for inspecting agent behavior in order to improve prompts (in development, WIP).

Usage:

  • Precompiled binaries: binaries for the corresponding working platform can be found on the release page and run directly.
  • Build from source: clone the repository and build with cargo; if Nix is already installed, you can run the project directly without cloning, or enter a development shell containing all dependencies and then run ./mcp-server-gdb directly.
  • Transport modes: supports Stdio (default, standard input/output transport) and SSE (Server-Sent Events transport, default address http://127.0.0.1:8080)。
  • Configuration: the server IP address and GDB command timeout (in seconds) can be adjusted by modifying the src/config.rs file or via environment variables.

Supported MCP tools:

  • Session management: create_session (create a new GDB debugging session), get_session (get information about a specific session), get_all_sessions (get all sessions), close_session (close a session), start_debugging (start debugging), stop_debugging (stop debugging), continue_execution (continue execution), step_execution (step into the next line), next_execution (step over the next line).
  • Breakpoint management: get_breakpoints (get the breakpoint list), set_breakpoint (set a breakpoint), delete_breakpoint (delete a breakpoint).
  • Debugging information: get_stack_frames (get stack frame information), get_local_variables (get local variables), get_registers (get registers), read_memory (read memory contents).

Applicable scenarios: development and debugging scenarios that require AI assistants to participate in GDB remote debugging, breakpoint management, program execution control, and viewing debugging information.

Limitations: the materials do not provide pricing, cost, platform compatibility details, performance data, or complete usage steps; the built-in TUI feature is marked as in development (WIP).