
smadi0x86/mdb-mcp
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
smadi0x86/mdb-mcp - кандидат на сервер MCP, импортированный из https://github.com/smadi0x86/mdb-mcp.
Обзор
smadi0x86/mdb-mcp - кандидат на сервер MCP, импортированный из https://github.com/smadi0x86/mdb-mcp.
Обзор (машинный перевод)
Сервер MCP, который дает вашему помощнику ИИ настоящий отладчик. Он управляет GDB или LLDB. Чтобы помощник мог устанавливать точки останова, запускать программу, читать память и ходить Сложите так же, как и вы.
##Установка
Вам нужен UV и хотя бы один отладчик:
Затем добавьте сервер к клиенту. Клод Код:
Для Claude Desktop, Cursor или Windsurf:
VS Code принимает одну и ту же запись в .vscode/mcp.json, с
[2] Добавлено. В Windows с WSL установите "command": "wsl" и поместите полный
Путь к [4] в начале [5].
Инструменты
Все остальное — нормальная команда отладчика, поэтому break main, bt, x/16gx $sp
[9] Все работы. Команды, которые возобновляют программу, ждут, пока она прекратится.
(10 секунд по умолчанию, регулируемый на вызов). Если после этого он будет продолжать работать, то
Помощник может прервать его или продолжать ждать.
GDB - это по умолчанию Linux и LLDB на macOS. Любой из них может быть выбран явно. ГБР [10], так что Pwndbg и GEF продолжают работать.
Попробуйте
Тогда спросите своего помощника, почему [11] сегфолты (дайте ему абсолютный путь).
Конфигурация
Чтобы использовать отладчик, отличный от того, что на вашем PATH, установите его на сервере env
Эта страница переведена автоматически. Технические детали смотрите в оригинале.
README
Показан фрагмент оригинального README. Открыть оригинал.
MDB-MCP
An MCP server that gives your AI assistant a real debugger. It drives GDB or LLDB, so the assistant can set breakpoints, run your program, read memory and walk the stack the same way you would.
Install
You need uv and at least one debugger:
# Debian / Ubuntu
sudo apt install gdb lldb python3-lldb
# macOS (LLDB ships with the Xcode command line tools)
xcode-select --install
Then add the server to your client. For Claude Code:
claude mcp add mdb -- uvx --from git+https://github.com/smadi0x86/MDB-MCP mdb-mcp
For Claude Desktop, Cursor or Windsurf:
{
"mcpServers": {
"mdb": {
"command": "uvx",
"args": ["--from", "git+https://github.com/smadi0x86/MDB-MCP", "mdb-mcp"]
}
}
}
VS Code takes the same entry under "servers" in .vscode/mcp.json, with
"type": "stdio" added. On Windows with WSL, set "command": "wsl" and put the full
path to uvx at the start of args.
Tools
debugger_status which debuggers are usable, and the open sessions
debugger_start start a gdb or lldb session, optionally loading a program
debugger_command run any gdb or lldb command
debugger_interrupt pause a running program, like Ctrl-C
debugger_terminate kill the program and close the session
Everything else is a normal debugger command, so break main, bt, x/16gx $sp
and frame variable all work. Commands that resume the program wait for it to stop
(10 seconds by default, adjustable per call). If it is still running after that, the
assistant can interrupt it or keep waiting.
GDB is the default on Linux and LLDB on macOS. Either can be picked explicitly. GDB
loads your ~/.gdbinit, so pwndbg and GEF keep working.
Try it
make -C examples
Then ask your assistant why examples/crash segfaults (give it the absolute path).
Configuration
To use a debugger other than the one on your PATH, set it in the server’s env in
your client config:
"env": {
"MDB_GDB_PATH": "gdb-multiarch",
"MDB_LLDB_PATH": "/opt/homebrew/opt/llvm/bin/lldb"
}
Troubleshooting
If LLDB shows up as unavailable, debugger_status tells you why. On Debian and
Ubuntu it is usually a missing python3-lldb, which has to match your LLDB version.
The program can’t read from your keyboard. Feed it a file instead:
run < input.txt # gdb
process launch -i input.txt # lldb
If attaching to a running process fails on Linux, check
/proc/sys/kernel/yama/ptrace_scope. A value of 1 only allows debugging child
processes.
Security
A debugger can run shell commands (shell, python, platform shell, script),
Установка
uvx --from git+https://github.com/smadi0x86/MDB-MCP mdb-mcpКонфигурация
{
"mcpServers": {
"mdb": {
"command": "uvx",
"args": ["--from", "git+https://github.com/smadi0x86/MDB-MCP", "mdb-mcp"]
}
}
}