x64dbg — Claude Code MCP server: what it does, how to install
Connects an AI assistant to the x64dbg debugger. Use it to trace execution and inspect memory without manual scripting.
claude mcp add --env X64DBG_MCP_HOST=<X64DBG_MCP_HOST> --env X64DBG_MCP_PORT=<X64DBG_MCP_PORT> --transport stdio x64dbg -- npx -y x64dbg-mcp-serverWhat x64dbg does
The setup operates in two layers. A C++ plugin runs inside the debugger, hosting a local REST service on 127.0.0.1. On the client side, a lightweight TypeScript process communicates via stdio and forwards assistant actions to that port. Network traffic stays on localhost.
The model interacts with 23 debugger tools. It inspects CPU registers, disassembles instructions, and configures memory breakpoints. The server also handles dumping PE modules to disk with IAT repairs and hiding the session from anti-debug checks.
The debugger must be running with the .dp64 or .dp32 binary placed inside its plugins folder. The bridge fails immediately if the target debugger instance is not open.
What it helps with
- set software and hardware breakpoints during execution
- disassemble functions and inspect basic block graphs
- scan memory for byte patterns and decoded strings
- dump PE modules to disk and rebuild import address tables
- hide debugger presence from anti-debug checks
Example prompts for the agent
- Set a breakpoint on
CreateFileWand resume execution. - Scan the main module for byte sequence
48 8B ?? 48 85 C0and show disassembled instructions. - Dump the main module to disk and rebuild its import table.
How to install x64dbg
Platform CLI
claude mcp add --env X64DBG_MCP_HOST=<X64DBG_MCP_HOST> --env X64DBG_MCP_PORT=<X64DBG_MCP_PORT> --transport stdio x64dbg -- npx -y x64dbg-mcp-serverReplace <…> with your own values
Platform CLI
codex mcp add x64dbg --env X64DBG_MCP_HOST=<X64DBG_MCP_HOST> --env X64DBG_MCP_PORT=<X64DBG_MCP_PORT> -- npx -y x64dbg-mcp-serverReplace <…> with your own values
Config file
{
"mcpServers": {
"x64dbg": {
"command": "npx",
"args": [
"-y",
"x64dbg-mcp-server"
],
"env": {
"X64DBG_MCP_HOST": "<X64DBG_MCP_HOST>",
"X64DBG_MCP_PORT": "<X64DBG_MCP_PORT>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"x64dbg": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"x64dbg-mcp-server"
],
"env": {
"X64DBG_MCP_HOST": "<X64DBG_MCP_HOST>",
"X64DBG_MCP_PORT": "<X64DBG_MCP_PORT>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e X64DBG_MCP_HOST=<X64DBG_MCP_HOST> -e X64DBG_MCP_PORT=<X64DBG_MCP_PORT> x64dbg npx -y x64dbg-mcp-serverReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about x64dbg
How to install x64dbg in Claude Code?
Drop x64dbg_mcp.dp64 or x64dbg_mcp.dp32 into the plugins folder of x64dbg. Start the debugger, then run claude mcp add x64dbg -- npx -y x64dbg-mcp-server.
What does the x64dbg MCP server do?
It gives an AI agent direct control over your running debugging session. The model can inspect memory, step through routines, and apply patches without manual debugger scripting.
Does any debugging data leave the local machine?
No external traffic is generated. The server binds strictly to 127.0.0.1, and you can enforce local protection by setting an authentication token via X64DBG_MCP_TOKEN.