Skip to main content
Glama

Multi-Debugger MCP Server (LLDB and GDB)

一个 Model Context Protocol 服务器,为 GDB 和 LLDB 调试器提供调试功能,可用于 Claude Desktop、VSCode Copilot 或其他 AI 助手。

快速开始

uv sync
uv venv
uv run server.py

Related MCP server: LLDB MCP Server

集成

请注意,你可以使用 uv run 运行 server.py 脚本,也可以使用 uv venv 创建虚拟环境,然后运行 /home/youruser/dev/personal/GDB-MCP/.venv/bin/python /home/youruser/dev/personal/GDB-MCP/server.py

Claude Desktop

添加到你的 claude_desktop_config.json

{
  "mcpServers": {
    "gdb": {
      "command": "uv",
      "args": ["run", "/home/youruser/dev/personal/GDB-MCP/server.py"],
      "disabled": false
    }
  }
}

VSCode Copilot

如果你使用的是 WSL:

 "mcp": {
    "servers": {
      "my-mcp-server-4dc36648": {
        "type": "stdio",
        "command": "wsl",
        "args": [
          "/home/youruser/dev/personal/GDB-MCP/.venv/bin/python",
          "/home/youruser/dev/personal/GDB-MCP/server.py"
        ]
      }
    }
  }

如果你不是在使用 WSL:

  "mcp": {
    "servers": {
      "my-mcp-server-db89eee1": {
        "type": "stdio",
        "command": "/home/youruser/dev/personal/GDB-MCP/.venv/bin/python",
        "args": ["/home/youruser/dev/personal/GDB-MCP/server.py"]
      }
    }
  }

Windsurf

{
  "mcpServers": {
    "debugger-mcp": {
      "command": "python3",
      "args": ["/Users/youruser/dev/GDB-MCP/server.py"]
    }
  }
}

实验性 LLDB 支持(macOS)

本项目在 GDB 之外还包含实验性的原生 LLDB 支持,并具有自动调试器选择功能。

安装

要在 macOS 上启用 LLDB 支持,请通过 Homebrew 安装 LLVM(其中包含 LLDB)和 python:

# Install LLDB for supporting python3.14 bindings
brew install llvm python3

# Install MCP and debugging dependencies
pip3 install mcp pygdbmi --break-system-packages

可用工具

统一工具

  • debugger_status():显示可用的调试器及其状态

  • debugger_start():使用自动检测到的调试器启动调试会话

  • debugger_terminate(session_id):终止调试会话

  • debugger_list_sessions():列出所有活动的调试会话

  • debugger_command(session_id, command):执行调试器命令

LLDB 工具

  • lldb_start():启动新的 LLDB 调试会话

  • lldb_terminate(session_id):终止 LLDB 调试会话

  • lldb_list_sessions():列出所有活动的 LLDB 会话

  • lldb_command(session_id, command):执行任意 LLDB 命令

GDB 工具

  • gdb_start(gdb_path):启动新的 GDB 调试会话

  • gdb_terminate(session_id):终止 GDB 调试会话

  • gdb_list_sessions():列出所有活动的 GDB 会话

  • gdb_command(session_id, command):执行任意 GDB 命令

对于所有高级调试器操作,请使用 *_command() 函数,你的 LLM 客户端应该已经知道如何使用它,但提一下也无妨。

检查状态

你可以验证调试器的可用性:

from modules.lldb import LLDBSessionManager
from modules.gdb import GDBSessionManager

print("LLDB available:", LLDBSessionManager.is_available())
print("GDB available:", GDBSessionManager.is_available())

测试

uv run python run-tests.py --check-deps
uv run python run-tests.py --type all

示例

请查看 examples 目录中的示例提示词。

示例二进制文件编译为 arm64amd64,请选择与你的系统架构匹配的那个。

许可证

本项目采用 GNU Version 3.0 License 许可,详情请参阅 LICENSE 文件。

Install Server
A
license - permissive license
C
quality
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity
Issues opened vs closed

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    B
    quality
    C
    maintenance
    Provides GDB debugging functionality for use with Claude or other AI assistants, allowing users to manage debugging sessions, set breakpoints, examine variables, and execute GDB commands through natural language.
    16
    56
    158
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Provides structured debugging capabilities through LLDB, enabling AI assistants to set breakpoints, inspect variables, analyze crashes, disassemble code, and evaluate expressions in C/C++ programs.
    17
    3
    Apache 2.0
  • F
    license
    A
    quality
    D
    maintenance
    Enables AI agents to debug embedded systems by providing a comprehensive interface for GDB operations across multiple architectures like ARM and x86. It supports remote debugging via gdbserver or QEMU, allowing for detailed inspection of memory, registers, stack frames, and variables.
    31
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables dynamic debugging with GDB via the MCP protocol, allowing LLMs to execute GDB commands, manage breakpoints, control execution, and inspect program state.
    4

View all related MCP servers

Related MCP Connectors

  • Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.

  • Live browser debugging for AI assistants — DOM, console, network via MCP.

  • Reasoning, code, anti-deception, memory harness MCP tools. Stdio or HTTPS api.ejentum.com/mcp

View all MCP Connectors

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/smadi0x86/MDB-MCP'

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