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.
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
Markdown
[](/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
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)
- # x64dbg Reverse Engineering — MCP Workflow Guide
- You are controlling x64dbg through MCP tools.
- **Transport matters:**
- - **SSE clients** receive push notifications for debugger events (breakpoints, exceptions, state changes) in real time.
- - **HTTP clients** must poll — call `WaitForEvent` to long-poll for events, or read the `[state]` and `[event:*]` lines included in every tool response.
- Treat every assumption about debugger state as stale until verified by a tool response.
- ---
- ## Rule 1: Always Know Your State
- **Before every action**, call `GetDebugState`. No exceptions.
- - `NO_TARGET` — nothing loaded. Use `LoadBinary` or `AttachProcess` first.
- - `PAUSED` — target is stopped. You can read memory, disassemble, inspect registers.
- - `RUNNING` — target is executing. You CANNOT read memory, disassemble, or inspect anything. Call `WaitForPause` or `PauseDebug` first.
- 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.
- 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.
- If the user says "paused", "hit breakpoint", "stopped", or "debugger is paused" — immediately call `GetDebugState` to see where you are. Do not guess.
- ---
- ## Rule 2: Never Assume State Between Calls
- 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.
- Bad:
- ```
- SetBreakpoint → run → Disassemble (wrong: run blocks but verify anyway)
- ```
- Good:
- ```
- GetDebugState → SetBreakpoint → run → GetDebugState → Disassemble
- ```
- ---
- ## Rule 3: Core Workflows
- ### Load and analyze a binary
- ```
- GetDebugState
- LoadBinary (path)
- WaitForPause — target pauses at system breakpoint
- GetDebugState — confirm PAUSED, note the address
- GetAllRegisters — see initial state
- ListModules — see what's loaded
- Disassemble — look at current code
- ```
- ### Set breakpoint and run to it
- ```
- GetDebugState — must be PAUSED
- SetBreakpoint (target) — set the BP
- run — blocks until target pauses (5-min timeout)
- GetDebugState — confirm PAUSED, check address
- Disassemble — see where we landed
- GetAllRegisters — inspect state
- ```
- ### Step through code
- ```
- GetDebugState — must be PAUSED
- StepOver — response includes new address + disassembly
- — read the response carefully before next step
- StepOver — keep stepping, reading each response
- GetAllRegisters — check registers when needed
- GetCallStack — check call context when needed
- ```
- ### Find and hook an API call
- ```
- SearchSymbols (pattern) — find the API across all modules
- SetBreakpoint (address) — break on it
- run — blocks until BP hits
- GetDebugState
- GetArguments — read function arguments
- GetCallStack — see who called it
- ```
- ### Trace execution
- ```
- GetDebugState — must be PAUSED
- TraceInto (count) — step N instructions, get address + disasm log
- GetDebugState — see where we ended up
- ```
- ### Unpack a binary
- ```
- LoadBinary → WaitForPause → GetDebugState
- AnalyzeModule — check sections, EP, image size
- DetectOEP — look for packing indicators (RWX sections, zero raw sizes)
- SetHardwareBreakpoint — on suspected OEP or after unpacking stub
- run → GetDebugState — run blocks until pause
- DumpModule — dump the unpacked module
- ```
- ### Patch memory
- ```
- GetDebugState — must be PAUSED
- Disassemble (address) — see current bytes
- WriteMemToAddress — patch with new bytes
- Disassemble (address) — verify the patch
- GetPatches — see all active patches
- ```
- ### Monitor while user interacts with GUI (HTTP only)
- ```
- WaitForEvent (timeoutMs: 120000) — long-poll up to 2 minutes
- — returns any events that fired
- GetDebugState — check where we are now
- WaitForEvent (timeoutMs: 120000) — keep watching
- ```
- ---
- ## Rule 4: All 84 Tools Reference
- Every tool response includes a `[state]` line showing current debugger status and any `[event:*]` lines with queued events. You always know where you are.
- ### State & Control (always available)
- | Tool | Parameters | Description |
- |------|-----------|-------------|
- | `GetDebugState` | — | Current state (NO_TARGET/RUNNING/PAUSED), PID, address, module |
- | `LoadBinary` | `filePath` | Load an executable into the debugger |
- | `AttachProcess` | `pid` | Attach to a running process by PID |
- | `run` | `timeoutMs?` (default 300000) | Resume execution (F9). Blocks until target pauses or timeout |
- | `PauseDebug` | — | Pause the target (F12) |
- | `WaitForPause` | `timeout?` (ms, default 10000) | Block until target pauses (breakpoint/exception) |
- | `StopDebug` | — | Terminate debug session |
- | `RestartDebug` | — | Restart debug session |
- | `ExecuteDebuggerCommand` | `command` | Run any x64dbg command string. Blocks if target becomes RUNNING |
- | `EvalExpression` | `expression` | Evaluate expression (address, register, symbol, arithmetic) |
- | `Echo` | `message` | Echo input back (connectivity test) |
- | `ListCommandsByCategory` | `category?` | List available MCP tools |
- | `SearchForStrings` | `searchText` | Search process memory for text |
- | `GetEventLog` | `count?` (default 20) | Last N debugger events |
- | `ClearEventLog` | — | Clear the event log |
- | `WaitForEvent` | `timeoutMs?` (default 30000) | Long-poll for debugger events. For HTTP clients to watch state changes |
- ### Stepping (requires PAUSED)
- | Tool | Parameters | Description |
- |------|-----------|-------------|
- | `StepInto` | — | Single-step into calls (F7). Returns new address + disassembly |
- | `StepOver` | — | Step over calls (F8). Returns new address + disassembly |
- | `StepOut` | — | Run until return (Ctrl+F9). Returns new address + disassembly |
- | `RunToAddress` | `address` | Run until hitting a specific address |
- | `TraceInto` | `count` | Step N instructions recording address + disassembly for each |
- | `TraceOver` | `count` | Trace N instructions stepping OVER calls |
- ### Breakpoints (requires debug session)
- | Tool | Parameters | Description |
- |------|-----------|-------------|
- | `SetBreakpoint` | `target` (address or symbol) | Set INT3 breakpoint |
- | `SetHardwareBreakpoint` | `address`, `type` (r/w/x), `size?` | Set hardware BP (DR0-DR3) |
- | `SetConditionalBreakpoint` | `address`, `condition`, `log?` | Set BP with condition expression |
- | `SetMemoryBreakpoint` | `address`, `type` (r/w/x), `singleshoot?` | Set memory breakpoint |
- | `SetExceptionBreakpoint` | `exceptionCode`, `chance` (1/2/3), `action` | Configure exception BP (break/ignore) |
- | `DeleteExceptionBreakpoint` | `exceptionCode` | Delete an exception breakpoint |
- | `EnableBreakpoint` | `address` | Enable a breakpoint |
- | `DisableBreakpoint` | `address` | Disable without deleting |
- | `ToggleBreakpoint` | `address` | Toggle enabled/disabled |
- | `DeleteBreakpoint` | `target` | Remove a breakpoint |
- | `DeleteAllBreakpoints` | — | Remove all BPs (normal, hardware, memory) |
- | `ResetHitCount` | `address` | Reset a BP's hit counter to zero |
- | `ListBreakpoints` | — | List all active breakpoints |
- | `SetBreakpointCommand` | `address`, `command` | Run x64dbg command on BP hit |
- | `SetBreakpointFastResume` | `address`, `enable` | Auto-resume on BP hit |
- ### Disassembly & Code (requires PAUSED)
- | Tool | Parameters | Description |
- |------|-----------|-------------|
- | `Disassemble` | `address?`, `count?` (default 16) | Disassemble N instructions |
- | `DisassembleFunction` | `address?` | Disassemble entire function (needs analysis first) |
- | `GetCurrentAddress` | — | Current EIP/RIP with label and comment |
- | `GetFunctions` | `module?` | List analyzed functions with addresses |
- | `GetReferences` | `address` | Find CALL/JMP xrefs to target address |
- | `Assemble` | `address`, `instruction` | Assemble an instruction at address |
- ### Registers & Stack (requires PAUSED)
- | Tool | Parameters | Description |
- |------|-----------|-------------|
- | `GetAllRegisters` | — | Dump all general-purpose registers |
- | `SetRegister` | `register`, `value` | Set a CPU register value |
- | `GetCallStack` | — | Current thread call stack |
- | `GetArguments` | `count?` | Read function arguments from stack/registers |
- | `WatchExpressions` | `expressions` (array) | Evaluate multiple expressions in one call |
- | `FollowPointer` | `address`, `depth?` | Dereference pointer chain N levels deep |
- ### Memory (requires debug session)
- | Tool | Parameters | Description |
- |------|-----------|-------------|
- | `ReadMemory` | `address`, `size?` (default 64) | Hex dump of process memory |
- | `WriteMemToAddress` | `address`, `bytes` (hex) | Patch memory with hex bytes |
- | `AllocateMemory` | `size` | Allocate memory in target process |
- | `FreeMemory` | `address` | Free allocated memory |
- | `GetMemoryMap` | — | Memory regions with addresses, sizes, protection |
- | `GetDumpableRegions` | — | List committed, readable memory regions |
- | `FindPattern` | `pattern`, `module?` | Scan for byte pattern with ?? wildcards |
- | `GetPatches` | — | List all memory patches |
- | `RestorePatches` | — | Restore all patches to original bytes |
- | `DumpMemory` | `address`, `size`, `filePath` | Save memory region to file |
- ### Modules & Symbols (requires debug session)
- | Tool | Parameters | Description |
- |------|-----------|-------------|
- | `ListModules` | — | List loaded modules with base addresses and sizes |
- | `GetImports` | `module?` | Show module import table |
- | `GetExports` | `module?` | Show module export table |
- | `SearchSymbols` | `pattern` | Search for symbols matching pattern across all modules |
- | `ListSymbols` | `module` | List exported symbols of a specific module |
- | `GetStrings` | `module?` | Extract ASCII strings from module memory |
- ### Analysis (requires debug session)
- | Tool | Parameters | Description |
- |------|-----------|-------------|
- | `AnalyzeModule` | `module?` | PE structure: sections, EP, image size, characteristics |
- | `AnalyzeCode` | `address?`, `type` (function/module/controlflow) | Run code analysis |
- | `DetectOEP` | `module?` | Detect Original Entry Point for packed executables |
- | `DumpModule` | `module`, `filePath` | Dump entire module to file |
- | `GetPEB` | — | Read Process Environment Block fields |
- | `GetSEHChain` | — | Walk Structured Exception Handler chain (x32) |
- | `SaveDatabase` | — | Save the x64dbg database (.dd64/.dd32) |
- ### Bookmarks & Comments (requires debug session)
- | Tool | Parameters | Description |
- |------|-----------|-------------|
- | `CommentOrLabelAtAddress` | `address`, `text`, `type` (comment/label) | Add comment/label in disassembly |
- | `SetBookmark` | `address` | Set a bookmark |
- | `DeleteBookmark` | `address` | Delete a bookmark |
- | `ListBookmarks` | — | List all bookmarks |
- ### Threads (requires debug session)
- | Tool | Parameters | Description |
- |------|-----------|-------------|
- | `GetThreads` | — | List all threads with IDs and instruction pointers |
- | `SwitchThread` | `threadId` | Switch active thread context |
- | `SuspendThread` | `threadId` | Suspend a thread |
- | `ResumeThread` | `threadId` | Resume a suspended thread |
- ---
- ## Rule 5: Common Mistakes
- | Mistake | Fix |
- |---------|-----|
- | Disassemble while target is RUNNING | `WaitForPause` or `PauseDebug` first |
- | Assume breakpoint was hit after `run` | `run` blocks now, but still `GetDebugState` after |
- | Forget to check state after user says "paused" | Immediately `GetDebugState` |
- | Read memory at wrong address | `EvalExpression` to resolve symbols first |
- | Use `DisassembleFunction` without analysis | `AnalyzeCode` with type=function first, or `ExecuteDebuggerCommand` with `analr <address>` |
- | Set breakpoint on symbol without resolving | `SearchSymbols` or `EvalExpression` to get actual address |
- | Lose track of which binary is loaded | `GetDebugState` tells you, `ListModules` for full list |
- | Pass MCP tool name to `ExecuteDebuggerCommand` | Call the tool directly — `ExecuteDebuggerCommand` rejects MCP tool names |
- | Use `erun` to blindly pass all exceptions | Use `SetExceptionBreakpoint` for selective exception handling |
- | Go idle while user interacts with GUI | Call `WaitForEvent` with longer timeout (60-120s) to watch for events |
- ---
- ## Rule 6: Expression Evaluation
- Use `EvalExpression` to resolve anything:
- - Symbols: `kernel32:CreateFileA`, `ntdll:NtAllocateVirtualMemory`
- - Registers: `cip`, `rax`, `esp+4`, `[rsp+0x28]`
- - Arithmetic: `rax+0x10`, `modulebase+0x1000`
- - Labels: any label set with `CommentOrLabelAtAddress`
- ---
- ## Rule 7: Explain What You See
- When analyzing code, always tell the user:
- - What address and module you're looking at
- - What the instructions do in plain language
- - What the registers/stack suggest about arguments and state
- - What the call stack context means
- Reference concrete addresses and module names — never say "the current function" without saying which one.
- ---
- ## Rule 8: Debugging GUI / Message Loop Apps
- 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.
- Strategies:
- - **PauseDebug** — pause the target at any time, inspect state, then resume. The app freezes briefly but you get full debugger access.
- - **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.
- - **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.
- - **SetBreakpointFastResume + SetBreakpointCommand** — for logging without pausing: set a BP with a log command and fast resume. The target keeps running while you collect data.
- - **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.
- 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)
- <p align="center"><img src="https://raw.githubusercontent.com/duty1g/x64dbg-mcp-server/main/logo.png" width="75%"/></p>
- <h1 align="center">x64dbg-MCP Server</h1>
- <h4 align="center">MCP-powered agentic reverse engineering for x64dbg.</h4>
- <p align="center">
- <img src="https://img.shields.io/github/stars/duty1g/x64dbg-mcp-server" alt="Stars"/>
- <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>
- <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>
- <img src="https://img.shields.io/github/languages/top/duty1g/x64dbg-mcp-server" alt="Language"/>
- <a href="./LICENSE"><img src="https://img.shields.io/badge/License-MIT-green" alt="License"/></a>
- <a href="https://duty1g.online"><img src="https://img.shields.io/badge/Red-Team-red" alt="Red Team"/></a>
- <a href="https://duty1g.online"><img src="https://img.shields.io/badge/Reverse%20Engineering-purple" alt="Reverse Engineering"/></a>
- <a href="https://twitter.com/duty_1g"><img src="https://img.shields.io/twitter/follow/duty_1g.svg?logo=twitter" alt="Twitter"/></a>
- </p>
- <p align="center">
- <a href="#features">Features</a> •
- <a href="#install">Install</a> •
- <a href="#usage">Usage</a> •
- <a href="#tools">Tools</a> •
- <a href="#configuration">Configuration</a> •
- <a href="#building">Building</a> •
- <a href="#project-structure">Structure</a>
- </p>
- #
- 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.
- 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.
- > **MCP 2024-11-05** — Streamable HTTP + SSE transports, JSON-RPC 2.0.
- ## Features
- - **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.
- - **22 Event Callbacks:** Full debugger event coverage — init, stop, breakpoint, exception, step, attach/detach, DLL load/unload, threads, and more.
- - **Zero Dependencies:** Pure native plugin, no runtime or framework needed.
- - **x32 and x64:** Single codebase, builds both architectures from one command.
- - **Dual Transport:** Streamable HTTP + SSE — compatible with any MCP client (new and legacy).
- - **Bearer Auth:** Mandatory token authentication — auto-generated on first run, required on every request to prevent unauthorized access.
- - **Config Dialog:** Change IP/port/token from the Plugins menu, auto-restarts the server on save.
- - **Auto-Start:** MCP server starts automatically when x64dbg launches.
- - **Cross-Compile:** Build Windows plugins from Linux, macOS, or WSL.
- ## Install
- 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`
- ## Usage
- Add to your MCP client config (`.mcp.json`, etc.):
- **Streamable HTTP (recommended):**
- ```json
- {
- "mcpServers": {
- "x64dbg": {
- "type": "http",
- "url": "http://localhost:9094/",
- "headers": {
- "Authorization": "Bearer YOUR_TOKEN_HERE"
- }
- }
- }
- }
- ```
- **SSE (legacy clients):**
- ```json
- {
- "mcpServers": {
- "x64dbg": {
- "type": "sse",
- "url": "http://localhost:9094/sse",
- "headers": {
- "Authorization": "Bearer YOUR_TOKEN_HERE"
- }
- }
- }
- }
- ```
- 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.
- **Example — AI-assisted reverse engineering session:**
- ```
- You: Load calc.exe and break at the entry point
- AI: [calls LoadBinary, SetBreakpoint, run, WaitForPause]
- Loaded calc.exe, hit breakpoint at 0x7FF7A1234000 in calc.exe
- You: What are the current registers?
- AI: [calls GetAllRegisters]
- RAX: 0x0, RCX: 0x7FF7A1234000, RDX: 0x1, ...
- You: Read 64 bytes at the current instruction pointer
- AI: [calls ReadMemory]
- 48 83 EC 28 E8 12 34 00 00 ...
- You: Step over the next 3 instructions and show me the stack
- AI: [calls StepOver x3, GetCallStack]
- Stepped to 0x7FF7A1234010, call stack: ...
- ```
- ## Tools
- 72 MCP tools covering the full x64dbg debugging workflow.
- ### Always available
- | Tool | Description |
- |------|-------------|
- | `GetDebugState` | Current debugger state, PID, instruction pointer |
- | `LoadBinary` | Load an executable into the debugger |
- | `ExecuteDebuggerCommand` | Run any x64dbg command |
- | `ListCommandsByCategory` | List available MCP tools |
- | `SearchForStrings` | Search process memory for text |
- | `GetEventLog` | Last N debugger events (exceptions, breakpoints, DLL loads) |
- | `ClearEventLog` | Clear the event log |
- | `EvalExpression` | Evaluate any x64dbg expression (address, register, arithmetic) |
- | `AttachProcess` | Attach to a running process by PID |
- | `Echo` | Echo input back |
- | `WaitForEvent` | Long-poll for debugger events (breakpoint, pause, resume, exception) |
- ### Requires active debug session
- | Tool | Description |
- |------|-------------|
- | `GetCurrentAddress` | Current EIP/RIP with label and comment |
- | `Disassemble` | Disassemble N instructions at an address |
- | `DisassembleFunction` | Disassemble an entire function by boundaries |
- | `ReadMemory` | Hex dump of process memory |
- | `WaitForPause` | Block until target pauses |
- | `run` | Resume execution (F9) |
- | `StepInto` | Single-step into calls (F7) |
- | `StepOver` | Step over calls (F8) |
- | `StepOut` | Run until return (Ctrl+F9) |
- | `PauseDebug` | Pause the target (F12) |
- | `StopDebug` | Terminate debug session |
- | `RestartDebug` | Restart debug session |
- | `SetBreakpoint` | Set INT3 breakpoint at address/symbol |
- | `SetHardwareBreakpoint` | Set hardware breakpoint (DR0-DR3, read/write/execute) |
- | `SetConditionalBreakpoint` | Set breakpoint with condition expression and optional log |
- | `EnableBreakpoint` | Enable a breakpoint at a given address |
- | `DisableBreakpoint` | Disable a breakpoint without deleting it |
- | `ToggleBreakpoint` | Toggle a breakpoint between enabled and disabled |
- | `DeleteBreakpoint` | Remove a breakpoint |
- | `DeleteAllBreakpoints` | Remove all breakpoints (normal, hardware, memory) |
- | `ResetHitCount` | Reset a breakpoint's hit counter to zero |
- | `ListBreakpoints` | List all active breakpoints |
- | `GetAllRegisters` | Dump all general-purpose registers |
- | `SetRegister` | Set a CPU register value |
- | `GetCallStack` | Current thread call stack |
- | `GetThreads` | List all threads with IDs and instruction pointers |
- | `SwitchThread` | Switch active thread context |
- | `SuspendThread` | Suspend a thread by its thread ID |
- | `ResumeThread` | Resume a suspended thread |
- | `ListModules` | List loaded modules with base addresses and sizes |
- | `GetMemoryMap` | Memory regions with addresses, sizes, and protection |
- | `GetDumpableRegions` | List committed, readable memory regions |
- | `AllocateMemory` | Allocate memory in the target process |
- | `FreeMemory` | Free allocated memory in the target process |
- | `WriteMemToAddress` | Patch memory with hex bytes |
- | `RestorePatches` | Restore all patches to original bytes |
- | `Assemble` | Assemble an instruction at an address |
- | `CommentOrLabelAtAddress` | Add comment/label in disassembly |
- | `SetBookmark` | Set a bookmark at an address |
- | `DeleteBookmark` | Delete a bookmark |
- | `ListBookmarks` | List all bookmarks |
- | `GetImports` | Show module import table |
- | `GetExports` | Show module export table |
- | `SearchSymbols` | Search for symbols matching a pattern |
- | `ListSymbols` | List exported symbols of a module |
- | `GetPatches` | List all memory patches |
- | `FindPattern` | Scan module memory for byte pattern with ?? wildcards |
- | `GetStrings` | Extract ASCII strings from a module's memory |
- | `GetReferences` | Find CALL/JMP xrefs to a target address |
- | `GetFunctions` | List analyzed functions with addresses and labels |
- | `AnalyzeModule` | PE structure analysis: sections, EP, image size |
- | `DetectOEP` | Detect Original Entry Point for packed executables |
- | `DumpMemory` | Save memory region to file on disk |
- | `DumpModule` | Dump an entire module to a file |
- | `RunToAddress` | Run until hitting a specific address |
- | `TraceInto` | Step N instructions recording address + disassembly |
- | `FollowPointer` | Dereference pointer chain N levels deep |
- | `WatchExpressions` | Evaluate multiple expressions in one call |
- | `GetSEHChain` | Walk Structured Exception Handler chain (x32) |
- | `GetPEB` | Read Process Environment Block fields |
- | `GetArguments` | Read function arguments from stack/registers |
- | `SetMemoryBreakpoint` | Set memory breakpoint (read/write/execute) |
- | `SetExceptionBreakpoint` | Configure exception breakpoint (break or ignore, first/second/all chance) |
- | `DeleteExceptionBreakpoint` | Delete an exception breakpoint |
- | `AnalyzeCode` | Run code analysis (function, module, or control flow) |
- | `TraceOver` | Trace N instructions stepping over calls |
- | `SetBreakpointCommand` | Set a command to execute when a breakpoint is hit |
- | `SetBreakpointFastResume` | Enable/disable fast resume (auto-continue) on a breakpoint |
- | `SaveDatabase` | Save the x64dbg database (.dd64/.dd32) |
- ## Configuration
- Go to **Plugins > x64dbg-MCP Server > Configure MCP Server...** to change the bind address, port, and auth token.
- - `0.0.0.0` — listen on all interfaces (for WSL/remote access)
- - `127.0.0.1` — local-only access
- ### Authentication
- 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.
- Changes take effect immediately — the server auto-restarts on save. Config is persisted to `mcp_config.json` next to the x64dbg executable.
- ## Building
- Requires [Zig 0.16-dev](https://ziglang.org/download/) or later. Builds on Windows, WSL, Linux, or macOS.
- ```console
- zig build -Doptimize=ReleaseSafe --prefix dist
- ```
- Output mirrors x64dbg's folder structure — copy the contents of `dist/` into your x64dbg root to deploy both architectures at once:
- ```
- dist/
- ├── x32/
- │ └── plugins/
- │ └── x64dbg-MCP-Server.dp32
- └── x64/
- └── plugins/
- └── x64dbg-MCP-Server.dp64
- ```
- ## Project Structure
- ```
- ├── build.zig # build config — x32 + x64 cross-compilation
- ├── build.zig.zon # package manifest
- └── src/
- ├── main.zig # plugin entry point, menu, callbacks
- ├── core/
- │ ├── bridge.zig # x64dbg SDK bindings (runtime-resolved)
- │ ├── config.zig # Win32 config dialog and persistence
- │ └── mcp_server.zig # HTTP server and JSON-RPC dispatch
- ├── mcp/
- │ ├── json.zig # JSON writer and parser helpers
- │ └── tools.zig # MCP tool definitions and handlers
- └── resources/
- └── icons.zig # embedded PNG icon data
- ```
- ## How It Works
- 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.).
- No polling, no external processes — the plugin lives inside x64dbg's address space with direct access to the debugger API.
- ---
- ## Disclaimer
- > 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.
- >
- > 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.
- >
- > Do not expose the MCP server to untrusted networks. While Bearer token authentication is enforced, the server communicates over unencrypted HTTP.
- ---
- ### License
- MIT. See [LICENSE](./LICENSE).
- Made with 🖤 by [@duty1g](https://github.com/duty1g)
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.