pwndbg-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@pwndbg-mcpShow me the disassembly and registers at the current instruction"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Overview
pwndbg-mcp runs a local GDB session with pwndbg loaded and exposes it to an MCP client. The client reads live debugger state and runs approved commands against it. Built for pentesting, CTF pwn, exploit development, and crash analysis.
Run the server on the analysis machine, next to GDB and the target. It starts GDB in MI mode and expects your own GDB setup to load pwndbg. The inferior gets a PTY, so clients can read it, write to it, and interrupt interactive programs. The server tracks inferior state, and any tool that needs it stopped checks first.
Related MCP server: mcp-gdbserver
Background
This started from RocketMaDev/pwndbg-mcp, which drives pwndbg over MCP for ELF and CTF pwn work in 19 tools, and whose PTY and controller scaffold this project's bridge.py is derived from. That project in turn credits pwno-mcp as its bootstrap framework.
What this adds: 169 tools against their 19, attach by PID or process name, remote gdbserver over target remote and target extended-remote, decompiler context through pwndbg's di commands rather than decomp2dbg directly, and an installer that writes a per-tool approval inventory into the client's config.
Features
169 registered tools, split 84 read-only and 85 mutating. Serve them over stdio, HTTP, or SSE.
Area | What it covers |
Debugger control | Load binaries, attach by PID or name, set arguments, reset GDB, run/start variants, step/next/continue/finish, move stack frames, kill the inferior. |
State and context | Server and inferior state, pwndbg help and command listings, config/theme get and set, context sections, |
Inspection | Mappings, memory, registers, stack, disassembly, breakpoints, ELF/libc state, heap chunks, bins, process info. |
Mutation and exploit helpers | Write memory and registers, breakpoints and watchpoints, patch code, spray memory, cyclic patterns, ROP/ropper/one-gadget/leakfind, syscall and fd helpers. |
Remote workflows | pwncat sessions: open, listen, list, read, send, close, and a zero-I/O scan. Plus |
Kernel views | pwndbg kernel helpers for BPF, binder, buddy allocator, nftables, tasks, modules, syscalls, slabs, dmesg, and kernel metadata. |
Decompiler integration | Check the |
For the full list, read src/pwndbg_mcp/tools/_registry.py or ask a client for tools/list.
Large results are capped, and anything truncated says so in its response. src/pwndbg_mcp/util.py holds the limits. A GDB command that fails comes back as an MCP error, not as partial output that looks like success.
Installation
Prerequisites: Linux, Python 3.11+, uv, GDB, pwndbg.
From a clone, with client configuration:
git clone https://github.com/h0w1tzxr/pwndbg-mcp.git
cd pwndbg-mcp
python install.py
pwndbg-mcp doctorTool only:
uv tool install git+https://github.com/h0w1tzxr/pwndbg-mcp.git
pwndbg-mcp doctorConfigure clients
Two entry points:
python install.pyis interactive. It installs the tool and configures Claude Code, Codex, or both. Only it accepts--clientsand--codex-config.pwndbg-mcp installdoes Claude Code only. It has no Codex flags.
The server uses FastMCP, whose CLI exposes stdio (the default), HTTP, and SSE. Any client that can launch a stdio server works; configure those yourself.
Claude Code
pwndbg-mcp install --scope user
pwndbg-mcp statusThat registers the server over stdio and writes one exact rule per tool: read-only tools into permissions.allow, mutating tools into permissions.ask. Use --unsafe only in an isolated test environment. It moves both inventories to allow.
User, project, and local policies live in ~/.claude/settings.json, .claude/settings.json, and .claude/settings.local.json. --scope selects only the Claude Code scope. Without the Claude CLI, the JSON fallback supports user and project scopes, and local scope requires the CLI.
Codex
Configure Codex through python install.py --codex-config (default ~/.codex/config.toml). Any Claude scope other than user leaves the Codex path unset, so pass --codex-config yourself when you configure both. Codex manages approvals itself, and the installer's per-tool inventory is not written there.
Manual configuration:
[mcp_servers.pwndbg]
command = "pwndbg-mcp"
args = [
"--transport", "stdio",
"--pwndbg", "gdb",
]If the client cannot find the binary, use the absolute path from command -v pwndbg-mcp.
tools/list publishes standard MCP readOnlyHint and destructiveHint annotations from the same inventories. They are advisory; the client's approval policy decides.
Decompiler integration
Requires pwndbg 2026.02.18 or newer, which exposes one decompiler-integration command (aliased di) for IDA, Binary Ninja, Ghidra, and angr-management. A local provider also needs decomp2dbg in pwndbg's own Python environment. That is not a pwndbg-mcp dependency.
Stop the inferior first, then:
Call
decompiler_status. It reports the command, pwndbg version, host, port, live provider, and the installed and required dependency versions.Install a matching plugin with pwndbg's
di install <provider>. This writes files and may download a plugin, so run it through the approval-gatedexecute_commandtool only after review.Open the same binary in the decompiler and start its server with
Ctrl+Shift+D.Call
decompiler_connect, thendecompiler_synconce the inferior starts.Call
decompwith an optional address and line count. Calldecompiler_disconnectwhen done.
A dependency or provider mismatch raises MissingDependency. A closed listener raises RemoteConnectionError naming its endpoint. For a local provider, pass literal localhost to decompiler_connect so pwndbg runs its local dependency and version checks.
IDA and Ghidra expose unauthenticated, unencrypted XML-RPC. Bind their listeners only to
127.0.0.1:3662and confirm the socket withss. Linux may show the same IPv4-mapped loopback as[::ffff:127.0.0.1]:3662. Reject wildcard and non-loopback listeners.
Remote debugging
Load local symbols before connecting:
file /path/to/local/binary
set sysroot /path/to/target-rootThen call gdb_target_remote for a regular gdbserver target, or gdb_target_extended_remote for extended mode. A failed connection names the endpoint. To recover, restart gdbserver, run disconnect through the approval-gated execute_command tool before reconnecting, or call mcp_hard_reset when GDB stops responding.
remote_pwncat_* needs pwncat (uv tool install pwncat). ROP helpers report a missing ROPgadget, ropper, one_gadget, or pwntools and name the install. leakfind ships with pwndbg and needs no external binary.
To find your way around, call version_info, then list_pwndbg_commands, then pwndbg_help on whatever looks useful. Clients can also use tools/list.
Development
Clone it, then work with uv directly:
uv tool install --editable . --reinstall # link for development
uv run --extra dev ruff check src/ # lint
uv run --extra dev mypy src/ # typecheck
uv run --extra dev ruff format src/ # format
uv build # wheel + sdist
pwndbg-mcp doctor # check gdb, pwndbg, and PATHList the tool surface over stdio:
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | pwndbg-mcp --transport stdio --pwndbg gdbBefore publishing or handing off:
uv run --extra dev ruff check src/
uv run --extra dev mypy src/
uv build
uv lock --check
git diff HEAD --checkCheck the registry split:
uv run --extra dev python - <<'PY'
from pwndbg_mcp.tools._registry import SAFE_TOOLS, MUTATING_TOOLS
print(len(SAFE_TOOLS), len(MUTATING_TOOLS), len(SAFE_TOOLS) + len(MUTATING_TOOLS))
PYExpected output:
84 85 169Layout:
src/pwndbg_mcp/bridge.py: GDB/MI controller, PTY handling, state tracking, response parsing.src/pwndbg_mcp/tools/: tool modules grouped by debugging domain.src/pwndbg_mcp/tools/_registry.py: FastMCP singleton and the read-only and mutating inventories.src/pwndbg_mcp/installer/: client registration and config helpers.install.py: interactive installer.
Credits
Built on pwndbg, whose command surface this server exposes, and GDB underneath it.
RocketMaDev/pwndbg-mcp (MIT, Copyright (C) 2025-present RocketDev) is where the PTY and controller scaffold in bridge.py comes from, along with much of the tool naming. It credits pwno-mcp as its own bootstrap framework. pwntools does the payload-oriented process I/O.
Also ida-pro-mcp, FastMCP, and pygdbmi.
License
MIT. See LICENSE.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseCqualityDmaintenanceAn MCP server that exposes pwndbg commands running under LLDB as tools for AI assistants. This enables AI-driven binary analysis, exploit development, and reverse engineering through pwndbg's enhanced debugging capabilities.Last updated1001MIT
- Alicense-qualityCmaintenanceMCP server for remote debugging with gdbserver, offering full debugging capabilities including breakpoint control, stepping, memory inspection, and process management.Last updatedMIT
- AlicenseBqualityCmaintenanceMCP server wrapping GDB and GEF for dynamic analysis, enabling interactive debugging and memory inspection via GDB/MI protocol.Last updated141MIT
- AlicenseBqualityBmaintenanceMCP server that wraps gdb to enable LLMs to drive live debugging sessions, including starting sessions on binaries, attaching to processes, and running commands.Last updated73MIT
Related MCP Connectors
An MCP server for deep research or task groups
A MCP server built for developers enabling Git based project management with project and personal…
An MCP server that gives your AI access to the source code and docs of all public github repos
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/h0w1tzxr/pwndbg-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server