GDB MCP Server
Multi-Debugger MCP Server (LLDB and GDB)
一个 Model Context Protocol 服务器,为 GDB 和 LLDB 调试器提供调试功能,可用于 Claude Desktop、VSCode Copilot 或其他 AI 助手。
快速开始
uv sync
uv venv
uv run server.pyRelated 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 目录中的示例提示词。
示例二进制文件编译为
arm64和amd64,请选择与你的系统架构匹配的那个。
许可证
本项目采用 GNU Version 3.0 License 许可,详情请参阅 LICENSE 文件。
Maintenance
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
- AlicenseBqualityCmaintenanceProvides 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.1656158MIT
- 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
- FlicenseAqualityDmaintenanceEnables 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
- FlicenseNot gradedqualityDmaintenanceEnables dynamic debugging with GDB via the MCP protocol, allowing LLMs to execute GDB commands, manage breakpoints, control execution, and inspect program state.4
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
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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