Atlas / MCP servers / yywz1999 / GDB Ai Debugger

GDB Ai DebuggerBLOCK

mcp/yywz1999/gdb-ai-debugger
Verdict
BLOCK
Grade
D
Trust score
69 /100
Exposed tools
16 13r · 2w · 1d
Transport
—
License
MIT
Stars
85
01

Overview

From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.

一个支持人工智能辅助调试的 GDB MCP (Model Context Protocol) 服务器。该服务器允许 AI 代理和其他工具通过 MCP 协议与 GDB 进行交互。

注意:本项目目前处于开发阶段。我们欢迎社区成员提出建议和反馈,帮助我们改进这个工具。

项目地址:https://github.com/yywz1999/gdb-mcp-server

特性

  • 发现并附加到现有的 GDB 进程
  • 通过终端窗口与 GDB 通信(macOS 上优化支持 iTerm2,Linux 使用 tmux)
  • 支持 MCP 协议,便于与 AI 助手集成
  • 智能处理 GDB 命令阻塞,自动发送中断信号
  • 支持多架构、多主机和远程调试场景
  • 通过简单的函数调用执行常见的 GDB 调试操作:
  • 设置和删除断点
  • 单步执行代码
  • 检查内存
  • 查看寄存器和堆栈跟踪
  • 反汇编代码
  • 获取局部变量

演示视频

项目包含一个演示视频,展示了如何使用 GDB MCP 服务器进行附加调试的完整工作流程:

https://github.com/user-attachments/assets/dbb5c2dc-1bc9-4a19-86d7-c967725bc145

通过观看此视频,您可以更直观地了解 GDB MCP 服务器如何简化多架构和远程调试场景。

使用说明(以Cursor为例)

  1. 下载项目并验证:
git clone https://github.com/yywz1999/gdb-mcp-server.git
cd gdb-mcp-server
python3 -m pip install -r requirements.txt
python3 ~/MCP_server/gdb-mcp-server/mcp_server.py

结果如下图所示,即为环境正常

  1. 配置Cursor:

2025/11/27 更新内容:

  • 1、Linux 端 tmux 适配全面升级:自动遍历所有 session/pane、过滤 gdbserver,精准附加到 pwndbg/gef 等交互式 gdb 会话,无需切换窗口。
  • 2、iTerm2 会话识别更精准:直接写入目标窗口且可按内容定位 GDB 会话,无需手动切换焦点。
  • 3、阻塞处理更智能:自动判定 continue/target remote 等高风险命令并在阻塞时发送中断信号,配合唯一标记让输出更干净。

与 gdb-mcp-server-main 相比的新增能力

  • 终端输出隔离:tmux 侧统一插入唯一的开始/结束标记,自动清理命令和提示符,AI 仅接收结构化结果,不再混入终端错误。
  • 阻塞检测与自动中断:针对 continue、run、target remote 等命令,提供多次轮询与 Ctrl-C 自动中断策略,并返回清晰提示。
  • Linux 端适配:新的 tmux 通信链可以遍历所有 session/pane,精确定位真正的 gdb/pwndbg/gef 进程并忽略 gdbserver,整个控制过程无需切换窗口。
  • 更安全的进程筛选:sys_find_gdb_processes 与 tmux 探测逻辑会过滤 Python 启动脚本及远程 server,只附加到可交互的本地 GDB。
  • API 精简:移除了不再需要的“启动 GDB”接口,保留并强化“查找 → 附加 → 执行”主流程,让 README、工具列表与实现保持一致。

技术实现简介

GDB MCP 服务器使用以下技术实现 GDB 的控制和通信:

  1. MCP 协议实现:使用 FastMCP 库提供符合 Model Context Protocol 规范的工具接口
  1. 多种通信策略:
  2. AppleScript:在
Read from source at commit 9de924b02562OBSERVED · 2026-10-07
Advertisement
02

Connect

Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control.

claude-code
claude mcp add gdb-mcp-server -- uvx gdb-mcp-server
claude-desktop
{
  "mcpServers": {
    "gdb-mcp-server": {
      "command": "uvx",
      "args": [
        "gdb-mcp-server"
      ]
    }
  }
}
03

Exposed tools (16)

13 read · 2 write · 1 destructive. Blast radius: 1 tool can delete or overwrite — an agent that can be talked into calling a tool can be talked into calling this one.

ToolRiskDescription
check_gdb_blockedread检查GDB是否处于阻塞状态(正在运行)
gdb_connect_remoteread连接到远程调试目标
gdb_continueread继续执行
gdb_delete_breakpointdestructive删除断点
gdb_disassembleread反汇编代码
gdb_examine_memoryread检查内存
gdb_execute_commandwrite执行GDB命令
gdb_finishread运行至函数返回
gdb_get_localsread获取局部变量
gdb_get_registersread获取寄存器值
gdb_get_stackread获取堆栈信息
gdb_nextread下一步执行
gdb_set_breakpointwrite设置断点
gdb_stepread单步执行
sys_attach_to_gdbread附加到现有的GDB进程
sys_find_gdb_processesread查找系统中运行的所有GDB进程
04

Trust audit

BLOCKgrade D · trust 69/100 Do not install this without reading the findings. The audit found something that could harm you or your machine.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codeFAIL
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfaceWARN
L4Behavioural (sandbox)SKIPPED

What the source does

Filesystem
UNDECLARED (1 observation(s))
Network
none-observed
Shell
none-observed
Dependencies
not all pinned
Secrets in source
none-found

Findings (5)

HIGHPrivilege escalation / persistence · priv.escalate · CWE-269, CWE-250
comm_methods/keyboard_comm.py:34
logger.warning("请安装xdotool: sudo apt-get install xdotool")
Why it matters. asks for elevated privileges
HIGHPrivilege escalation / persistence · priv.escalate · CWE-269, CWE-250
comm_methods/tmux_comm.py:32
logger.warning("未找到tmux,请安装: sudo apt-get install tmux")
Why it matters. asks for elevated privileges
MEDIUMFilesystem / path · mcp.destructive_tools · CWE-22, CWE-59
gdb_delete_breakpoint
Why it matters. 1 tool(s) can delete or overwrite
Fix. prefer a read-only mode or scoped tokens; the page states the blast radius
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
requirements.txt
fastmcp, pexpect
Why it matters. 2 requirement(s) not pinned with ==
Fix. pin exact versions
INFOPrompt injection · scope.undeclared_system · CWE-94, CWE-1427
<declared scope>
system use found in code, not declared in the description
Why it matters. the description does not admit a capability the code has
Fix. declare system use in the description, or remove it

Gates applied: no_behavioural_pass.

Audited 2026-10-07 · audit v0.4.1 · source sha 9de924b02562full audit observations/trust-audit/mcp-server/yywz1999__gdb-ai-debugger.json · Report an issue / request a re-scan
05

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-10-079de924b02562BLOCKD69first audit
06

Questions

What tools does GDB Ai Debugger expose?

16 in total: 13 read-only, 2 that write, and 1 that can delete or overwrite (gdb_delete_breakpoint). Every one is listed on this page with its risk.

Is GDB Ai Debugger safe to connect to an agent?

No — not without reading the findings first. The audit graded it D (69/100) and found 2 critical or high issues in the source. Each one is listed on this page with the file and line it is on. Separately from the audit: 1 of its tools can destroy data, so scope the token you give it to what you actually need.

What credentials does GDB Ai Debugger need?

No credential environment variables were found in its source, so it appears to need none.

How current is this page?

The grade is for one exact copy of the source (9de924b02562), read on 2026-10-07. The repository is watched and re-audited when it changes.

Advertisement