REA
Reverse engineer anything from your terminal or agent with one CLI and MCP server.
MOmorluto/rea486k近 7 天新增 8,943 个 star
MCP server plugin for x64dbg debugger - enables AI agents and external tools to control debugging via JSON-RPC 2.0 over HTTP/SSE
English | 中文
A Model Context Protocol (MCP) server implementation for x64dbg and x32dbg, enabling remote debugging through a JSON-RPC 2.0 interface. This plugin allows external applications and AI agents to interact with the debugger programmatically.
Now supports both x64 and x86 architectures!
Full MCP Specification Compliance: Implements all three core MCP building blocks
JSON-RPC 2.0 Protocol: Standard, language-agnostic interface
Streamable HTTP transport (MCP 2025-03-26) on /mcp, plus legacy HTTP+SSE on /sse for older clients
Tools - AI-Controlled Debugging (79 functions):
Resources - Context Providers (7 direct + 8 templates):
Prompts - Workflow Templates (10 prompts):
Security: Permission-based access control
Extensible: Plugin architecture for custom methods, resources, and prompts
The easiest way to build is using the provided build script:
# Clone the repository
git clone https://github.com/SetsunaYukiOvO/x64dbg-mcp.git
cd x64dbg-mcp
# Build both x64 and x86 architectures (recommended)
.\build.bat
# Build only x64 architecture
.\build.bat --x64-only
# Build only x86 architecture
.\build.bat --x86-only
# Clean rebuild
.\build.bat --clean
# The script will:
# 1. Automatically detect vcpkg installation
# 2. Download dependencies (nlohmann_json)
# 3. Configure CMake for both architectures
# 4. Build using Visual Studio with parallel compilation
# 5. Copy output files to dist/ directory
Build script options:
.\build.bat # Build both x64 and x86 (Release)
.\build.bat --clean # Clean rebuild both architectures
.\build.bat --x64-only # Build x64 only
.\build.bat --x86-only # Build x86 only
.\build.bat --debug # Debug build (future support)
Output files (in dist/ directory):
dist\x64dbg_mcp.dp64 (~837 KB)dist\x32dbg_mcp.dp32 (~800 KB)If you prefer manual control:
git clone https://github.com/Microsoft/vcpkg.git C:\vcpkg
C:\vcpkg\bootstrap-vcpkg.bat
setx VCPKG_ROOT "C:\vcpkg"
git clone https://github.com/SetsunaYukiOvO/x64dbg-mcp.git
cd x64dbg-mcp
# For x64 build
cmake -B build_x64 -G "Visual Studio 17 2022" -A x64 ^
-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake ^
-DVCPKG_TARGET_TRIPLET=x64-windows ^
-DXDBG_ARCH=x64
# For x86 build
cmake -B build_x86 -G "Visual Studio 17 2022" -A Win32 ^
-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake ^
-DVCPKG_TARGET_TRIPLET=x86-windows ^
-DXDBG_ARCH=x86
cmake --build build_x64 --config Release
cmake --build build_x86 --config Release
build_x64\bin\Release\x64dbg_mcp.dp64build_x86\bin\Release\x32dbg_mcp.dp32# For x64dbg (64-bit)
# Replace <x64dbg-path> with your actual x64dbg installation directory
copy dist\x64dbg_mcp.dp64 <x64dbg-path>\x64\plugins\
# For x32dbg (32-bit)
copy dist\x32dbg_mcp.dp32 <x64dbg-path>\x32\plugins\
# Example (if installed at C:\x64dbg):
# copy dist\x64dbg_mcp.dp64 C:\x64dbg\x64\plugins\
# copy dist\x32dbg_mcp.dp32 C:\x64dbg\x32\plugins\
# For x64dbg
mkdir <x64dbg-path>\x64\plugins\x64dbg-mcp
copy config.json <x64dbg-path>\x64\plugins\x64dbg-mcp\
# For x32dbg
mkdir <x64dbg-path>\x32\plugins\x32dbg-mcp
copy config.json <x64dbg-path>\x32\plugins\x32dbg-mcp\
http://127.0.0.1:3000Edit config.json to customize settings:
{
"version": "1.0.12",
"server": {
"address": "127.0.0.1",
"port": 3000
},
"permissions": {
"allow_memory_write": false,
"allow_register_write": false,
"allow_script_execution": false,
"allow_breakpoint_modification": true,
"allowed_methods": ["debug.*", "memory.*"]
},
"security": {
"origin_allowlist": [],
"host_allowlist": [],
"auth_enabled": false,
"auth_token": ""
},
"logging": {
"enabled": true,
"level": "info",
"file": "x64dbg_mcp.log",
"max_file_size_mb": 10,
"console_output": true
},
"timeout": {
"request_timeout_ms": 30000,
"step_timeout_ms": 10000,
"memory_read_timeout_ms": 5000
},
"features": {
"enable_notifications": true,
"enable_heartbeat": true,
"heartbeat_interval_seconds": 30,
"enable_batch_requests": true,
"auto_start_mcp_on_plugin_load": false
}
}
Choose Plugins > MCP Server > Edit Config to edit the active configuration without manually changing JSON. The editor has pages for Server, Security, Permissions, Runtime, and Logging. It covers every runtime setting in the example above; the version field and any unknown future fields are preserved when saving.
For security allowlists, enter one Origin or Host per line. The Token field is masked and is required when Require Bearer token authentication is enabled. Saving a non-loopback listener without authentication requires confirmation. Restart the MCP HTTP server after saving for server settings to take effect.
The server listens on 127.0.0.1 by default. This is intentional: the debugger exposes powerful operations. security.origin_allowlist and security.host_allowlist validate browser origins and Host headers; they are not passwords or API keys. Use security.auth_enabled and security.auth_token to enable HTTP Bearer authentication.
Use 127.0.0.1:3000 and connect from the same Windows host. No firewall rule or port forwarding is required.
Only do this on a trusted network. Change the bind address and explicitly allow the address used by the client:
{
"server": { "address": "0.0.0.0", "port": 3000 },
"security": {
"origin_allowlist": ["http://192.168.1.50:3000"],
"host_allowlist": ["192.168.1.20", "debugger.example.test"]
}
}
Use the actual client Origin, server hostname, or server IP. Do not add * as an Origin. Open TCP port 3000 only on the required Windows network profile, and configure the VM NAT/bridged adapter or router port forwarding separately. Restart the plugin after changing the file.
Endpoints:
http://HOST:3000/mcphttp://HOST:3000/ssehttp://HOST:3000/rpcGET http://HOST:3000/Do not publish the plugin directly to the Internet. Put it behind a VPN, SSH tunnel, or a reverse proxy that provides TLS, authentication, rate limiting, and IP allowlisting. Keep the plugin bound to 127.0.0.1 when the proxy runs on the same machine. A reverse proxy must preserve the MCP streaming response and forward Content-Type, Accept, Mcp-Protocol-Version, Mcp-Session-Id, and Last-Event-ID headers.
The plugin supports optional Authorization: Bearer validation but does not provide an OAuth authorization server. Never enable memory writes, register writes, or script execution on an unauthenticated public endpoint; these permissions are disabled by default and should remain disabled unless explicitly required.
To enable built-in Bearer authentication, store a high-entropy secret in the plugin configuration and restart the plugin:
{
"security": {
"auth_enabled": true,
"auth_token": "replace-with-a-long-random-secret"
}
}
All HTTP endpoints except CORS OPTIONS preflight then require Authorization: Bearer <auth_token>. The server refuses to start if authentication is enabled with an empty token, and logs a security warning when a non-loopback listener starts without authentication. Store the configuration with restrictive filesystem permissions and do not commit the token.
Connection refused: verify the plugin server is started, the bind address/port, and VM NAT or firewall rules.403 or rejected request: add the exact browser Origin to security.origin_allowlist and the proxy/client Hostname to security.host_allowlist.initialize; clients discover capabilities from the response./sse for legacy SSE clients and /mcp for Streamable HTTP clients.For a first diagnostic, run curl http://127.0.0.1:3000/ on the debugger host, then test the same URL through each forwarding layer. Do not include debugger memory or credentials in issue logs.
Python client example using HTTP:
import requests
import json
class MCPClient:
def __init__(self, host='127.0.0.1', port=3000):
self.base_url = f"http://{host}:{port}"
self.request_id = 1
def call(self, method, params=None):
request = {
"jsonrpc": "2.0",
"id": self.request_id,
"method": method,
"params": params or {}
}
self.request_id += 1
response = requests.post(
f"{self.base_url}/rpc",
json=request,
headers={"Content-Type": "application/json"}
)
return response.json()
def subscribe_events(self):
"""Subscribe to SSE events"""
response = requests.get(
f"{self.base_url}/sse",
stream=True,
headers={"Accept": "text/event-stream"}
)
for line in response.iter_lines():
if line:
yield line.decode('utf-8')
# Usage
client = MCPClient()
print(client.call("initialize"))
print(client.call("tools/list"))
print(client.call("resources/list"))
print(client.call("prompts/list"))
# Subscribe to debug events
for event in client.subscribe_events():
print(f"Event: {event}")
Cursor and other MCP clients usually decide which sections to show from the initialize response capabilities. This server advertises tools, resources, and prompts, so after reconnecting you should see all three categories in the client UI.
Configure in VS Code settings or MCP client config. Recommended (Streamable HTTP, MCP 2025-03-26):
{
"mcpServers": {
"x64dbg": {
"type": "http",
"url": "http://127.0.0.1:3000/mcp"
}
}
}
Legacy HTTP+SSE clients (use the /sse path, not the root):
{
"mcpServers": {
"x64dbg": {
"type": "sse",
"url": "http://127.0.0.1:3000/sse"
}
}
}
system.info - Get server informationsystem.ping - Test connectionsystem.methods - List all available methodsdebug.run - Continue executiondebug.pause - Pause executiondebug.step_into - Step into instructiondebug.step_over - Step over instructiondebug.step_out - Step out of functiondebug.get_state - Get current debug statedebug.run_to - Run to specific addressdebug.restart - Restart debugging sessiondebug.stop - Stop debuggingregister.get - Read single registerregister.set - Write register valueregister.list - List all registersregister.get_batch - Read multiple registersmemory.read - Read memory regionmemory.write - Write memory regionmemory.search - Search memory patternmemory.get_info - Get memory region infomemory.enumerate - List all memory regionsmemory.allocate - Allocate memorymemory.free - Free allocated memorybreakpoint.set - Set breakpointbreakpoint.delete - Remove breakpointbreakpoint.enable - Enable breakpointbreakpoint.disable - Disable breakpointbreakpoint.toggle - Toggle breakpoint statebreakpoint.list - List all breakpointsbreakpoint.get - Get breakpoint detailsbreakpoint.delete_all - Remove all breakpointsbreakpoint.set_condition - Set breakpoint conditionbreakpoint.set_log - Set breakpoint log messagebreakpoint.reset_hitcount - Reset breakpoint hit countdisassembly.at - Disassemble at addressdisassembly.range - Disassemble address rangedisassembly.function - Disassemble entire functionsymbol.resolve - Resolve symbol to addresssymbol.from_address - Get symbol from addresssymbol.search - Search symbols by patternsymbol.list - List all symbolssymbol.modules - List loaded modulessymbol.set_label - Set symbol labelsymbol.set_comment - Set symbol commentsymbol.get_comment - Get symbol commentmodule.list - List all loaded modulesmodule.get - Get module informationmodule.get_main - Get main modulethread.list - List all threadsthread.get_current - Get current threadthread.get - Get thread informationthread.switch - Switch to threadthread.suspend - Suspend threadthread.resume - Resume threadthread.get_count - Get thread countstack.get_trace - Get stack tracestack.read_frame - Read stack framestack.get_pointers - Get stack pointers (RSP/RBP on x64, ESP/EBP on x86)stack.is_on_stack - Check if address is on stackFor complete method signatures and examples, see the inline documentation in the source code or use the system.methods API call.
The plugin is organized into four layers:
config.json only if neededx64dbg_mcp.dp64 in x64\plugins\ for x64dbg, or x32dbg_mcp.dp32 in x32\plugins\ for x32dbg.dp64 plugin in x32dbg or a .dp32 plugin in x64dbgContributions are welcome! Please:
This project is licensed under the MIT License - see the LICENSE file for details.
Note: This is experimental software. Use at your own risk. Always test in a safe environment before using with critical applications.
Reverse engineer anything from your terminal or agent with one CLI and MCP server.
MOmorluto/rea486k近 7 天新增 8,943 个 star
HexStrike AI MCP Agents is an advanced MCP server that lets AI agents (Claude, GPT, Copilot, etc.) autonomously run 150+ cybersecurity tools for automated pentesting, vulnerability discovery, bug bounty automation, and security research. Seamlessly bridge LLMs with real-world offensive security capabilities.
0X0x4m4/hexstrike-ai14k近 7 天新增 192 个 star
AI-powered reverse engineering assistant that bridges IDA Pro with language models through MCP.
MRmrexodia/ida-pro-mcp14k近 7 天新增 97 个 star
Open-source AI Security Operations Center: alert fusion, LLM-agent triage, MITRE ATT&CK investigation, and a replayable decision ledger for every agent step. Self-hostable, runs with no API keys, MIT licensed. Ships an MCP server for Claude, Cursor and Continue.
BEbeenuar/AiSOC8.8k近 7 天新增 941 个 star