Skip to content
Back to search

x64dbg-mcp-server

x64dbg-MCP Server is a native MCP (Model Context Protocol) plugin for x64dbg that exposes the debugger's full functionality over HTTP. Connect any MCP-compatible AI assistant and control x64dbg programmatically: set breakpoints, step through code, read memory, dump registers, and more. Built with Zig — zero dependencies, single-binary output, cros

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/duty1g/x64dbg-mcp-server with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/duty1g/x64dbg-mcp-server'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/duty1g--x64dbg-mcp-server/badge.svg)](/listings/duty1g--x64dbg-mcp-server)

HTML

<a href="/listings/duty1g--x64dbg-mcp-server"><img src="/api/listings/duty1g--x64dbg-mcp-server/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Download the latest release or build from source:

1. Copy the contents of `dist/` into your x64dbg root folder (deploys both x32 and x64) 2. Launch x64dbg

The MCP server starts automatically. Default ports: - **x64:** `0.0.0.0:9094` - **x32:** `0.0.0.0:9095`

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

SKILL.md · Manifest · 300 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # x64dbg Reverse Engineering — MCP Workflow Guide
  2. You are controlling x64dbg through MCP tools.
  3. **Transport matters:**
  4. - **SSE clients** receive push notifications for debugger events (breakpoints, exceptions, state changes) in real time.
  5. - **HTTP clients** must poll — call `WaitForEvent` to long-poll for events, or read the `[state]` and `[event:*]` lines included in every tool response.
  6. Treat every assumption about debugger state as stale until verified by a tool response.
  7. ---
  8. ## Rule 1: Always Know Your State
  9. **Before every action**, call `GetDebugState`. No exceptions.
  10. - `NO_TARGET` — nothing loaded. Use `LoadBinary` or `AttachProcess` first.
  11. - `PAUSED` — target is stopped. You can read memory, disassemble, inspect registers.
  12. - `RUNNING` — target is executing. You CANNOT read memory, disassemble, or inspect anything. Call `WaitForPause` or `PauseDebug` first.
  13. Every tool response includes a `[state]` line at the end showing the current debugger status — PAUSED with address/module/instruction, RUNNING, or NO_TARGET. Always read it. This is your primary state awareness mechanism.
  14. Every tool response may also include `[event:*]` lines — queued debugger events (breakpoints hit, exceptions, DLL loads) that occurred since your last call. Always read these too.
  15. If the user says "paused", "hit breakpoint", "stopped", or "debugger is paused" — immediately call `GetDebugState` to see where you are. Do not guess.
  16. ---
  17. ## Rule 2: Never Assume State Between Calls
  18. MCP is request/response. Between your tool calls, anything can happen — breakpoints can hit, exceptions can fire, the user can interact with the debugger. Every time you are about to act, verify first.
  19. Bad:
  20. ```
  21. SetBreakpoint → run → Disassemble (wrong: run blocks but verify anyway)
  22. ```
  23. Good:
  24. ```
  25. GetDebugState → SetBreakpoint → run → GetDebugState → Disassemble
  26. ```
  27. ---
  28. ## Rule 3: Core Workflows
  29. ### Load and analyze a binary
  30. ```
  31. GetDebugState
  32. LoadBinary (path)
  33. WaitForPause — target pauses at system breakpoint
  34. GetDebugState — confirm PAUSED, note the address
  35. GetAllRegisters — see initial state
  36. ListModules — see what's loaded
  37. Disassemble — look at current code
  38. ```
  39. ### Set breakpoint and run to it
  40. ```
  41. GetDebugState — must be PAUSED
  42. SetBreakpoint (target) — set the BP
  43. run — blocks until target pauses (5-min timeout)
  44. GetDebugState — confirm PAUSED, check address
  45. Disassemble — see where we landed
  46. GetAllRegisters — inspect state
  47. ```
  48. ### Step through code
  49. ```
  50. GetDebugState — must be PAUSED
  51. StepOver — response includes new address + disassembly
  52. — read the response carefully before next step
  53. StepOver — keep stepping, reading each response
  54. GetAllRegisters — check registers when needed
  55. GetCallStack — check call context when needed
  56. ```
  57. ### Find and hook an API call
  58. ```
  59. SearchSymbols (pattern) — find the API across all modules
  60. SetBreakpoint (address) — break on it
  61. run — blocks until BP hits
  62. GetDebugState
  63. GetArguments — read function arguments
  64. GetCallStack — see who called it
  65. ```
  66. ### Trace execution
  67. ```
  68. GetDebugState — must be PAUSED
  69. TraceInto (count) — step N instructions, get address + disasm log
  70. GetDebugState — see where we ended up
  71. ```
  72. ### Unpack a binary
  73. ```
  74. LoadBinary → WaitForPause → GetDebugState
  75. AnalyzeModule — check sections, EP, image size
  76. DetectOEP — look for packing indicators (RWX sections, zero raw sizes)
  77. SetHardwareBreakpoint — on suspected OEP or after unpacking stub
  78. run → GetDebugState — run blocks until pause
  79. DumpModule — dump the unpacked module
  80. ```
  81. ### Patch memory
  82. ```
  83. GetDebugState — must be PAUSED
  84. Disassemble (address) — see current bytes
  85. WriteMemToAddress — patch with new bytes
  86. Disassemble (address) — verify the patch
  87. GetPatches — see all active patches
  88. ```
  89. ### Monitor while user interacts with GUI (HTTP only)
  90. ```
  91. WaitForEvent (timeoutMs: 120000) — long-poll up to 2 minutes
  92. — returns any events that fired
  93. GetDebugState — check where we are now
  94. WaitForEvent (timeoutMs: 120000) — keep watching
  95. ```
  96. ---
  97. ## Rule 4: All 84 Tools Reference
  98. Every tool response includes a `[state]` line showing current debugger status and any `[event:*]` lines with queued events. You always know where you are.
  99. ### State & Control (always available)
  100. | Tool | Parameters | Description |
  101. |------|-----------|-------------|
  102. | `GetDebugState` | — | Current state (NO_TARGET/RUNNING/PAUSED), PID, address, module |
  103. | `LoadBinary` | `filePath` | Load an executable into the debugger |
  104. | `AttachProcess` | `pid` | Attach to a running process by PID |
  105. | `run` | `timeoutMs?` (default 300000) | Resume execution (F9). Blocks until target pauses or timeout |
  106. | `PauseDebug` | — | Pause the target (F12) |
  107. | `WaitForPause` | `timeout?` (ms, default 10000) | Block until target pauses (breakpoint/exception) |
  108. | `StopDebug` | — | Terminate debug session |
  109. | `RestartDebug` | — | Restart debug session |
  110. | `ExecuteDebuggerCommand` | `command` | Run any x64dbg command string. Blocks if target becomes RUNNING |
  111. | `EvalExpression` | `expression` | Evaluate expression (address, register, symbol, arithmetic) |
  112. | `Echo` | `message` | Echo input back (connectivity test) |
  113. | `ListCommandsByCategory` | `category?` | List available MCP tools |
  114. | `SearchForStrings` | `searchText` | Search process memory for text |
  115. | `GetEventLog` | `count?` (default 20) | Last N debugger events |
  116. | `ClearEventLog` | — | Clear the event log |
  117. | `WaitForEvent` | `timeoutMs?` (default 30000) | Long-poll for debugger events. For HTTP clients to watch state changes |
  118. ### Stepping (requires PAUSED)
  119. | Tool | Parameters | Description |
  120. |------|-----------|-------------|
  121. | `StepInto` | — | Single-step into calls (F7). Returns new address + disassembly |
  122. | `StepOver` | — | Step over calls (F8). Returns new address + disassembly |
  123. | `StepOut` | — | Run until return (Ctrl+F9). Returns new address + disassembly |
  124. | `RunToAddress` | `address` | Run until hitting a specific address |
  125. | `TraceInto` | `count` | Step N instructions recording address + disassembly for each |
  126. | `TraceOver` | `count` | Trace N instructions stepping OVER calls |
  127. ### Breakpoints (requires debug session)
  128. | Tool | Parameters | Description |
  129. |------|-----------|-------------|
  130. | `SetBreakpoint` | `target` (address or symbol) | Set INT3 breakpoint |
  131. | `SetHardwareBreakpoint` | `address`, `type` (r/w/x), `size?` | Set hardware BP (DR0-DR3) |
  132. | `SetConditionalBreakpoint` | `address`, `condition`, `log?` | Set BP with condition expression |
  133. | `SetMemoryBreakpoint` | `address`, `type` (r/w/x), `singleshoot?` | Set memory breakpoint |
  134. | `SetExceptionBreakpoint` | `exceptionCode`, `chance` (1/2/3), `action` | Configure exception BP (break/ignore) |
  135. | `DeleteExceptionBreakpoint` | `exceptionCode` | Delete an exception breakpoint |
  136. | `EnableBreakpoint` | `address` | Enable a breakpoint |
  137. | `DisableBreakpoint` | `address` | Disable without deleting |
  138. | `ToggleBreakpoint` | `address` | Toggle enabled/disabled |
  139. | `DeleteBreakpoint` | `target` | Remove a breakpoint |
  140. | `DeleteAllBreakpoints` | — | Remove all BPs (normal, hardware, memory) |
  141. | `ResetHitCount` | `address` | Reset a BP's hit counter to zero |
  142. | `ListBreakpoints` | — | List all active breakpoints |
  143. | `SetBreakpointCommand` | `address`, `command` | Run x64dbg command on BP hit |
  144. | `SetBreakpointFastResume` | `address`, `enable` | Auto-resume on BP hit |
  145. ### Disassembly & Code (requires PAUSED)
  146. | Tool | Parameters | Description |
  147. |------|-----------|-------------|
  148. | `Disassemble` | `address?`, `count?` (default 16) | Disassemble N instructions |
  149. | `DisassembleFunction` | `address?` | Disassemble entire function (needs analysis first) |
  150. | `GetCurrentAddress` | — | Current EIP/RIP with label and comment |
  151. | `GetFunctions` | `module?` | List analyzed functions with addresses |
  152. | `GetReferences` | `address` | Find CALL/JMP xrefs to target address |
  153. | `Assemble` | `address`, `instruction` | Assemble an instruction at address |
  154. ### Registers & Stack (requires PAUSED)
  155. | Tool | Parameters | Description |
  156. |------|-----------|-------------|
  157. | `GetAllRegisters` | — | Dump all general-purpose registers |
  158. | `SetRegister` | `register`, `value` | Set a CPU register value |
  159. | `GetCallStack` | — | Current thread call stack |
  160. | `GetArguments` | `count?` | Read function arguments from stack/registers |
  161. | `WatchExpressions` | `expressions` (array) | Evaluate multiple expressions in one call |
  162. | `FollowPointer` | `address`, `depth?` | Dereference pointer chain N levels deep |
  163. ### Memory (requires debug session)
  164. | Tool | Parameters | Description |
  165. |------|-----------|-------------|
  166. | `ReadMemory` | `address`, `size?` (default 64) | Hex dump of process memory |
  167. | `WriteMemToAddress` | `address`, `bytes` (hex) | Patch memory with hex bytes |
  168. | `AllocateMemory` | `size` | Allocate memory in target process |
  169. | `FreeMemory` | `address` | Free allocated memory |
  170. | `GetMemoryMap` | — | Memory regions with addresses, sizes, protection |
  171. | `GetDumpableRegions` | — | List committed, readable memory regions |
  172. | `FindPattern` | `pattern`, `module?` | Scan for byte pattern with ?? wildcards |
  173. | `GetPatches` | — | List all memory patches |
  174. | `RestorePatches` | — | Restore all patches to original bytes |
  175. | `DumpMemory` | `address`, `size`, `filePath` | Save memory region to file |
  176. ### Modules & Symbols (requires debug session)
  177. | Tool | Parameters | Description |
  178. |------|-----------|-------------|
  179. | `ListModules` | — | List loaded modules with base addresses and sizes |
  180. | `GetImports` | `module?` | Show module import table |
  181. | `GetExports` | `module?` | Show module export table |
  182. | `SearchSymbols` | `pattern` | Search for symbols matching pattern across all modules |
  183. | `ListSymbols` | `module` | List exported symbols of a specific module |
  184. | `GetStrings` | `module?` | Extract ASCII strings from module memory |
  185. ### Analysis (requires debug session)
  186. | Tool | Parameters | Description |
  187. |------|-----------|-------------|
  188. | `AnalyzeModule` | `module?` | PE structure: sections, EP, image size, characteristics |
  189. | `AnalyzeCode` | `address?`, `type` (function/module/controlflow) | Run code analysis |
  190. | `DetectOEP` | `module?` | Detect Original Entry Point for packed executables |
  191. | `DumpModule` | `module`, `filePath` | Dump entire module to file |
  192. | `GetPEB` | — | Read Process Environment Block fields |
  193. | `GetSEHChain` | — | Walk Structured Exception Handler chain (x32) |
  194. | `SaveDatabase` | — | Save the x64dbg database (.dd64/.dd32) |
  195. ### Bookmarks & Comments (requires debug session)
  196. | Tool | Parameters | Description |
  197. |------|-----------|-------------|
  198. | `CommentOrLabelAtAddress` | `address`, `text`, `type` (comment/label) | Add comment/label in disassembly |
  199. | `SetBookmark` | `address` | Set a bookmark |
  200. | `DeleteBookmark` | `address` | Delete a bookmark |
  201. | `ListBookmarks` | — | List all bookmarks |
  202. ### Threads (requires debug session)
  203. | Tool | Parameters | Description |
  204. |------|-----------|-------------|
  205. | `GetThreads` | — | List all threads with IDs and instruction pointers |
  206. | `SwitchThread` | `threadId` | Switch active thread context |
  207. | `SuspendThread` | `threadId` | Suspend a thread |
  208. | `ResumeThread` | `threadId` | Resume a suspended thread |
  209. ---
  210. ## Rule 5: Common Mistakes
  211. | Mistake | Fix |
  212. |---------|-----|
  213. | Disassemble while target is RUNNING | `WaitForPause` or `PauseDebug` first |
  214. | Assume breakpoint was hit after `run` | `run` blocks now, but still `GetDebugState` after |
  215. | Forget to check state after user says "paused" | Immediately `GetDebugState` |
  216. | Read memory at wrong address | `EvalExpression` to resolve symbols first |
  217. | Use `DisassembleFunction` without analysis | `AnalyzeCode` with type=function first, or `ExecuteDebuggerCommand` with `analr <address>` |
  218. | Set breakpoint on symbol without resolving | `SearchSymbols` or `EvalExpression` to get actual address |
  219. | Lose track of which binary is loaded | `GetDebugState` tells you, `ListModules` for full list |
  220. | Pass MCP tool name to `ExecuteDebuggerCommand` | Call the tool directly — `ExecuteDebuggerCommand` rejects MCP tool names |
  221. | Use `erun` to blindly pass all exceptions | Use `SetExceptionBreakpoint` for selective exception handling |
  222. | Go idle while user interacts with GUI | Call `WaitForEvent` with longer timeout (60-120s) to watch for events |
  223. ---
  224. ## Rule 6: Expression Evaluation
  225. Use `EvalExpression` to resolve anything:
  226. - Symbols: `kernel32:CreateFileA`, `ntdll:NtAllocateVirtualMemory`
  227. - Registers: `cip`, `rax`, `esp+4`, `[rsp+0x28]`
  228. - Arithmetic: `rax+0x10`, `modulebase+0x1000`
  229. - Labels: any label set with `CommentOrLabelAtAddress`
  230. ---
  231. ## Rule 7: Explain What You See
  232. When analyzing code, always tell the user:
  233. - What address and module you're looking at
  234. - What the instructions do in plain language
  235. - What the registers/stack suggest about arguments and state
  236. - What the call stack context means
  237. Reference concrete addresses and module names — never say "the current function" without saying which one.
  238. ---
  239. ## Rule 8: Debugging GUI / Message Loop Apps
  240. When the target is RUNNING in a message loop (waiting for user input, showing a dialog, sitting at a UI screen), `run` will time out because no breakpoint is being hit. Do NOT fall back to static file analysis — use the debugger properly.
  241. Strategies:
  242. - **PauseDebug** — pause the target at any time, inspect state, then resume. The app freezes briefly but you get full debugger access.
  243. - **Set API breakpoints before resuming** — breakpoint on APIs the app will call when the user interacts (e.g. `GetMessageA`, `SendMessageA`, `CreateFileA`, `ReadFile`, button handlers). The target pauses when the user triggers that code path.
  244. - **WaitForEvent with long timeout** — if the user is about to interact with the GUI, call `WaitForEvent(timeoutMs: 120000)` to watch for breakpoint hits or exceptions while they click around.
  245. - **SetBreakpointFastResume + SetBreakpointCommand** — for logging without pausing: set a BP with a log command and fast resume. The target keeps running while you collect data.
  246. - **Hardware breakpoints on data** — if you know which memory the app reads/writes when the user acts, set a hardware BP on it. The target pauses when that memory is accessed.
  247. Never give up and read the binary file from disk. The debugger can always pause, inspect, and resume.
