GDB MCP server.
gdbmcp exposes GDB operations over the MCP (Model Context Protocol) using FastMCP. It manages GDB sessions over a socket connection (via gdbrpc) and provides MCP tools to connect, list, terminate sessions, and run GDB commands.
- Start and manage multiple GDB sessions
- Execute arbitrary GDB commands through MCP
- Run as MCP stdio server or HTTP server
- Python >= 3.10
gdbrpcmcp- HTTP mode only:
uvicorn(required to run the HTTP server)
From PyPI:
pip install gdbmcp-serverFrom repo root:
pip install .For development:
pip install -e .python -m gdbmcp-server gdbmcp --stdiopython -m gdbmcp-serverEstablish a GDB session and returns a session ID.
Terminate an existing session and clean up resources.
List all active sessions and their host/port.
Execute a GDB command in the session and return output.
CLI flags:
--stdio: Run in stdio transport mode--port: HTTP server port (default:20819)