Provides GDB debugging functionality for use with Claude or other MCP-enabled assistants.
Configuration
View docs{
"mcpServers": {
"gdb": {
"command": "node",
"args": [
"/path/to/mcp-gdb/build/index.js"
]
}
}
}You can run a dedicated MCP GDB server to manage debugging sessions for programs and core dumps, directly within your MCP-enabled workflows. This server lets you start GDB sessions, load binaries or cores, set breakpoints, inspect memory and registers, and execute arbitrary GDB commands from your conversations with supported assistants like Claude.
You use the GDB MCP server by connecting it as an MCP endpoint from your MCP client. Once connected, you can start a new debugging session, load a program or core dump, set breakpoints, run the program, inspect variables and memory, retrieve a backtrace, and terminate the session. All interactions are performed through standard GDB commands exposed via the MCP interface, allowing you to drive debugging from your assistant chats.
Prerequisites: you need Node.js and npm installed on your machine. You also need git to clone the project. Ensure you have access to a shell with these tools available.
Clone the project repository and navigate into the directory.
Install dependencies.
Build the project.
Start a new GDB debugging session.
Load a program or core dump into the active GDB session.
Execute an arbitrary GDB command within the current session.
Terminate the active GDB debugging session.
List all active GDB debugging sessions.
Attach GDB to an existing process.
Load a core dump file into GDB for analysis.
Set a breakpoint at a specified function or line.
Continue program execution from the current point.
Step through the program one instruction or line at a time.
Step over function calls without entering them.
Run until the current function returns.
Show the current call stack.
Print the value of an expression in the current context.
Examine a memory region or address.
Display the current CPU registers.