Skip to content
Conduit

mcp server

x64dbg-mcp

MCP server for x64dbg/x32dbg: native C++ plugin bridge + C# stdio server exposing 50+ tools (memory, registers, disasm, breakpoints, modules, threads, stack).

HxT9/x64dbg_mcpcommunitylistedunreviewednot running here yet

Set up

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

This project does not publish an install method we can turn into a config. Follow the README instead.

README

synced Oct 14, 2026

x64dbg MCP

An MCP server that lets an LLM (Claude Code, etc.) drive x64dbg. It is split in two parts:

LLM  ──stdio(MCP)──►  x64dbgmcp (C#)  ──HTTP 127.0.0.1:8745──►  x64dbg_mcp.dp64 (C++ plugin)  ──►  x64dbg
  • plugin/ — a native x64dbg plugin. It embeds a tiny localhost HTTP server and dispatches JSON requests onto the x64dbg bridge API (memory, registers, disasm, commands, breakpoints, memory map). This is the only component that touches x64dbg.
  • mcp/ — a C# MCP server (stdio) built on the official ModelContextProtocol SDK. Each tool is a thin proxy to the plugin's HTTP endpoint.

Requirements

  • Windows, Visual Studio 2022 (MSVC) + CMake ≥ 3.20
  • .NET 10 SDK
  • An x64dbg checkout that has been built (the plugin links against bin/x64/x64dbg.lib and x64bridge.lib). Default location: ..\x64dbg relative to this repo.

Build

# from the repo root
./build.ps1                      # x64 / Release, installs the plugin and prints the register command
./build.ps1 -Arch x86           # 32-bit plugin for x32dbg
./build.ps1 -X64dbgRoot D:\x64dbg

This produces:

  • <x64dbg>\bin\x64\plugins\x64dbg_mcp.dp64 (auto-installed)
  • mcp\app\x64dbgmcp.dll — the stable runtime folder Claude is registered against

The C# server is built into mcp\app (not the default bin\) because that is the path the MCP registration points at. While a Claude session has the server running, mcp\app\x64dbgmcp.dll is locked — rebuilding it fails with MSB3021. Close the session (or claude mcp remove x64dbg + kill stray dotnet.exe) before rebuilding the server, then re-add it.

Building manually:

cmake -S plugin -B plugin/build -G "Visual Studio 17 2022" -A x64 -DINSTALL_TO_X64DBG=ON
cmake --build plugin/build --config Release
dotnet build mcp -c Release

Register with Claude Code

# from the repo root, after building (use the absolute path to the built DLL)
claude mcp add --scope user --transport stdio x64dbg -- dotnet "$PWD\mcp\app\x64dbgmcp.dll"

Then start x64dbg. On load the plugin logs:

[x64dbg_mcp] MCP bridge listening on http://127.0.0.1:8745/  (commands: mcp_port, mcp_status)

Usage

  1. Launch x64dbg (the plugin auto-starts its server).
  2. In Claude Code the x64dbg MCP server exposes these tools:
ToolPurpose
Session
dbg_statusdebugging state, current cip, module/label
dbg_process_list / dbg_attach / dbg_detachlist processes, attach/detach by PID
dbg_load / dbg_stop / dbg_restartload an exe (with args), stop, restart
dbg_commandrun any raw x64dbg command (escape hatch)
Execution
dbg_run / dbg_pause / dbg_step_into / dbg_step_over / dbg_step_outexecution control
State
dbg_registers / dbg_set_registerread GP registers / set one
dbg_threads / dbg_switch_threadlist / switch threads
dbg_call_stack / dbg_read_stackbacktrace / raw stack slots (symbolized)
dbg_evalevaluate an expression → value/hex
Memory
dbg_read_memory / dbg_write_memoryread/write debuggee memory (hex)
dbg_read_stringread an ASCII/UTF-16 string
dbg_memory_mapmemory regions (base/size/protect/info)
dbg_memory_basebase+size of the region at an address
dbg_is_valid_ptris an address readable
dbg_set_page_rightschange page protection
dbg_mem_alloc / dbg_mem_freeallocate/free memory in the debuggee
dbg_find_patternsearch a range for a byte pattern (wildcards)
Code / modules
dbg_disassembledisassemble N instructions
dbg_assembleassemble & patch an instruction in memory
dbg_address_infodescribe an address (module/section/label/func/string/...)
dbg_branch_destinationresolve a branch/call/jmp target
dbg_xrefscross-references to an address
dbg_modules / dbg_module_sections / dbg_module_exportsenumerate modules, sections, exports
dbg_symbolsenumerate a module's symbols
dbg_labelslist all labels
dbg_set_comment / dbg_set_labelannotate addresses
dbg_patcheslist in-memory patches
Breakpoints
dbg_list_breakpointsall breakpoints
dbg_set_breakpoint / dbg_delete_breakpointmanage breakpoints (sw/hw/mem)
System
dbg_handlesenumerate open handles
dbg_tcp_connectionsenumerate TCP connections

Anything not covered by a dedicated tool can be driven through dbg_command (e.g. init C:\path\app.exe, bp kernel32.CreateFileW, g).

Configuration

  • Plugin port — default 8745. Change it with the x64dbg command mcp_port <n>, or persist it in x64dbg.ini:

    [x64dbg_mcp]
    port=8745
    

    mcp_status reports the current state.

  • Server target — the C# server connects to http://127.0.0.1:8745/ by default; override with the X64DBG_MCP_URL environment variable (must match the plugin port).

Security note

The plugin binds to 127.0.0.1 only and is intended for local use. It exposes full read/write/command control over whatever x64dbg is debugging — treat it as you would the debugger itself. Don't expose the port beyond localhost.

Layout

x64dbg_mcp/
├─ plugin/
│  ├─ src/{plugin,http_server,rpc}.cpp + headers
│  ├─ third_party/json.hpp          (nlohmann/json, vendored)
│  └─ CMakeLists.txt
├─ mcp/
│  ├─ Program.cs                    (stdio MCP host)
│  ├─ X64DbgClient.cs               (HTTP client to the plugin)
│  ├─ X64DbgTools.cs                (the MCP tools)
│  └─ x64dbgmcp.csproj
├─ build.ps1
├─ LICENSE
├─ THIRD_PARTY.md
└─ README.md

License

Licensed under the GNU General Public License v3.0 — see LICENSE.

The native plugin links against the x64dbg bridge and SDK (x64dbg is GPLv3), so the project as a whole is distributed under GPLv3. Third-party components and their licenses are listed in THIRD_PARTY.md.

Disclaimer: this is a debugging/reverse-engineering tool. Use it only on software you are authorized to analyze. Provided "as is", without warranty.

↑↓ navigate openesc close