Enables interaction with GDB (GNU Debugger) for debugging and binary analysis, providing tools for session management, program loading, execution control, breakpoint setting, and memory/register examination.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@GDB MCP Serverdebug the 'server' binary and show me the backtrace of the current crash"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Multi-Debugger MCP Server (LLDB and GDB)
A Model Context Protocol server that provides debugging functionality for both GDB and LLDB debuggers, for use with Claude Desktop, VSCode Copilot, or other AI assistants.
Quick Start
Integration
Note that you can use uv run to run the server.py script or you can use uv venv to create a virtual environment and then run /home/youruser/dev/personal/GDB-MCP/.venv/bin/python /home/youruser/dev/personal/GDB-MCP/server.py.
Claude Desktop
Add to your claude_desktop_config.json:
VSCode Copilot
If you're using WSL:
If you're not using WSL:
Windsurf
Experimental LLDB Support (macOS)
This project includes experimental native LLDB support alongside GDB, with automatic debugger selection.
Installation
To enable LLDB support on macOS, install LLVM (which includes LLDB) and python via Homebrew:
Available Tools
Unified Tools
debugger_status(): Show available debuggers and their statusdebugger_start(): Start debugging session with auto-detected debuggerdebugger_terminate(session_id): Terminate debugging sessiondebugger_list_sessions(): List all active debugging sessionsdebugger_command(session_id, command): Execute debugger command
LLDB Tools
lldb_start(): Start new LLDB debugging sessionlldb_terminate(session_id): Terminate LLDB debugging sessionlldb_list_sessions(): List all active LLDB sessionslldb_command(session_id, command): Execute arbitrary LLDB command
GDB Tools
gdb_start(gdb_path): Start new GDB debugging sessiongdb_terminate(session_id): Terminate GDB debugging sessiongdb_list_sessions(): List all active GDB sessionsgdb_command(session_id, command): Execute any GDB command
Use
*_command()functions for all advanced debugger operations, your LLM client should already know how to use it, but it doesn't hurt to mention it.
Checking Status
You can verify debugger availability:
Testing
Examples
Check the examples directory for example prompts.
Example binaries are compiled to
arm64andamd64, pick the one that matches your system architecture.
License
This project is licensed under the GNU Version 3.0 License, see the LICENSE file for details.