Get the FREE Ultimate OpenClaw Setup Guide →

dbgmcp

MCP servers for connecting debuggers to AI agents. Supports GDB, LLDB and PDB.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio ramenhost-dbgmcp ./gdb-mcp

How to use

dbgmcp is a collection of MCP servers, each exposing a debugger (GDB, LLDB, and PDB) as an MCP server that can connect to LLM agents through the Model Context Protocol. Each server runs as a separate binary (gdb-mcp, lldb-mcp, pdb-mcp) and can handle multiple concurrent connections. You can load a program into the chosen debugger and send arbitrary commands to inspect or control the process, enabling agents to reason with live debugging data.

To use, run the desired debugger MCP binaries you need and point your MCP configuration (e.g., Claude Desktop, VS Code MCP config) at the corresponding commands. For Claude, add entries for gdb, lldb, and pdb with the path to the respective binary. For VS Code Copilot, add servers under the mcp.json with the type set to stdio and the command pointing to each binary. Once configured, restart the tool or reload its MCP configuration to establish the connections and begin exchanging debugging commands through the MCP protocol.

How to install

Prerequisites:

  • A supported platform (Linux x86_64 for pre-built binaries as noted in the project)
  • Optional: Rust and Cargo if you want to build from source

Installing from binaries (recommended):

  1. Download the pre-built binaries for your platform from the releases page.
  2. Make the binaries executable (if needed): chmod +x gdb-mcp lldb-mcp pdb-mcp
  3. Run the desired MCP server binary directly, for example: ./gdb-mcp ./lldb-mcp ./pdb-mcp

Building from source (requires Rust and Cargo):

  1. Ensure Rust and Cargo are installed (via rustup): curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  2. Clone the repository and build: git clone https://github.com/ramenhost/dbgmcp cd dbgmcp cargo build --release
  3. The compiled MCP binaries will be located in target/release/ (e.g., target/release/gdb-mcp).
  4. Run the binaries from target/release/ as shown above.

Additional notes

Tips and considerations:

  • You can enable multiple debugger MCP servers simultaneously to support different debugging scenarios.
  • The MCP servers accept and execute commands within the connected debugger; ensure your use case does not expose the system to untrusted commands.
  • If you plan to run within an IDE or editor, configure the respective MCP settings to point to the corresponding binary paths, and ensure the editor is allowed to spawn the processes.
  • If pre-built binaries are unavailable for your platform, building from source using Rust/Cargo is supported as outlined in the install steps.
  • Ensure the binaries have proper execution permissions and that any required debugger runtime is present on the host.

Related MCP Servers

Sponsor this space

Reach thousands of developers