GDB MCP Server
An MCP server that enables LLM clients to interact with GDB for debugging and binary analysis.
GDB MCP Server
A Model Context Protocol (MCP) server that enables LLM clients to interact with GDB for debugging and binary analysis.
Quick Start
uv sync
uv venv
uv run server.py
Integration
Note that you can use uv run to run the server.py script or you can use uv venv to create a virtual environment and then run /home/youruser/dev/personal/GDB-MCP/.venv/bin/python /home/youruser/dev/personal/GDB-MCP/server.py.
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"gdb": {
"command": "uv",
"args": ["run", "/home/youruser/dev/personal/GDB-MCP/server.py"],
"disabled": false
}
}
}
VSCode Copilot
If you're using WSL:
"mcp": {
"servers": {
"my-mcp-server-4dc36648": {
"type": "stdio",
"command": "wsl",
"args": [
"/home/youruser/dev/personal/GDB-MCP/.venv/bin/python",
"/home/youruser/dev/personal/GDB-MCP/server.py"
]
}
}
}
If you're not using WSL:
"mcp": {
"servers": {
"my-mcp-server-db89eee1": {
"type": "stdio",
"command": "/home/youruser/dev/personal/GDB-MCP/.venv/bin/python",
"args": ["/home/youruser/dev/personal/GDB-MCP/server.py"]
}
}
}
Available Tools
Session Management
gdb_start(): Start new GDB sessiongdb_terminate(session_id): Terminate sessiongdb_list_sessions(): List active sessions
Program Loading
gdb_load(session_id, program_path): Load programgdb_attach(session_id, pid): Attach to processgdb_load_core(session_id, core_file): Load core dump
Execution Control
gdb_continue(session_id): Continue executiongdb_step(session_id): Step into functionsgdb_next(session_id): Step over functionsgdb_finish(session_id): Finish current function
Debugging
gdb_set_breakpoint(session_id, location): Set breakpointgdb_backtrace(session_id): Show call stackgdb_print(session_id, expression): Print expressiongdb_examine(session_id, address): Examine memorygdb_info_registers(session_id): Show registers
Advanced Analysis
gdb_disassemble_function(session_id, function_name): Disassemble functiongdb_disassemble_around_pc(session_id, count): Disassemble around PCgdb_get_local_variables(session_id): Get local variablesgdb_get_stack_frames(session_id): Get stack informationgdb_get_register_values(session_id): Get register valuesgdb_read_memory_bytes(session_id, address, count): Read memorygdb_get_thread_info(session_id): Get thread informationgdb_get_breakpoint_list(session_id): List breakpointsgdb_set_watchpoint(session_id, expression): Set watchpointgdb_get_symbol_info(session_id, symbol): Get symbol info
General
gdb_command(session_id, command): Execute any GDB command
Testing
uv run python run-tests.py --check-deps
uv run python run-tests.py --type all
Examples
Check the examples directory for example prompts.
License
This project is licensed under the GNU Version 3.0 License, see the LICENSE file for details.
Related Servers
Scout Monitoring MCP
sponsorPut performance and error data directly in the hands of your AI assistant.
Alpha Vantage MCP Server
sponsorAccess financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
Authless Remote MCP Server
A template for deploying a remote, auth-less MCP server on Cloudflare Workers.
Maton Agent Toolkit
A toolkit to integrate agent frameworks like MCP with Maton APIs through function calling.
Juspay MCP Tools
Interact with Juspay APIs for payment processing and merchant dashboard management.
Kirby MCP
CLI-first MCP server for composer-based Kirby CMS projects—inspect blueprints/templates/plugins, interact with a real Kirby runtime, and use a bundled Kirby knowledge base.
ctfd-mcp
MCP server for CTFd that lets regular users browse challenges, manage dynamic instances, and submit flags.
Odoo XML-RPC MCP Server
Interact with Odoo instances using the XML-RPC API. Requires configuration via environment variables or config files.
Tripo MCP Server
Generate 3D models with Tripo AI. Requires the external Tripo AI Blender Addon.
Chrome DevTools MCP
chrome-devtools-mcp lets your coding agent (such as Gemini, Claude, Cursor or Copilot) control and inspect a live Chrome browser
Gemini MCP Tool
A server for integrating with the Google Gemini CLI to perform AI-powered tasks.
AI Agent with MCP
An AI agent using the Model Context Protocol (MCP) with a Node.js server providing REST resources for users and messages.