Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

mcp_server_gdb

MCP.Pizza Chef: pansila

mcp_server_gdb is an MCP server implementing the GDB/MI protocol to provide remote debugging capabilities. It supports managing multiple debug sessions, setting breakpoints, inspecting stack and variables, and controlling program execution. It enables AI assistants to interact with live debugging sessions, enhancing developer workflows with real-time insights and control. The server supports stdio and SSE transports and includes a TUI for prompt improvement.

Use This MCP server To

Remotely debug applications using GDB with AI assistance Manage multiple concurrent GDB debug sessions Set and control breakpoints programmatically via MCP Inspect stack frames and variable states during debugging Control program execution flow (run, pause, step) remotely Integrate AI agents to analyze and suggest debugging actions Use TUI to monitor and improve AI assistant debugging prompts

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

Usage

  1. Just run it directly: ./mcp-server-gdb
  2. 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 session
  • get_session - Get specific session information
  • get_all_sessions - Get all sessions
  • close_session - Close session

Debug Control

  • start_debugging - Start debugging
  • stop_debugging - Stop debugging
  • continue_execution - Continue execution
  • step_execution - Step into next line
  • next_execution - Step over next line

Breakpoint Management

  • get_breakpoints - Get breakpoint list
  • set_breakpoint - Set breakpoint
  • delete_breakpoint - Delete breakpoint

Debug Information

  • get_stack_frames - Get stack frame information
  • get_local_variables - Get local variables
  • get_registers - Get registers
  • read_memory - Read memory contents

License

MIT

mcp_server_gdb FAQ

How do I start the mcp_server_gdb?
Run the binary directly with `./mcp-server-gdb`. It supports stdio and SSE transports.
Can I debug multiple applications simultaneously?
Yes, mcp_server_gdb supports concurrent multi-session debugging.
What transport modes does mcp_server_gdb support?
It supports stdio (default) and Server-Sent Events (SSE) transports.
How can I set breakpoints using this server?
You can set and manage breakpoints through the MCP protocol commands exposed by the server.
Is there a user interface for monitoring debugging sessions?
Yes, there is a built-in TUI to inspect agent behaviors and improve prompts (work in progress).
How do I build mcp_server_gdb from source?
Clone the repo and run `cargo build --release` followed by `cargo run`.
Can AI assistants interact with the debugging sessions?
Yes, the server is designed to enable AI assistants to control and analyze debug sessions.
Where can I find pre-built binaries?
Pre-built binaries are available on the release page of the GitHub repository.