Skip to content
Conduit

mcp server

pwndbg-mcp

echo8134/pwndbg-mcpcommunitylistedunreviewed

Set up

Runs on your computer. Pick your agent and operating system.

Before you start

  • uv (`curl -LsSf https://astral.sh/uv/install.sh | sh`)
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "echo8134-pwndbg-mcp": {
      "command": "uvx",
      "args": [
        "pwndbg-mcp"
      ]
    }
  }
}

same format Cursor, GitHub Copilot CLI, Junie, JetBrains AI Assistant, Augment (Auggie CLI), Factory Droid, Kiro, Devin CLI +12

Values in angle brackets are placeholders. Restart Claude Desktop after editing its config.Claude Desktop docs

README

synced Oct 26, 2026

pwndbg-mcp

Model Context Protocol server that gives AI agents full access to GDB/pwndbg debugging and pwntools exploit development utilities. 96 tools across live debugging, heap analysis, and offline binary analysis.

What it does

  • Live debugging -- Load binaries, set breakpoints, step through code, inspect registers/memory/stack
  • pwndbg integration -- Context display, telescope, vmmap, heap visualization, ROP gadgets, exploit helpers
  • Process I/O -- Send/receive data to the debugged process stdin/stdout via PTY
  • pwntools offline -- Packing, cyclic patterns, ELF analysis, ROP chain building, shellcode generation, format string payloads

Requirements

  • Python >= 3.11
  • GDB with pwndbg installed
  • uv package manager

Quick start

git clone https://github.com/echo8134/pwndbg-mcp.git && cd pwndbg-mcp
uv run pwndbg-mcp install

This installs dependencies and registers the server in ~/.claude.json. Restart Claude Code to pick it up.

CLI

pwndbg-mcp              # run the MCP server (default)
pwndbg-mcp install      # uv sync + register in ~/.claude.json
pwndbg-mcp uninstall    # unregister from ~/.claude.json
pwndbg-mcp config       # show registration status and JSON config
pwndbg-mcp run          # run the MCP server (explicit)
pwndbg-mcp path         # add pwndbg-mcp to shell PATH (zsh/bash/fish)

Configuration

Environment VariableDefaultDescription
PWNDBG_MCP_GDB_PATHgdbPath to GDB binary (with pwndbg loaded)

Tools (96)

GDB Core (33)

ToolDescription
load_binaryLoad an ELF binary into GDB for debugging
attach_processAttach GDB to a running process by PID
detach_processDetach GDB from the current process
remote_connectConnect to a remote GDB server (gdbserver)
remote_disconnectDisconnect from a remote GDB target
run_programStart running the loaded program from the beginning
continue_executionContinue program execution until next breakpoint or exit
step_intoStep into the next source line (enters function calls)
step_overStep over the next source line (skips into function calls)
step_instructionStep one machine instruction (enters calls)
next_instructionStep one machine instruction (skips calls)
finish_functionExecute until the current function returns
interrupt_executionInterrupt a running program (like Ctrl-C in GDB)
kill_programKill the running program
set_breakpointSet a breakpoint at the specified location
delete_breakpointDelete a breakpoint by its number
enable_breakpointEnable a disabled breakpoint
disable_breakpointDisable a breakpoint without deleting it
list_breakpointsList all breakpoints, watchpoints, and catchpoints
set_watchpointSet a watchpoint on a memory expression
read_registersRead CPU register values
write_registerWrite a value to a CPU register
read_memoryRead raw memory bytes at an address
write_memoryWrite bytes to memory at an address
disassembleDisassemble instructions at an address or range
evaluate_expressionEvaluate an expression in the current context
backtraceShow the call stack (backtrace)
stack_localsShow local variables in the current stack frame
stack_argsShow function arguments in the current stack frame
select_frameSelect a stack frame by number
list_threadsList all threads in the debugged process
switch_threadSwitch to a different thread
execute_commandExecute any raw GDB/MI or console command

pwndbg Extensions (41)

