Skip to main content
Glama
re-gdb

re-gdb

by Heretek-RE

re-gdb

MCP server wrapping GDB + GEF for dynamic analysis. Spawns a persistent GDB subprocess per session and drives it via the GDB/MI protocol.

Tools

Tool

What it does

check_gdb

Confirm gdb + GEF

start_session

Open a session, optionally load a binary

end_session

Tear down a session

run_to_breakpoint

Set a BP and run

step_count

Single-step N times, return registers

read_memory

x/N fmt ADDR

gef_heap

GEF heap chunks

gef_canary

GEF canary

gef_registers

GEF registers

gef_vmmap

GEF vmmap

gef_nearpc

GEF nearpc

gef_pattern_create / gef_pattern_offset

Cyclic-pattern helpers

attach_pid

Attach to a running process

Related MCP server: gdb-mcp

Install

# System dependency
apt install gdb        # Debian/Ubuntu
brew install gdb        # macOS
scoop install gdb       # Windows

# GEF (auto-installed by install.sh to ~/.gdb/gef.py)
curl -fsSL https://github.com/hugsy/gef/raw/main/gef.py -o ~/.gdb/gef.py

# Python
pip install -e ./servers/re-gdb

Safety

Never run unsigned binaries on a host you care about. Use a sandbox, a VM, or a Docker container. Dynamic analysis on untrusted samples is dangerous.

Available Tools

14 tools
attach_pidC

Attach to a running process by PID.

Inputs: session (required), pid (required).

check_gdbA

Return gdb version + whether GEF is configured.

Inputs: no named parameters.

end_sessionC

Tear down a GDB session.

Inputs: session (required).

gef_canaryD

GEF: stack canary check.

Inputs: session (required).

gef_heapC

GEF: heap chunks (glibc malloc bins).

Inputs: session (required).

gef_nearpcB

GEF: nearpc (look ahead N instructions from PC).

Inputs: session (required), n.

gef_pattern_createA

Create a cyclic pattern of length bytes (for offset-finding).

Inputs: length (required).

gef_pattern_offsetB

Find the offset of value in a cyclic pattern.

Inputs: value (required).

gef_registersC

GEF: registers (extended view).

Inputs: session (required).

gef_vmmapC

GEF: vmmap (mapped regions with perms).

Inputs: session (required).

read_memoryC

Read count memory units at addr.

Inputs: session (required), addr (required), count, fmt.

run_to_breakpointC

Set a breakpoint at target and run to it.

Inputs: session (required), target (required), condition.

start_sessionC

Open (or reuse) a GDB session. Optionally load a binary.

Inputs: path, gdb_args, session.

step_countC

Single-step count times, return register state after.

Inputs: session (required), count.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3/5.0

    Scored across 14 tools

    Disambiguation5/5

    Each tool targets a distinct GDB operation or GEF feature, with clear separation between session management, memory reading, stepping, breakpoints, and specific GEF utilities. No two tools have overlapping purposes.

    Naming Consistency5/5

    Tool names follow a predictable pattern: core GDB operations use verb_noun (attach_pid, read_memory) while GEF-specific tools use the gef_ prefix followed by a noun (gef_heap, gef_registers). Within each subgroup, naming is consistent and intuitive.

    Tool Count5/5

    14 tools is well-scoped for a GDB interface, covering essential debugger actions (attach, breakpoint, step, memory read) and key GEF features (heap, registers, vmmap, canary, pattern). Not too few nor overwhelming.

    Completeness3/5

    Covers core debugging operations but misses common tasks like memory write, expression evaluation, breakpoint deletion, continuing execution, and arbitrary command execution. These gaps may limit agent autonomy for complex reverse engineering workflows.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      An MCP server that enables AI assistants to control GDB debugging sessions, including breakpoint management, thread analysis, and variable inspection, using the GDB/MI protocol.
      22
      1
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      MCP server that wraps gdb to enable LLMs to drive live debugging sessions, including starting sessions on binaries, attaching to processes, and running commands.
      7
      2,027 PyPI
      4
      MIT
    • A
      license
      Not graded
      quality
      F
      maintenance
      MCP server for reverse engineering Windows executables and related binary formats, offering static analysis, Ghidra-assisted function recovery, plugin-driven tooling, and optional isolated Windows runtime execution.
      238
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      GDB MCP server for binary security research (reverse engineering / PWN) with first-class pwndbg integration, enabling heap analysis, cyclic pattern, checksec, ROP gadgets, and more via MCP protocol.
      27
      1
      MIT