gdb-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
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
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| dbg_startC | Start a debug session. mode: launch|compile_launch|attach. debugger: gdb|lldb. |
| dbg_terminateC | Kill (launch) or detach (attach) and free the session. |
| dbg_continueC | Resume execution until the next stop, exit, or timeout. |
| dbg_stepB | Step the current thread. kind: over|into|out. granularity: line|instruction. |
| dbg_pauseA | Interrupt a running program. This only acknowledges the pause request; it does NOT wait for the stop.
A continue/step in flight holds the session lock for its whole await-for-stop,
so pause must run lock-free to interrupt it. The resulting Residual race (acceptable): pause may transiently reject at the exact instant a continue/step starts, while state is still STOPPED for the microsecond before run_and_wait flips it to RUNNING under the lock. Flipping to RUNNING early (before awaiting the resume response) minimizes this window. |
| dbg_set_breakpointA | Set a breakpoint at file:line OR on a function. Optional condition / hit count / logpoint. |
| dbg_list_breakpointsA | List all breakpoints tracked in this session, with their stable handles. |
| dbg_remove_breakpointB | Remove a breakpoint by its stable session handle and resync the affected list. |
| dbg_set_watchpointB | Set a data breakpoint (watchpoint) on a variable. access: read|write|rw. |
| dbg_backtraceA | Return up to |
| dbg_list_threadsC | List all threads of the debuggee. |
| dbg_select_frameC | Set the active frame for evaluate/scopes/variables. |
| dbg_scopesC | List variable scopes (Locals, Registers, ...) for a frame. |
| dbg_variablesC | List variables under a variablesReference (from scopes or an expandable var). |
| dbg_evaluateB | Evaluate an expression in a frame. Handles reads AND function calls (e.g. 'square(v)' or 'call square(v)'). context: watch|repl|hover. |
| dbg_set_variableC | Set a variable (by container ref + name) to a new value. |
| dbg_read_memoryB | Read |
| dbg_disassembleC | Disassemble around a memory reference. |
| dbg_sourceB | Return source lines around file:line (defaults to the current stop frame). |
| dbg_raw_commandA | Run a raw gdb/lldb command via the DAP evaluate repl context. Use for the long tail no structured tool covers (e.g. 'info registers'). |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 20 tools
Each tool has a clearly distinct purpose. For example, dbg_continue and dbg_step both resume execution but differ explicitly in granularity, and dbg_evaluate vs dbg_raw_command cover expression evaluation and raw commands respectively, leaving no ambiguity.
All tools follow the 'dbg_' prefix followed by a verb_noun pattern (e.g., dbg_set_breakpoint, dbg_list_threads, dbg_source). The naming is uniform and predictable.
20 tools is well-scoped for a debugger MCP server. It covers essential operations without being overwhelming, and each tool earns its place in the set.
The tool surface covers all core debugger actions: session start/terminate, breakpoints, stepping, continue, pause, variable inspection, memory, disassembly, source, threads, and backtrace. There are no obvious gaps for standard debugging workflows.