README.md · README · 287 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. <p align="center"><img src="https://raw.githubusercontent.com/duty1g/x64dbg-mcp-server/main/logo.png" width="75%"/></p>
  2. <h1 align="center">x64dbg-MCP Server</h1>
  3. <h4 align="center">MCP-powered agentic reverse engineering for x64dbg.</h4>
  4. <p align="center">
  5. <img src="https://img.shields.io/github/stars/duty1g/x64dbg-mcp-server" alt="Stars"/>
  6. <a href="https://github.com/duty1g/x64dbg-mcp-server/releases"><img src="https://img.shields.io/github/v/release/duty1g/x64dbg-mcp-server" alt="Version"/></a>
  7. <a href="https://github.com/duty1g/x64dbg-mcp-server/releases"><img src="https://img.shields.io/github/downloads/duty1g/x64dbg-mcp-server/total" alt="Downloads"/></a>
  8. <img src="https://img.shields.io/github/languages/top/duty1g/x64dbg-mcp-server" alt="Language"/>
  9. <a href="./LICENSE"><img src="https://img.shields.io/badge/License-MIT-green" alt="License"/></a>
  10. <a href="https://duty1g.online"><img src="https://img.shields.io/badge/Red-Team-red" alt="Red Team"/></a>
  11. <a href="https://duty1g.online"><img src="https://img.shields.io/badge/Reverse%20Engineering-purple" alt="Reverse Engineering"/></a>
  12. <a href="https://twitter.com/duty_1g"><img src="https://img.shields.io/twitter/follow/duty_1g.svg?logo=twitter" alt="Twitter"/></a>
  13. </p>
  14. <p align="center">
  15. <a href="#features">Features</a> •
  16. <a href="#install">Install</a> •
  17. <a href="#usage">Usage</a> •
  18. <a href="#tools">Tools</a> •
  19. <a href="#configuration">Configuration</a> •
  20. <a href="#building">Building</a> •
  21. <a href="#project-structure">Structure</a>
  22. </p>
  23. #
  24. x64dbg-MCP Server is a native [MCP](https://modelcontextprotocol.io/) (Model Context Protocol) plugin for [x64dbg](https://x64dbg.com/) that exposes the debugger's full functionality over HTTP. Connect any MCP-compatible AI assistant and control x64dbg programmatically: set breakpoints, step through code, read memory, dump registers, and more.
  25. Built with [Zig](https://ziglang.org/) — zero dependencies, single-binary output, cross-compiles to both x32 and x64 from any host. No .NET, no Python, no runtime — just drop the plugin into your x64dbg plugins folder and go.
  26. > **MCP 2024-11-05** — Streamable HTTP + SSE transports, JSON-RPC 2.0.
  27. ## Features
  28. - **84 MCP Tools:** Full debugger control — disassembly, stepping, breakpoints, memory allocation, registers, modules, threads, call stack, pattern scanning, string extraction, xrefs, symbols, bookmarks, PE analysis, OEP detection, module dumping, PEB/SEH inspection, tracing, and more.
  29. - **22 Event Callbacks:** Full debugger event coverage — init, stop, breakpoint, exception, step, attach/detach, DLL load/unload, threads, and more.
  30. - **Zero Dependencies:** Pure native plugin, no runtime or framework needed.
  31. - **x32 and x64:** Single codebase, builds both architectures from one command.
  32. - **Dual Transport:** Streamable HTTP + SSE — compatible with any MCP client (new and legacy).
  33. - **Bearer Auth:** Mandatory token authentication — auto-generated on first run, required on every request to prevent unauthorized access.
  34. - **Config Dialog:** Change IP/port/token from the Plugins menu, auto-restarts the server on save.
  35. - **Auto-Start:** MCP server starts automatically when x64dbg launches.
  36. - **Cross-Compile:** Build Windows plugins from Linux, macOS, or WSL.
  37. ## Install
  38. Download the latest release or build from source:
  39. 1. Copy the contents of `dist/` into your x64dbg root folder (deploys both x32 and x64)
  40. 2. Launch x64dbg
  41. The MCP server starts automatically. Default ports:
  42. - **x64:** `0.0.0.0:9094`
  43. - **x32:** `0.0.0.0:9095`
  44. ## Usage
  45. Add to your MCP client config (`.mcp.json`, etc.):
  46. **Streamable HTTP (recommended):**
  47. ```json
  48. {
  49. "mcpServers": {
  50. "x64dbg": {
  51. "type": "http",
  52. "url": "http://localhost:9094/",
  53. "headers": {
  54. "Authorization": "Bearer YOUR_TOKEN_HERE"
  55. }
  56. }
  57. }
  58. }
  59. ```
  60. **SSE (legacy clients):**
  61. ```json
  62. {
  63. "mcpServers": {
  64. "x64dbg": {
  65. "type": "sse",
  66. "url": "http://localhost:9094/sse",
  67. "headers": {
  68. "Authorization": "Bearer YOUR_TOKEN_HERE"
  69. }
  70. }
  71. }
  72. }
  73. ```
  74. If connecting from WSL or a remote machine, use the host's IP address and set the bind address to `0.0.0.0` in the config dialog.
  75. **Example — AI-assisted reverse engineering session:**
  76. ```
  77. You: Load calc.exe and break at the entry point
  78. AI: [calls LoadBinary, SetBreakpoint, run, WaitForPause]
  79. Loaded calc.exe, hit breakpoint at 0x7FF7A1234000 in calc.exe
  80. You: What are the current registers?
  81. AI: [calls GetAllRegisters]
  82. RAX: 0x0, RCX: 0x7FF7A1234000, RDX: 0x1, ...
  83. You: Read 64 bytes at the current instruction pointer
  84. AI: [calls ReadMemory]
  85. 48 83 EC 28 E8 12 34 00 00 ...
  86. You: Step over the next 3 instructions and show me the stack
  87. AI: [calls StepOver x3, GetCallStack]
  88. Stepped to 0x7FF7A1234010, call stack: ...
  89. ```
  90. ## Tools
  91. 72 MCP tools covering the full x64dbg debugging workflow.
  92. ### Always available
  93. | Tool | Description |
  94. |------|-------------|
  95. | `GetDebugState` | Current debugger state, PID, instruction pointer |
  96. | `LoadBinary` | Load an executable into the debugger |
  97. | `ExecuteDebuggerCommand` | Run any x64dbg command |
  98. | `ListCommandsByCategory` | List available MCP tools |
  99. | `SearchForStrings` | Search process memory for text |
  100. | `GetEventLog` | Last N debugger events (exceptions, breakpoints, DLL loads) |
  101. | `ClearEventLog` | Clear the event log |
  102. | `EvalExpression` | Evaluate any x64dbg expression (address, register, arithmetic) |
  103. | `AttachProcess` | Attach to a running process by PID |
  104. | `Echo` | Echo input back |
  105. | `WaitForEvent` | Long-poll for debugger events (breakpoint, pause, resume, exception) |
  106. ### Requires active debug session
  107. | Tool | Description |
  108. |------|-------------|
  109. | `GetCurrentAddress` | Current EIP/RIP with label and comment |
  110. | `Disassemble` | Disassemble N instructions at an address |
  111. | `DisassembleFunction` | Disassemble an entire function by boundaries |
  112. | `ReadMemory` | Hex dump of process memory |
  113. | `WaitForPause` | Block until target pauses |
  114. | `run` | Resume execution (F9) |
  115. | `StepInto` | Single-step into calls (F7) |
  116. | `StepOver` | Step over calls (F8) |
  117. | `StepOut` | Run until return (Ctrl+F9) |
  118. | `PauseDebug` | Pause the target (F12) |
  119. | `StopDebug` | Terminate debug session |
  120. | `RestartDebug` | Restart debug session |
  121. | `SetBreakpoint` | Set INT3 breakpoint at address/symbol |
  122. | `SetHardwareBreakpoint` | Set hardware breakpoint (DR0-DR3, read/write/execute) |
  123. | `SetConditionalBreakpoint` | Set breakpoint with condition expression and optional log |
  124. | `EnableBreakpoint` | Enable a breakpoint at a given address |
  125. | `DisableBreakpoint` | Disable a breakpoint without deleting it |
  126. | `ToggleBreakpoint` | Toggle a breakpoint between enabled and disabled |
  127. | `DeleteBreakpoint` | Remove a breakpoint |
  128. | `DeleteAllBreakpoints` | Remove all breakpoints (normal, hardware, memory) |
  129. | `ResetHitCount` | Reset a breakpoint's hit counter to zero |
  130. | `ListBreakpoints` | List all active breakpoints |
  131. | `GetAllRegisters` | Dump all general-purpose registers |
  132. | `SetRegister` | Set a CPU register value |
  133. | `GetCallStack` | Current thread call stack |
  134. | `GetThreads` | List all threads with IDs and instruction pointers |
  135. | `SwitchThread` | Switch active thread context |
  136. | `SuspendThread` | Suspend a thread by its thread ID |
  137. | `ResumeThread` | Resume a suspended thread |
  138. | `ListModules` | List loaded modules with base addresses and sizes |
  139. | `GetMemoryMap` | Memory regions with addresses, sizes, and protection |
  140. | `GetDumpableRegions` | List committed, readable memory regions |
  141. | `AllocateMemory` | Allocate memory in the target process |
  142. | `FreeMemory` | Free allocated memory in the target process |
  143. | `WriteMemToAddress` | Patch memory with hex bytes |
  144. | `RestorePatches` | Restore all patches to original bytes |
  145. | `Assemble` | Assemble an instruction at an address |
  146. | `CommentOrLabelAtAddress` | Add comment/label in disassembly |
  147. | `SetBookmark` | Set a bookmark at an address |
  148. | `DeleteBookmark` | Delete a bookmark |
  149. | `ListBookmarks` | List all bookmarks |
  150. | `GetImports` | Show module import table |
  151. | `GetExports` | Show module export table |
  152. | `SearchSymbols` | Search for symbols matching a pattern |
  153. | `ListSymbols` | List exported symbols of a module |
  154. | `GetPatches` | List all memory patches |
  155. | `FindPattern` | Scan module memory for byte pattern with ?? wildcards |
  156. | `GetStrings` | Extract ASCII strings from a module's memory |
  157. | `GetReferences` | Find CALL/JMP xrefs to a target address |
  158. | `GetFunctions` | List analyzed functions with addresses and labels |
  159. | `AnalyzeModule` | PE structure analysis: sections, EP, image size |
  160. | `DetectOEP` | Detect Original Entry Point for packed executables |
  161. | `DumpMemory` | Save memory region to file on disk |
  162. | `DumpModule` | Dump an entire module to a file |
  163. | `RunToAddress` | Run until hitting a specific address |
  164. | `TraceInto` | Step N instructions recording address + disassembly |
  165. | `FollowPointer` | Dereference pointer chain N levels deep |
  166. | `WatchExpressions` | Evaluate multiple expressions in one call |
  167. | `GetSEHChain` | Walk Structured Exception Handler chain (x32) |
  168. | `GetPEB` | Read Process Environment Block fields |
  169. | `GetArguments` | Read function arguments from stack/registers |
  170. | `SetMemoryBreakpoint` | Set memory breakpoint (read/write/execute) |
  171. | `SetExceptionBreakpoint` | Configure exception breakpoint (break or ignore, first/second/all chance) |
  172. | `DeleteExceptionBreakpoint` | Delete an exception breakpoint |
  173. | `AnalyzeCode` | Run code analysis (function, module, or control flow) |
  174. | `TraceOver` | Trace N instructions stepping over calls |
  175. | `SetBreakpointCommand` | Set a command to execute when a breakpoint is hit |
  176. | `SetBreakpointFastResume` | Enable/disable fast resume (auto-continue) on a breakpoint |
  177. | `SaveDatabase` | Save the x64dbg database (.dd64/.dd32) |
  178. ## Configuration
  179. Go to **Plugins > x64dbg-MCP Server > Configure MCP Server...** to change the bind address, port, and auth token.
  180. - `0.0.0.0` — listen on all interfaces (for WSL/remote access)
  181. - `127.0.0.1` — local-only access
  182. ### Authentication
  183. A Bearer token is auto-generated on first run and required on every request. The MCP server has full debugger control and can read/write process memory — all requests without a valid token receive `401 Unauthorized`. Click **Generate** in the config dialog to rotate the token, or **Copy** to copy it to clipboard. Clients must include the token as an `Authorization: Bearer <token>` header.
  184. Changes take effect immediately — the server auto-restarts on save. Config is persisted to `mcp_config.json` next to the x64dbg executable.
  185. ## Building
  186. Requires [Zig 0.16-dev](https://ziglang.org/download/) or later. Builds on Windows, WSL, Linux, or macOS.
  187. ```console
  188. zig build -Doptimize=ReleaseSafe --prefix dist
  189. ```
  190. Output mirrors x64dbg's folder structure — copy the contents of `dist/` into your x64dbg root to deploy both architectures at once:
  191. ```
  192. dist/
  193. ├── x32/
  194. │ └── plugins/
  195. │ └── x64dbg-MCP-Server.dp32
  196. └── x64/
  197. └── plugins/
  198. └── x64dbg-MCP-Server.dp64
  199. ```
  200. ## Project Structure
  201. ```
  202. ├── build.zig # build config — x32 + x64 cross-compilation
  203. ├── build.zig.zon # package manifest
  204. └── src/
  205. ├── main.zig # plugin entry point, menu, callbacks
  206. ├── core/
  207. │ ├── bridge.zig # x64dbg SDK bindings (runtime-resolved)
  208. │ ├── config.zig # Win32 config dialog and persistence
  209. │ └── mcp_server.zig # HTTP server and JSON-RPC dispatch
  210. ├── mcp/
  211. │ ├── json.zig # JSON writer and parser helpers
  212. │ └── tools.zig # MCP tool definitions and handlers
  213. └── resources/
  214. └── icons.zig # embedded PNG icon data
  215. ```
  216. ## How It Works
  217. The plugin loads into x64dbg at startup, resolves the debugger's API symbols at runtime from `x64bridge.dll` and `x64dbg.dll`, then spins up an HTTP server on a background thread. MCP clients connect over HTTP and send JSON-RPC requests to invoke tools — each tool maps directly to x64dbg SDK calls (breakpoints, memory reads, command execution, etc.).
  218. No polling, no external processes — the plugin lives inside x64dbg's address space with direct access to the debugger API.
  219. ---
  220. ## Disclaimer
  221. > This tool is intended for legitimate reverse engineering, malware analysis, security research, and educational purposes only. It provides full debugger control over running processes — including memory read/write, code execution, and process manipulation — over a network interface.
  222. >
  223. > By using this software, you accept full responsibility for how it is used. The author is not liable for any misuse, damage, or legal consequences resulting from the use of this tool. Always ensure you have proper authorization before debugging or analyzing any software.
  224. >
  225. > Do not expose the MCP server to untrusted networks. While Bearer token authentication is enforced, the server communicates over unencrypted HTTP.
  226. ---
  227. ### License
  228. MIT. See [LICENSE](./LICENSE).
  229. Made with 🖤 by [@duty1g](https://github.com/duty1g)

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.