Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
GDB_MCP_PORTNoPort (default 3939)3939
GDB_MCP_TOKENNoShared token; required for non-loopback listening
GDB_MCP_LOG_DIRNoLog directory for launch tools
GDB_MCP_HOST_BINDNoListen address (default 127.0.0.1)127.0.0.1
GDB_MCP_WSL_DISTRONoWSL distribution for launch tools
GDB_MCP_MAX_MEM_READNoMemory read limit
GDB_MCP_HEARTBEAT_SECNoHeartbeat timeout in seconds
GDB_MCP_MAX_ASYNC_LINENoProtocol frame (async line) limit
GDB_MCP_REQUEST_TIMEOUTNoRequest timeout

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_sessionsA

List all known sessions (gdb plugin connections and launched processes) with their state.

session_statusC

Detailed status of one gdb session: state, inferior info, last stop reason.

quit_gdbA

Detach the MCP plugin from gdb. With kill_gdb=True, also quit gdb itself (and with it the debugged process). Default leaves the externally launched gdb running.

get_process_outputA

Tail the stdout/stderr log of a launched session (gdb or script). Requires the session to have been started by launch_gdb / launch_script.

launch_gdbA

Launch gdb with the MCP plugin loaded inside WSL2 (background process, log captured to a file). program may be a Windows or WSL path; the session registers itself when the plugin connects. With run=True, the inferior is started immediately (equivalent to gdb -ex run).

launch_scriptA

Launch a Python (typically pwntools) script inside WSL2. script must be an absolute Windows or WSL file path; inline code is not supported. If the script starts gdb with the MCP plugin loaded (via gdb_args/gdbscript), the new gdb session id is returned once it registers. A script that exits without gdb returns immediately with its state, return code, and log tail.

kill_sessionA

End a session. For gdb, the default detaches the plugin and leaves gdb running; force=True also terminates gdb. Script sessions are terminated gracefully by default or killed with force=True.

execute_commandA

Execute a raw gdb command and return its output. Use for pwndbg-specific commands (vmmap, heap, got, checksec, ropgadget, search, ...) or any other gdb CLI command. Works while the inferior is running (queued until the next stop).

continue_executionA

Resume the inferior: continue / step / next / stepi / nexti / finish / until. Returns immediately; use wait_for_stop to wait for the next stop event, or rely on the async stop notification.

interruptA

Interrupt the running inferior (equivalent to Ctrl-C in gdb). The inferior stops and a stop notification is emitted.

wait_for_stopA

Wait until the inferior stops (signal, breakpoint, exit) or the timeout elapses. Returns immediately when the inferior is already stopped.

get_stop_reasonB

The reason the inferior last stopped (signal, fault address, breakpoint info).

read_memoryB

Read raw memory from the inferior. address may be an int, a hex string ('0x401000'), or a gdb expression ('main+0x10', '&puts@got'). Returns hex, printable-ascii, and unreadable ranges.

write_memoryB

Write raw bytes (given as a hex string, e.g. '9090c3' or '90 90 c3') to the inferior's memory.

read_registersA

Read register values (all general-purpose registers by default, or the named subset).

write_registerC

Write a register. value is a gdb expression (e.g. '0x401000', '$rax+8', 'main').

get_backtraceC

Stack backtrace: pc, function name, source file/line per frame.

disassembleA

Disassemble count instructions at start (address, gdb expression, function name — or the current PC when omitted).

evaluateA

Evaluate a gdb expression against the live inferior (PIE-aware): 'main', '&puts@got', '$rax+8', '(char*)0x404000'.

list_threadsA

List inferior threads and which one is selected.

select_frameA

Select a stack frame by level (0 = innermost) for subsequent register/memory/local inspection.

get_memory_mapA

Memory mappings of the inferior (info proc mappings — works without pwndbg). For richer output use execute_command('vmmap').

load_targetA

Load a program (file <path>) or core dump (core-file <path>) into the gdb session. For gdb sessions started without an inferior.

set_breakpointC

Set a breakpoint at an address/symbol/expression ('main', '*main+0x20', '0x401000'). Types: breakpoint (software), hw (hardware), watch, hw_watch.

list_breakpointsB

List all breakpoints/watchpoints.

manage_breakpointA

Delete / enable / disable a breakpoint by number.

crash_reportA

One-call crash triage: signal, fault address, PC, registers, backtrace, disassembly around PC, memory at PC/SP/fault address and the head of the memory map. Use after wait_for_stop (or after a stop notification). Best-effort: unreadable pieces are reported in warnings instead of failing the whole call.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Mistyovo/gdb-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server