A multi-backend reverse-engineering MCP server. Exposes binary analysis capabilities from IDA Pro and Ghidra over the Model Context Protocol, letting LLMs drive reverse-engineering tools directly. Supports multiple simultaneous databases through a supervisor/worker architecture.
A headless MCP server for IDA Pro and Ghidra
स्टार
176
टूल
—
अपटाइम
—
Both backends are standalone servers, not plugins. They use headless APIs (idalib for IDA, pyghidra for Ghidra) to run analysis engines without a GUI.
Both backends share a common tool interface — core analysis tools use the same names, parameters, and response shapes — so LLM workflows are portable across backends. Each backend also has tools for platform-specific features (e.g. IDA: file region mapping, executable rebuilding, IDC evaluation, IDAPython scripting; Ghidra: Function ID analysis, data type archives).
The IDA backend looks for your IDA Pro installation in the following order:
IDADIR environment variable — checked first; set this if IDA is in a non-standard location.
IDA's own config file — Paths.ida-install-dir in ~/.idapro/ida-config.json (macOS/Linux) or %APPDATA%\Hex-Rays\IDA Pro\ida-config.json (Windows). If the IDAUSR environment variable is set, it is used as the config directory instead.
Platform-specific default paths:
Platform
Default search paths
macOS
/Applications/IDA Professional *.app/Contents/MacOS
Windows
C:\Program Files\IDA Professional 9.3, C:\Program Files\IDA Pro 9.3, and Program Files (x86) equivalents
The idapro package is loaded at runtime directly from your local IDA Pro installation — no extra setup steps or environment variables are needed if IDA is installed in a standard location.
Finding Ghidra
The Ghidra backend looks for your Ghidra installation in the following order:
GHIDRA_INSTALL_DIR environment variable — checked first; set this if Ghidra is in a non-standard location.
Config file — ghidra-install-dir in ~/.ghidra/ghidra-config.json.
Platform-specific default paths:
Platform
Default search paths
macOS
/Applications/ghidra_*, ~/ghidra_*
Windows
C:\ghidra_*, ~/ghidra_*
Linux
/opt/ghidra_*, /usr/local/ghidra_*, ~/ghidra_*
Usage
Running the server
Each backend has its own CLI, or use the unified re-mcp command with --backend:
Direct stdio mode — single-session, workers die on disconnect (default)
<backend> proxy
Stdio proxy that auto-spawns a persistent HTTP daemon
<backend> serve
Start the HTTP daemon directly (for manual daemon management)
<backend> stop
Gracefully shut down a running daemon
<backend> backends
List installed backends (most useful with the unified re-mcp CLI)
The default mode runs a direct stdio server — the simplest transport, widely supported across MCP clients. Workers die when the client disconnects.
For persistent state across reconnections, use <backend> proxy. This mode auto-spawns a persistent HTTP daemon behind the scenes, handling port allocation and authentication transparently. Workers and database state survive client reconnections. The daemon shuts down automatically after 5 minutes of inactivity (configurable via <PREFIX>IDLE_TIMEOUT).
If you started the daemon manually with <backend> serve, the connection details (host, port, bearer token) are in the state file. Clients that support streamable HTTP can connect directly.
Open a binary — call open_database with the path to a binary (or existing database file), then wait_for_analysis to block until it is ready
Analyze — use the available tools (list functions, decompile, search strings, read bytes, etc.)
Close — call close_database when done (auto-saves by default)
Raw binaries must be in a writable directory since both backends create database files alongside them. When opening an existing database, the original binary does not need to be present.
Multi-database mode
Multiple databases can be open at the same time. By default, open_database keeps previously opened databases open. Pass keep_open=False to save and close databases owned by the current session before opening the new one. All tools except management tools (open_database, close_database, save_database, list_databases, wait_for_analysis, list_targets) require the database parameter (the stem ID returned by open_database or list_databases).
open_database("first.bin") # spawns worker (returns immediately)
wait_for_analysis(database="first") # blocks until ready
open_database("second.bin") # spawns second worker
wait_for_analysis(database="second") # blocks until ready
decompile_function(address="main", database="first") # targets first
close_database(database="second") # closes second
Environment variables
Each backend uses its own environment variable prefix (IDA_MCP_ or GHIDRA_MCP_). The table below uses <PREFIX> as a placeholder.
Backend installation:
Variable
Backend
Default
Description
IDADIR
IDA
(auto-detected)
Path to IDA Pro installation directory
GHIDRA_INSTALL_DIR
Ghidra
(auto-detected)
Path to Ghidra installation directory
Shared settings (replace <PREFIX> with IDA_MCP_ or GHIDRA_MCP_):
Variable
Default
Description
<PREFIX>MAX_WORKERS
(unlimited)
Maximum simultaneous databases (clamped to 1-8 when set)
Directory for per-run log files. Each component logs to <dir>/<run_id>-<label>.log, each worker to <dir>/<run_id>-worker-<db>.log, and each worker's raw stderr to <dir>/<run_id>-worker-<db>.stderr. When unset, logs go only to stderr.
<PREFIX>IDLE_TIMEOUT
300
Idle auto-shutdown timeout in seconds for auto-spawned daemons. Set to 0 to disable. <backend> serve defaults to 0 (use --idle-timeout=N to override).
<PREFIX>DISABLE_EXECUTE
(unset)
Set to 1, true, yes, or on to hide the execute meta-tool (sandboxed Python code mode)
<PREFIX>DISABLE_BATCH
(unset)
Set to 1, true, yes, or on to hide the batch meta-tool
<PREFIX>DISABLE_TOOL_SEARCH
(unset)
Set to 1, true, yes, or on to disable server-side progressive tool disclosure — all tools become directly visible and callable, and the search_tools and get_schema meta-tools are removed. Useful with clients that provide their own tool deferral (e.g. Claude Code).
IDA-only settings:
Variable
Default
Description
IDA_MCP_ALLOW_SCRIPTS
(unset)
Set to 1, true, or yes to enable the run_script tool for arbitrary IDAPython execution
Tools
To keep token usage manageable, only common analysis tools and management tools are directly visible to clients. The rest are discoverable and callable through meta-tools:
search_tools — regex search over non-pinned tool names, descriptions, and tags (pinned tools are already visible).
get_schema — parameter schemas and return shapes for tools by name.
call — lightweight proxy for calling any tool by name, including hidden tools not in the client tool list.
execute — sandboxed Python that chains multiple await invoke(name, params) calls in a single round trip. Supports asyncio.gather for parallel queries, loops, and conditional logic between calls.
batch — sequential multi-tool execution with per-item error collection and progress reporting (up to 50 operations per call).
Management tools (open_database, close_database, save_database, list_databases, wait_for_analysis, list_targets) are always visible. Most must be called directly — save_database and list_databases are the exceptions, also callable through call, execute, and batch for use in multi-step workflows.
The full tool catalog spans these areas:
Database — open/close/save/list databases, file region mapping, metadata
Utility — number conversion, expression evaluation, scripting
All tools include MCP annotations (readOnlyHint, destructiveHint, idempotentHint, openWorldHint) so clients can distinguish safe reads from mutations and prompt for confirmation on destructive operations. Mutation tools return old values alongside new values for change tracking.
Supervisor — <scheme>://databases lists all open databases with worker state
The URI scheme is ida:// for the IDA backend and ghidra:// for the Ghidra backend.
Prompts
The server provides MCP prompts — guided workflow templates that instruct the LLM to use tools in a structured sequence. Prompts are currently available for the IDA backend only.
survey_binary — binary triage producing an executive summary
analyze_function — full single-function analysis with decompilation, data flow, and behavior summary
diff_before_after — preview the effect of renaming/retyping on decompiler output
classify_functions — categorize functions by behavioral pattern
find_crypto_constants — scan for known cryptographic constants
auto_rename_strings — suggest function renames based on string references
apply_abi — apply known ABI type information to identified functions
export_idc_script — generate a script that reproduces user annotations
Architecture
The project is a monorepo with three packages:
re-mcp-core — shared supervisor infrastructure, transport, and common utilities
# With uv (recommended)
uv sync # Install dependencies
uv run ruff check packages/ # Lint
uv run ruff format packages/ # Format
uv run ruff check --fix packages/ # Lint with auto-fix
# With pip
pip install -e packages/re-mcp-core -e packages/re-mcp-ida -e packages/re-mcp-ghidra
pip install pre-commit pytest pytest-asyncio ruff jsonschema
ruff check packages/
ruff format packages/
ruff check --fix packages/
Pre-commit hooks run REUSE compliance checks, ruff lint (with --fix --exit-non-zero-on-fix), ruff format, idalib threading lint, and pytest on every commit.
IDA Pro and Hex-Rays are trademarks of Hex-Rays SA. Ghidra is developed by the NSA. RE-MCP is an independent project and is not affiliated with or endorsed by Hex-Rays or the NSA.
अभी टूल सूची नहीं है। रिमोट सर्वर को पहले हेल्थ चेक के बाद सूची मिलती है।
FAQ
सवाल
Re कैसे इंस्टॉल करें?
इस पेज पर Cursor, Claude Desktop, Claude Code या VS Code के लिए stdio कॉन्फ़िग कॉपी करें। यह पब्लिशर का इंस्टॉल इस्तेमाल करता है, PlugMCP प्रॉक्सी नहीं।
क्या Re के लिए API key चाहिए?
इस रिकॉर्ड में कोई ज़रूरी एनवायरनमेंट वेरिएबल दर्ज नहीं है।
Re कौन सा ट्रांसपोर्ट इस्तेमाल करता है?
Re stdio पर लोकल चलता है।
Re की पिछली जाँच कब हुई थी?
पिछली जाँच 2026-11-05 को हुई। A headless MCP server for IDA Pro and Ghidra