1. Conduid
  2. AI
  3. Gdb MCP
MCP server · AI

Gdb MCP

High-quality GDB/MI protocol MCP server with ratatui TUI for AI coding agents

Unclaimed MIT ai
59Fair

Scored 11 days ago · breakdown

About Gdb MCP

Gdb MCP is an MCP server published by datobena in the AI category: high-quality GDB/MI protocol MCP server with ratatui TUI for AI coding agents.

The repository has 4 stars and 1 forks, with the last commit 5 months ago. Recent commit activity is the strongest signal that reported issues will get attention.

Install

From source
git clone https://github.com/datobena/gdb-mcp

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about Gdb MCP

Powered by Claude · Grounded in docs

I know everything about Gdb MCP. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

Static checks derived from the repository 4 days ago. Heuristics on the source, not an audit.

  • ✓README presentThe repository ships documentation.
  • ✓License declaredUsable under a stated license.
  • !Tests presentNo tests found. Behaviour changes may go unnoticed between versions.
  • !Dependencies pinnedNo lockfile. Installs can pull different code over time.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

1 check has not been run yet.

Releases

v1.0.1v1.0.1 · 11 Dec 2025

README

gdb-mcp

Model Context Protocol server that wraps gdb so an LLM can drive live debugging sessions. The server exposes tools for starting a session on a binary, attaching to an existing PID, running ad-hoc commands, batching commands, checking status, and shutting sessions down.

Requires gdb on the host and the mcp python package (v1+).

Setup

Install from PyPI (preferred):

pip install gdb-mcp

You can also install from source, inside a virtualenv (recommended) or directly:

# optional but recommended
python -m venv .venv
. .venv/bin/activate

pip install -e .
# or: pip install .

Running the MCP server

You can start the server directly:

gdb-mcp
# or
python -m gdb_mcp.server

The server uses stdio for transport (the default for most MCP clients). Point your MCP client configuration at the command above.

One-shot client configuration

Run gdb-mcp --install to add the server to any detected MCP-aware clients without editing config files by hand. The installer currently knows how to update:

  • Codex CLI (~/.codex/config.toml)
  • Claude Desktop configs (common Linux/macOS paths)
  • Cursor / Windsurf MCP config files (if present)

Use --install-command /custom/path/to/gdb-mcp or --install-args ... if you need to override what gets written.

Exposed tools

  • start_binary(binary_path, args=None, cwd=None, load_init=True, start_timeout=30.0, prompt=None, force_prompt=True) – launch gdb against a target binary (with optional args) and return a session id and the initial banner. Set load_init=False to skip user gdbinit (default is to load it so helpers like GEF/pwndbg remain enabled). Increase start_timeout if loading extensions takes longer to reach the first prompt. Use prompt to force a specific prompt string (defaults cover (gdb), (pwndbg), and gef>). force_prompt sets the prompt to the chosen value after startup to avoid timeouts from customized prompts (e.g., pwndbg); set force_prompt=False if you need to keep your custom prompt unchanged.
  • attach_to_pid(pid, cwd=None, load_init=True, start_timeout=30.0, prompt=None, force_prompt=True) – start gdb and attach to a running process (same load_init/timeout/prompt behavior as above).
  • gdb_command(session_id, command, timeout_seconds=15.0) – execute a single gdb command in the given session and return the output.
  • batch_commands(session_id, commands, timeout_seconds=15.0) – run a list of commands sequentially.
  • list_sessions() – get a snapshot of all active sessions.
  • session_status(session_id) – check if the gdb process is still alive.
  • stop_session(session_id) – shut down the gdb process and remove it.

Each tool returns simple JSON so it is easy to route back into your LLM prompt.

Notes and tips

  • The server automatically disables pagination and confirmation prompts and enables pending breakpoints to keep interactions non-blocking.
  • timeout_seconds applies per command. If you expect a program to run for a long time, pass a larger timeout or None.
  • Output is captured from gdb stdout/stderr until the next (gdb) prompt. If you spawn a program that never returns to the prompt (e.g., it blocks on input), the call will time out.
  • Common debugger prompts are detected automatically ((gdb), (pwndbg), gef>), even with ANSI colors. You can still pass a custom prompt if you use something nonstandard. By default the server forces the prompt to a stable value (force_prompt=True) so gdbinit customizations (like pwndbg) don’t prevent the initial prompt from being detected.

Demo

Auto-playing preview:

Demo

Source video: docs/media/demo.mp4

Credits

  • This project was built for my CSE 598 class, which emphasized using AI/LLMs in our workflow. I leaned on AI to write the entire project—including this README.
  • Inspired by https://github.com/mrexodia/ida-pro-mcp, and their server logic was used as a starting point.

README fetched from the repository 4 days ago. The original is authoritative.

Questions

About Gdb MCP

How do I install Gdb MCP?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Gdb MCP safe to use with an AI agent?

Its trust score is 59 out of 100 (fair). It passes 2 of the 5 static security checks run so far; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Gdb MCP still maintained?

Yes — the last commit was 5 months ago. The repository has 4 stars and 1 forks.