Skip to main content

A Model Context Protocol server for GDB debugging functionality

Project description

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.

GDB MCP Server

Quick Start

uv sync
uv venv
uv run server.py

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:

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

VSCode Copilot

If you're using 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"
        ]
      }
    }
  }

If you're not using 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"]
    }
  }
}

Experimental LLDB Support (macOS)

This project includes experimental native LLDB support alongside GDB, with automatic debugger selection.

Multi-Debugger MCP Server

Installation

To enable LLDB support on macOS, install LLVM (which includes LLDB) and python via Homebrew:

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

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

Available Tools

Unified Tools

  • debugger_status(): Show available debuggers and their status
  • debugger_start(): Start debugging session with auto-detected debugger
  • debugger_terminate(session_id): Terminate debugging session
  • debugger_list_sessions(): List all active debugging sessions
  • debugger_command(session_id, command): Execute debugger command

LLDB Tools

  • lldb_start(): Start new LLDB debugging session
  • lldb_terminate(session_id): Terminate LLDB debugging session
  • lldb_list_sessions(): List all active LLDB sessions
  • lldb_command(session_id, command): Execute arbitrary LLDB command

GDB Tools

  • gdb_start(gdb_path): Start new GDB debugging session
  • gdb_terminate(session_id): Terminate GDB debugging session
  • gdb_list_sessions(): List all active GDB sessions
  • gdb_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:

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

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

Testing

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

Examples

Check the examples directory for example prompts.

Example binaries are compiled to arm64 and amd64, 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iflow_mcp_smadi0x86_gdb_mcp-0.1.0.tar.gz (809.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iflow_mcp_smadi0x86_gdb_mcp-0.1.0-py3-none-any.whl (28.3 kB view details)

Uploaded Python 3

File details

Details for the file iflow_mcp_smadi0x86_gdb_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: iflow_mcp_smadi0x86_gdb_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 809.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_smadi0x86_gdb_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1fae23359944c62828924127e3369c4b8f2c7059411fb850d04e91166abcb80a
MD5 84066d45c96d41fd8fdff799ec13c8ea
BLAKE2b-256 1fa9d969a00491997c069badc322a8f8651b30cd0b6b071af2cf09451f58cbdb

See more details on using hashes here.

File details

Details for the file iflow_mcp_smadi0x86_gdb_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: iflow_mcp_smadi0x86_gdb_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 28.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_smadi0x86_gdb_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 10d4da011294877c2e92ca0e5a0ff01b194a5f5a89f2591baa2af0761adb50ee
MD5 3d3156277585aac6f8cdb24d41a8a338
BLAKE2b-256 929e8db3ca9f77ae337c87d1fe9b27c8a03435ccea34544a1249822cb5aff442

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page