Gdb Mcp Server

by yywz1999

84 412 downloads Not rated yet MIT
GitHub

About

# GDB MCP 服务器 一个支持人工智能辅助调试的 GDB MCP (Model Context Protocol) 服务器。该服务器允许 AI 代理和其他工具通过 MCP 协议与 GDB 进行交互。 > **注意**:本项目目前处于开发阶段。我们欢迎社区成员提出建议和反馈,帮助我们改进这个工具。 项目地址:https://github.com/yywz1999/gdb-mcp-server ## 特性 - 发现并附加到现有的 GDB 进程 - 通过终端窗口与 GDB 通信(macOS 上优化支持 iTerm2,Linux 使用 tmux) - 支持 MCP 协议,便于与 AI 助手集成 - 智能处理 GDB…

Details

License
MIT

Explore

- Discovers and attaches to existing GDB processes automatically
- Communicates with GDB via iTerm2 (macOS) or tmux (Linux)
- Provides a full set of debugging tools: breakpoints, stepping, memory inspection, registers, stack trace, disassembly, local variables
- Supports multi‑architecture, multi‑host, and remote debugging
- Intelligent blocking command detection with auto‑send of interrupt signal

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Gdb Mcp Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Clone the repository, install dependencies with python3 -m pip install -r requirements.txt, then start the server with python3 mcp_server.py. Configure an MCP client (e.g., Cursor) to connect to the server and use the provided tool functions to interact with GDB.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "gdb mcp server": {
            "gdb-mcp-server": {
                "command": "python3",
                "args": [
                    "-m",
                    "pip",
                    "install",
                    "-r",
                    "requirements.txt"
                ]
            }
        }
    }
}

McpServers

{
    "gdb-mcp-server": {
        "command": "python3",
        "args": [
            "-m",
            "pip",
            "install",
            "-r",
            "requirements.txt"
        ]
    }
}

- 终端输出隔离: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、工具列表与实现保持一致。

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.

Videos about Gdb Mcp Server

Relevant YouTube tutorials, setups, and demos