MCP GDB Server
MCP GDB 服务器
模型上下文协议 (MCP) 服务器提供 GDB 调试功能,可与 Claude 或其他 AI 助手一起使用。
特征
启动和管理 GDB 调试会话
加载程序和核心转储进行分析
设置断点、单步执行代码并检查内存
查看调用堆栈、变量和寄存器
执行任意 GDB 命令
Related MCP server: GDB MCP Server
安装
# Clone the repository
git clone https://github.com/signal-slot/mcp-gdb.git
cd mcp-gdb
# Install dependencies
npm install
# Build the project
npm run build用法
与 Claude 或其他支持 MCP 的助手一起使用
在 Claude 桌面应用程序或浏览器扩展中配置 MCP 设置以包含此服务器:
{
"mcpServers": {
"gdb": {
"command": "node",
"args": ["/path/to/mcp-gdb/build/index.js"],
"disabled": false
}
}
}重新启动 Claude 或刷新页面。
现在您可以在与 Claude 的对话中使用 GDB 工具。
示例命令
以下是通过 Claude 使用 GDB MCP 服务器的一些示例:
启动 GDB 会话
Use gdb_start to start a new debugging session加载程序
Use gdb_load to load /path/to/my/program with the sessionId that was returned from gdb_start设置断点
Use gdb_set_breakpoint to set a breakpoint at main in the active GDB session运行程序
Use gdb_continue to start execution检查变量
Use gdb_print to evaluate the expression "my_variable" in the current context获取回溯
Use gdb_backtrace to see the current call stack终止会话
Use gdb_terminate to end the debugging session支持的 GDB 命令
gdb_start:启动一个新的 GDB 会话gdb_load:将程序加载到 GDBgdb_command:执行任意 GDB 命令gdb_terminate:终止 GDB 会话gdb_list_sessions:列出所有活动的 GDB 会话gdb_attach:附加到正在运行的进程gdb_load_core:加载核心转储文件gdb_set_breakpoint:设置断点gdb_continue:继续程序执行gdb_step:单步执行程序gdb_next:跳过函数调用gdb_finish:执行直到当前函数返回gdb_backtrace:显示调用堆栈gdb_print:打印表达式的值gdb_examine:检查内存gdb_info_registers:显示寄存器
执照
麻省理工学院
Available Tools
16 toolsgdb_attachC
Attach to a running process
Inputs: pid (required), sessionId (required).
gdb_backtraceC
Show call stack
Inputs: sessionId (required), full, limit.
gdb_commandC
Execute a GDB command
Inputs: command (required), sessionId (required).
gdb_continueC
Continue program execution
Inputs: sessionId (required).
gdb_examineC
Examine memory
Inputs: expression (required), sessionId (required), count, format.
gdb_finishC
Execute until the current function returns
Inputs: sessionId (required).
gdb_info_registersC
Display registers
Inputs: sessionId (required), register.
gdb_list_sessionsB
List all active GDB sessions
Inputs: no named parameters.
gdb_loadC
Load a program into GDB
Inputs: program (required), sessionId (required), arguments.
gdb_load_coreC
Load a core dump file
Inputs: corePath (required), program (required), sessionId (required).
gdb_nextC
Step over function calls
Inputs: sessionId (required), instructions.
gdb_printC
Print value of expression
Inputs: expression (required), sessionId (required).
gdb_set_breakpointC
Set a breakpoint
Inputs: location (required), sessionId (required), condition.
gdb_startC
Start a new GDB session
Inputs: gdbPath, workingDir.
gdb_stepC
Step program execution
Inputs: sessionId (required), instructions.
gdb_terminateC
Terminate a GDB session
Inputs: sessionId (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 16 tools
Every tool has a clearly distinct purpose with no ambiguity. Each tool targets a specific GDB operation like attaching, stepping, examining memory, or managing sessions, making misselection unlikely.
All tools follow a consistent 'gdb_' prefix with descriptive verb_noun patterns (e.g., gdb_attach, gdb_backtrace, gdb_set_breakpoint). This predictability aids agent understanding and usage.
With 16 tools, the count is slightly high but reasonable for a GDB debugging server. It covers essential debugging operations without feeling overly heavy, though it could be streamlined slightly.
The toolset provides complete coverage for GDB debugging workflows, including session management, execution control, breakpoints, memory examination, and stack analysis. No obvious gaps exist for the domain.
Maintenance
Related MCP Connectors
Use your Mac, Windows or Linux computer from ChatGPT, Claude or Codex: files, commands, documents.
Running journal for Claude & ChatGPT: logs runs, reads your history, writes your next session.
Source-checked CLI guides and model-aware planning for Claude Code, Codex, and Grok Build.
Live browser debugging for AI assistants — DOM, console, network via MCP.
Related MCP Servers
- AlicenseAqualityDmaintenanceProvides structured debugging capabilities through LLDB, enabling AI assistants to set breakpoints, inspect variables, analyze crashes, disassemble code, and evaluate expressions in C/C++ programs.173Apache 2.0
- AlicenseCqualityBmaintenanceEnables LLM clients to interact with the GNU Debugger (GDB) for comprehensive debugging and binary analysis. It provides a wide range of tools for program execution control, memory examination, stack analysis, and disassembly.1374GPL 3.0
- AlicenseNot gradedqualityDmaintenanceA GDB debugging tool designed for AI Agents (Claude Code, etc.)40Apache 2.0
- AlicenseBqualityDmaintenanceEnables AI assistants to start and manage LLDB debugging sessions, including loading programs, setting breakpoints, stepping through code, and examining memory.191MIT