GDB
** - A GDB/MI protocol server based on the MCP protocol, providing remote application debugging capabilities with AI assistants.
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
Maintainer
Works with
Installation
Manual Installation
npx mcp-server-gdbConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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 .Verify GDB is available
Confirm GDB is installed and accessible from your PATH before configuring the MCP server.
gdb --versionConfigure 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"
}
}
}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.
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.
GDB Alternatives — Similar Developer Tools Servers
Looking for alternatives to GDB? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
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.
Set Up GDB in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.