ToolDescription
pwndbg_contextShow pwndbg context display: registers, disassembly, stack, backtrace
telescopeDereference pointers recursively starting from an address
vmmapShow virtual memory map of the process
hexdump_memoryHex dump memory at an address
xinfoShow information about what a memory address belongs to
search_memorySearch process memory for a value
probeleakProbe memory for pointers to known regions (heap, stack, libc, etc.)
leakfindFind chains of pointers starting from an address to known regions
distanceCalculate the distance between two addresses
heap_binsShow all free list bins (tcache, fast, unsorted, small, large)
heap_overviewShow an overview of the heap state
vis_heap_chunksVisual representation of heap chunks with color-coded boundaries
malloc_chunkInspect a specific malloc chunk header and metadata
top_chunkShow the top (wilderness) chunk of the heap
heap_arenasList all malloc arenas
tcachebinsShow tcache bin entries and their contents
fastbinsShow fast bin entries and their contents
unsortedbinShow unsorted bin entries
smallbinsShow small bin entries and their contents
largebinsShow large bin entries and their contents
find_fake_fastFind candidate locations for fake fastbin chunks near an address
try_freeSimulate what free() would do on a chunk, checking for errors
checksecShow binary security features: NX, PIE, RELRO, stack canary, FORTIFY
got_tableShow Global Offset Table entries and their resolved addresses
plt_tableShow Procedure Linkage Table entries
piebaseShow the PIE base address of the loaded binary
elf_sectionsList all ELF sections of the loaded binary
libcinfoShow libc version and path information
rop_gadgetsFind ROP gadgets in the loaded binary
cyclic_patternGenerate a De Bruijn cyclic pattern for finding offsets
cyclic_findFind the offset of a value in the De Bruijn cyclic pattern
onegadgetFind one-gadget RCE candidates in libc
canaryShow the current stack canary value
retaddrShow return addresses on the stack for the current frame
sigreturn_frameGenerate a sigreturn frame for SROP exploitation
dumpargsDump function arguments at the current position based on calling convention
patch_instructionPatch an instruction in memory at the given address
nearpcShow disassembly around an address with context
emulateEmulate execution of instructions without actually running them
pwndbg_statusReturn the current GDB state and drain any pending messages
pwndbg_hard_resetKill and restart the GDB process completely

Process I/O (4)

ToolDescription
send_to_processSend a string to the debugged process's stdin
eval_to_sendEvaluate a Python/pwntools expression and send the result as bytes to the process
read_from_processRead output from the debugged process's stdout
interrupt_processSend a control signal to the debugged process via the terminal

pwntools Utilities (18)

Offline helpers that don't require a running GDB session.

ToolDescription
packPack an integer into bytes
unpackUnpack a hex string into an integer
pwn_cyclicGenerate a De Bruijn cyclic pattern for buffer overflow offset finding
pwn_cyclic_findFind the offset of a value in the De Bruijn cyclic pattern
elf_infoGet basic ELF info: architecture, bits, endianness, and security checksec results
elf_symbolsList symbols defined in an ELF binary
elf_gotShow Global Offset Table (GOT) entries of an ELF binary
elf_pltShow Procedure Linkage Table (PLT) entries of an ELF binary
elf_searchSearch an ELF binary for a byte string
rop_find_gadgetsFind ROP gadgets in an ELF binary
rop_build_chainBuild a ROP chain from a JSON specification
shellcraft_generateGenerate shellcode assembly source from pwntools shellcraft templates
asm_encodeAssemble instructions into machine code bytes
asm_decodeDisassemble machine code bytes into assembly instructions
fmtstr_payloadGenerate a format string exploit payload
hex_encodeEncode a string to its hex representation
hex_decodeDecode a hex string back to text or byte representation
xor_dataXOR a hex data string with a hex key string

Architecture

src/
  server.py           MCP server entry point, GDB controller lifecycle
  gdb_controller.py   Async GDB/MI protocol handler with PTY for process I/O
  tools_gdb.py        GDB core tools (33)
  tools_pwndbg.py     pwndbg extension tools (41)
  tools_pwntools.py   Offline pwntools utilities (18)
  tools_process.py    Process stdin/stdout tools (4)
  utils.py            ANSI stripping, response formatting
  cli.py              CLI: install/uninstall/config/run/path
↑↓ navigate openesc close