- Home
- MCP servers
- MCP GDB Server
MCP GDB Server
- rust
58
GitHub Stars
rust
Language
4 months ago
First Indexed
3 weeks ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
MCP Server GDB provides remote debugging capabilities for MCP-enabled applications using the GDB/MI protocol. It lets you manage multiple debugging sessions, set breakpoints, inspect stacks and variables, and control program execution, all through a flexible transport layer.
How to use
You run the MCP Server GDB locally and connect to it from your MCP client to start debugging sessions. You can operate in two transport modes: stdio for local in-process debugging via standard input/output, or SSE for a web-friendly transport accessible at a local URL.
How to install
Prerequisites you need before installing:
- A Rust toolchain (cargo) to build from source
- Optional: Nix for alternative run methods
- A terminal or shell with access to the necessary commands Follow the steps below to install and run the server.
# Install from source
Clone the project repository and build it in release mode:
# Example commands (adjust path as needed)
# git clone <repository-url>
# cd mcp_server_gdb
cargo build --release
cargo run
# Run with Nix (local build)
# nix run .
# Run remotely from a Nix-enabled environment
# nix run "git+https://github.com/pansila/mcp_server_gdb.git" -- --help
# Development shell (optional)
# nix develop
# Run an already built binary directly (stdio transport by default)
./mcp-server-gdb
Configuration
Configure the server you run to suit your environment. You can adjust settings via environment variables or by editing the source configuration, including network address, port, and GDB command timeout.
{
"mcpServers": {
"mcp_gdb": {
"type": "stdio",
"command": "./mcp-server-gdb",
"args": []
},
"mcp_gdb_http": {
"type": "http",
"name": "gdb_sse",
"url": "http://127.0.0.1:8080",
"args": []
}
},
"envVars": []
}
Tools and endpoints
You can manage and control debugging sessions using the following MCP tools. Each tool corresponds to an action you can perform in a session to debug your application.
License
MIT License.
Available tools
create_session
Create a new GDB debugging session
get_session
Get specific session information
get_all_sessions
Get all sessions
close_session
Close a debugging session
start_debugging
Start debugging a session
stop_debugging
Stop debugging a session
continue_execution
Continue program execution
step_execution
Step into the next line of code
next_execution
Step over the next line of code
get_breakpoints
Retrieve the list of breakpoints for a session
set_breakpoint
Set a breakpoint in source or memory
delete_breakpoint
Remove a breakpoint from the session
get_stack_frames
Fetch stack frame information for the current thread
get_local_variables
Inspect local variables in the current frame
get_registers
Read processor register values
read_memory
Read memory contents from the target process