GDB

v1.0.0Developer Toolsstable

** - A GDB/MI protocol server based on the MCP protocol, providing remote application debugging capabilities with AI assistants.

agentaillmmcpmcp-server
Share:
65
Stars
0
Downloads
0
Weekly
0/5

What is GDB?

GDB is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to ** - a gdb/mi protocol server based on the mcp protocol, providing remote application debugging capabilities with ai assistants.

** - A GDB/MI protocol server based on the MCP protocol, providing remote application debugging capabilities with AI assistants.

This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • ** - A GDB/MI protocol server based on the MCP protocol, pro

Use Cases

Remote application debugging with GDB/MI protocol
Breakpoints and step-through debugging for agents
pansila

Maintainer

LicenseMIT License
Languagerust
Versionv1.0.0
UpdatedMay 19, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx mcp-server-gdb

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use GDB

MCP Server GDB implements the GDB/MI protocol over MCP, giving AI assistants the ability to launch and control GDB debugging sessions for native applications. It exposes tools for managing debug sessions, setting and removing breakpoints, stepping through code, inspecting stack frames, reading local variables, and examining memory and registers — enabling AI-driven debugging workflows where the assistant can iteratively diagnose crashes and logical errors. Built in Rust, it supports both stdio and Server-Sent Events transport modes and can be run from pre-built binaries or compiled with Cargo.

Prerequisites

  • GDB installed and available on your system PATH
  • The target application binary compiled with debug symbols (e.g., compiled with -g flag in GCC/Clang)
  • Rust stable toolchain if building from source (cargo build --release)
  • Or Nix if using the Nix flake build
  • An MCP-compatible client such as Claude Desktop or Claude Code
1

Download or build the binary

Download a pre-built binary from the GitHub releases page, or build from source using Cargo.

# Build from source:
git clone https://github.com/pansila/mcp_server_gdb.git
cd mcp_server_gdb
cargo build --release
# Binary will be at ./target/release/mcp-server-gdb

# Or with Nix:
nix run .
2

Verify GDB is available

Confirm GDB is installed and accessible from your PATH before configuring the MCP server.

gdb --version
3

Configure your MCP client

Add the GDB MCP server to your client configuration. Point the command to the compiled binary.

{
  "mcpServers": {
    "gdb": {
      "command": "/path/to/mcp-server-gdb"
    }
  }
}
4

Start a debugging session

Ask your AI assistant to create a GDB session for your target binary. The server will launch GDB with MI mode and return a session ID for subsequent operations.

5

Set breakpoints and step through code

Use the MCP tools to set breakpoints by file and line number, start execution, and step through code. The AI assistant can interpret the results and suggest fixes.

GDB Examples

Client configuration

Claude Desktop config for the GDB MCP server using the compiled binary.

{
  "mcpServers": {
    "gdb": {
      "command": "/usr/local/bin/mcp-server-gdb"
    }
  }
}

Prompts to try

Example debugging requests once the GDB MCP server is connected.

- "Create a GDB session for my binary at ./target/debug/myapp and start debugging"
- "Set a breakpoint at main.c line 42 and run the program"
- "Show me the current stack frames and local variables"
- "Step through the next 5 lines and show me the state after each step"
- "Read the memory at address 0x7fff... and tell me what it contains"
- "List all current breakpoints and then continue execution"

Troubleshooting GDB

GDB session fails to start or returns 'GDB not found'

Verify GDB is installed and on your PATH by running 'gdb --version'. On macOS, you may need to install it via Homebrew: 'brew install gdb'. On Ubuntu/Debian: 'apt install gdb'.

Breakpoints are not hit or the program runs to completion without stopping

Ensure your binary was compiled with debug symbols. Use -g with GCC/Clang or build in debug mode with Cargo ('cargo build' without --release). Optimized builds (-O2/-O3) may inline or eliminate code that breakpoints target.

SSE transport mode is not reachable

SSE mode listens on http://127.0.0.1:8080 by default. Check that the port is not blocked by a firewall and that another process is not already using port 8080. The server port can be adjusted in src/config.rs before building.

Frequently Asked Questions about GDB

What is GDB?

GDB is a Model Context Protocol (MCP) server that ** - a gdb/mi protocol server based on the mcp protocol, providing remote application debugging capabilities with ai assistants. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install GDB?

Follow the installation instructions on the GDB GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with GDB?

GDB works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is GDB free to use?

Yes, GDB is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More Developer Tools MCP Servers

Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "mcp-server-gdb": { "command": "npx", "args": ["-y", "mcp-server-gdb"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use GDB?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides