Provides GDB debugging capabilities and session management for program analysis, breakpoints, and memory/variable inspection via MCP integration.
Configuration
View docs{
"mcpServers": {
"signal-slot-mcp-gdb": {
"command": "npx",
"args": [
"-y",
"mcp-gdb"
]
}
}
}You can use the MCP GDB Server to manage GDB debugging sessions for programs and core dumps, with features like breakpoints, stepping, memory inspection, and VS Code source viewing. This MCP server is designed to integrate with Claude or other assistants, enabling you to control debugging workflows through concise commands.
You interact with the MCP GDB Server by issuing high-level debugging actions through your MCP client. Start a session, load a program or core dump, set breakpoints, and step through code. You can print variables, inspect memory and registers, view the current call stack, and even examine source code with VS Code integration. The server also accepts arbitrary GDB commands for advanced use.
Prerequisites: you need a working Node.js environment and npm installed on your system.
From source, follow these steps exactly to build the MCP GDB Server.
git clone https://github.com/signal-slot/mcp-gdb.git
cd mcp-gdb
npm install
npm run buildTo run the MCP GDB Server locally as an MCP stdio server, you use the following command, which is the runtime invocation shown for MCP clients.
npx -y mcp-gdbIf you are configuring Claude Desktop to connect to this MCP server, you would specify an MCP configuration that runs the same runtime command. For example, you can configure the server under the mcpServers section with the command and arguments as shown.
{
"mcpServers": {
"gdb": {
"command": "npx",
"args": ["-y", "mcp-gdb"]
}
}
}The MCP GDB Server exposes a set of commands to control debugging sessions and inspect program state. Core actions include starting and terminating sessions, loading executables and core dumps, setting breakpoints, continuing or stepping through execution, and printing or examining values.
If you encounter issues starting the server, ensure Node.js and npm are installed, then re-run the build steps. If a session cannot be created, verify that the MCP runtime is invoking the server with the correct command (npx -y mcp-gdb) and that network or IPC channels used by your MCP client are available.
This MCP server provides GDB debugging features intended for integration with Claude or other AI assistants. You can execute GDB commands directly through the MCP interface to perform advanced debugging tasks when needed.
Start a new GDB debugging session and establish a session context for subsequent commands.
Load a program or core dump into the active GDB session for analysis.
Set a breakpoint at a specified function or line within the current debugging session.
Resume execution of the program from the current point.
Step through the next instruction or line in the current thread.
Step over function calls during debugging.
Run until the current function returns, finishing the current scope.
Display the current call stack to understand execution flow.
Evaluate and display the value of an expression in the current context.
Examine memory regions or data structures.
Show the contents of the processor registers.
List source code at the current location, with VS Code integration if enabled.
Execute an arbitrary GDB command for advanced analysis.