MCP server for remote debugging with gdbserver
MCP server for remote debugging with gdbserver - provides full debugging capabilities including process management, breakpoint control, stepping, memory inspection, and more.
pip install mcp-gdbserver
from mcp_gdbserver import GdbDebugger
# Create debugger instance
debugger = GdbDebugger()
# Start gdbserver to debug a program
session = debugger.start_gdbserver(port=2345, program="/bin/myapp", args=["--debug"])
# Get session info
sessions = debugger.list_sessions()
# Stop session
debugger.stop_session("session_1")
mcp-gdbserver --help
The MCP server provides 19 debugging tools organized into 4 categories:
gdbserver_start - Start gdbserver to debug a program remotelygdbserver_start_multi - Start gdbserver in multi-process modegdbserver_attach - Attach to a running processgdbserver_list_sessions - List all active sessionsgdbserver_stop - Stop a debugging sessiongdbserver_set_breakpoint - Set a breakpoint at a locationgdbserver_delete_breakpoint - Delete a breakpointgdbserver_continue - Continue executiongdbserver_step - Step one instruction (into functions)gdbserver_next - Execute one instruction (over functions)gdbserver_interrupt - Interrupt executiongdbserver_stack_frames - Get call stack framesgdbserver_local_variables - Get local variablesgdbserver_list_threads - List all threadsgdbserver_select_thread - Switch to a threadgdbserver_read_register - Read CPU registersgdbserver_read_memory - Read memory contentsgdbserver_evaluate - Evaluate an expressiongdbserver_load_symbols - Load symbol fileAdd to your MCP config:
{
"mcpServers": {
"mcp-gdbserver": {
"command": "mcp-gdbserver",
"env": {}
}
}
}
git clone https://github.com/daedalus/mcp-gdbserver.git
cd mcp-gdbserver
pip install -e ".[test]"
# run tests
pytest
# format
ruff format src/ tests/
# lint
ruff check src/ tests/
# type check
mypy src/
mcp-name: io.github.daedalus/mcp-gdbserver
Source-derived launch command. Check the maintainer’s required arguments and credentials before running:
uvx mcp-gdbserverMerge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.
{
"mcpServers": {
"io-github-daedalus-mcp-gdbserver": {
"command": "uvx",
"args": [
"mcp-gdbserver"
]
}
}
}Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.
Claude Desktop setup referencemcp-gdbserverpypiio.github.daedalus/mcp-gdbserver works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.