MCP server for IDA Pro, allowing you to perform binary analysis with AI assistants. This plugin implement decompilation, disassembly and allows you to generate malware analysis reports automatically.
Claude Desktop config.json'a ekle
{
"mcpServers": {
"mrexodia-ida-pro-mcp": {
"command": "python",
"args": [
"-m",
"ida_pro_mcp"
]
}
}
} Kaynak kodu al ve yerel olarak çalıştır
git clone https://github.com/mrexodia/ida-pro-mcp.git ~/.mcp/ida-pro-mcp
cd ~/.mcp/ida-pro-mcp Simple MCP Server to allow vibe reversing in IDA Pro.
https://github.com/user-attachments/assets/6ebeaa92-a9db-43fa-b756-eececce2aca0
The binaries and prompt for the video are available in the mcp-reversing-dataset repository.
idapyswitch to switch to the newest Python versionida-pro-mcp --config to get the JSON config for your client.To install the headless IDA Pro MCP in Claude Code:
claude plugin marketplace add mrexodia/claude-marketplace
claude plugin install ida-pro-mcp@mrexodia
To update to the latest version:
claude plugin update ida-pro-mcp@mrexodia
Note: This requires having idalib activated globally and uv installed:
# windows
uv run "C:\Program Files\IDA Professional 9.3\idalib\python\py-activate-idalib.py"
# macos
uv run "/Applications/IDA Professional 9.3.app/Contents/MacOS/idalib/python/py-activate-idalib.py"
Note: the MCP plugin is no longer recommended and will eventually be deprecated. Use idalib-mcp instead.
If you want to configure the MCP server manually from the IDA GUI:
pip uninstall ida-pro-mcp
pip install https://github.com/mrexodia/ida-pro-mcp/archive/refs/heads/main.zip
Configure the MCP servers and install the IDA Plugin:
ida-pro-mcp --install
Important: Make sure you completely restart IDA and your MCP client for the installation to take effect. Some clients (like Claude) run in the background and need to be quit from the tray icon.
LLMs are prone to hallucinations and you need to be specific with your prompting. For reverse engineering the conversion between integers and bytes are especially problematic. Below is a minimal example prompt, feel free to start a discussion or open an issue if you have good results with a different prompt:
Your task is to analyze a crackme in IDA Pro. You can use the MCP tools to retrieve information. In general use the following strategy:
- Inspect the decompilation and add comments with your findings
- Rename variables to more sensible names
- Change the variable and argument types if necessary (especially pointer and array types)
- Change function names to be more descriptive
- If more details are necessary, disassemble the function and add comments with your findings
- NEVER convert number bases yourself. Use the `int_convert` MCP tool if needed!
- Do not attempt brute forcing, derive any solutions purely from the disassembly and simple python scripts
- Create a report.md with your findings and steps taken at the end
- When you find a solution, prompt to user for feedback with the password you found
This prompt was just the first experiment, please share if you found ways to improve the output!
Another prompt by @can1357:
Your task is to create a complete and comprehensive reverse engineering analysis. Reference AGENTS.md to understand the project goals and ensure the analysis serves our purposes.
Use the following systematic methodology:
1. **Decompilation Analysis**
- Thoroughly inspect the decompiler output
- Add detailed comments documenting your findings
- Focus on understanding the actual functionality and purpose of each component (do not rely on old, incorrect comments)
2. **Improve Readability in the Database**
- Rename variables to sensible, descriptive names
- Correct variable and argument types where necessary (especially pointers and array types)
- Update function names to be descriptive of their actual purpose
3. **Deep Dive When Needed**
- If more details are necessary, examine the disassembly and add comments with findings
- Document any low-level behaviors that aren't clear from the decompilation alone
- Use sub-agents to perform detailed analysis
4. **Important Constraints**
- NEVER convert number bases yourself - use the int_convert MCP tool if needed
- Use MCP tools to retrieve information as necessary
- Derive all conclusions from actual analysis, not assumptions
5. **Documentation**
- Produce comprehensive RE/*.md files with your findings
- Document the steps taken and methodology used
- When asked by the user, ensure accuracy over previous analysis file
- Organize findings in a way that serves the project goals outlined in AGENTS.md or CLAUDE.md
Live stream discussing prompting and showing some real-world malware analysis:
Large Language Models (LLMs) are powerful tools, but they can sometimes struggle with complex mathematical calculations or exhibit “hallucinations” (making up facts). Make sure to tell the LLM to use the int_convert MCP tool and you might also need math-mcp for certain operations.
Another thing to keep in mind is that LLMs will not perform well on obfuscated code. Before trying to use an LLM to solve the problem, take a look around the binary and spend some time (automatically) removing the following things:
You should also use a tool like Lumina or FLIRT to try and resolve all the open source library code and the C++ STL, this will further improve the accuracy.
You can run an SSE server to connect to the user interface like this:
uv run ida-pro-mcp --transport http://127.0.0.1:8744/sse
After installing idalib you can also run a headless MCP server. You can start with an initial binary:
uv run idalib-mcp --host 127.0.0.1 --port 8745 path/to/executable
Or start without a binary and open/close arbitrary files later with idalib_open(...) / idalib_close(...):
uv run idalib-mcp --host 127.0.0.1 --port 8745
For stdio-based clients, use:
uv run idalib-mcp --stdio
--stdio keeps database state inside that MCP server process. For stdio clients
that spawn separate MCP server processes, such as Codex sub-agents, use
--stdio-shared instead:
uv run idalib-mcp --stdio-shared
--stdio-shared starts or reuses a shared local HTTP supervisor on the
configured host/port and proxies stdio JSON-RPC to it, so separate stdio MCP
processes can share the same opened database workers.
Note: The idalib feature was contributed by Willi Ballenthin.
idalib-mcp is a supervisor that keeps each open database in its own idalib worker process. Starting without an input_path is supported; use idalib_open(input_path, ...) to open databases dynamically and idalib_close(session_id) to close them. This allows one headless MCP server to work with arbitrary files over its lifetime.
If the requested IDB is already open in a GUI IDA instance running the plugin, idalib-mcp will use that GUI instance instead of spawning a duplicate headless worker. If the GUI instance later disappears, the next routed request reopens the database in a headless worker when possible. Unsaved GUI-only changes must be saved first if they should be visible after fallback.
Tools target either the database bound to the current MCP context or an explicit database argument.
uv run idalib-mcp --stdio --max-workers 4
Typical flow:
idalib_open("/path/to/binary_a.exe", session_id="binary_a")
idalib_open("/path/to/library.dll", session_id="library")
decompile("main", database="binary_a")
xrefs_to("ImportantExport", database="library")
database accepts a session ID, filename, or input path. If omitted, tools use the database bound to the active context.
Use --isolated-contexts to enable strict per-transport isolation:
uv run idalib-mcp --isolated-contexts --host 127.0.0.1 --port 8745 path/to/executable
--isolated-contexts?Use it when multiple agents connect to the same idalib-mcp server and you want deterministic context isolation:
database=... or binding multiple agents to the same session ID.When --isolated-contexts is enabled:
Mcp-Session-Id for /mcp, session for /sse, stdio:default for stdio).database is provided.idalib_switch(session_id) and idalib_open(...) bind the caller context only.With --isolated-contexts, strict Streamable HTTP session semantics are enabled, including Mcp-Session-Id validation.
idalib_open(input_path, ...): Open binary in a worker and bind it to the active context policy.idalib_switch(session_id): Rebind the active context policy to an existing session.idalib_current(): Return the session bound to the active context policy.idalib_unbind(): Remove the active context binding.idalib_list(): Includes is_active, is_current_context, bound_contexts, backend (worker or gui), and process IDs.Worker controls:
--max-workers N: maximum simultaneous database workers (0 = unlimited, default 4).IDA_MCP_MAX_WORKERS: environment default for --max-workers.Resources represent browsable state (read-only data) following MCP’s philosophy.
Core IDB State:
ida://idb/metadata - IDB file info (path, arch, base, size, hashes)ida://idb/segments - Memory segments with permissionsida://idb/entrypoints - Entry points (main, TLS callbacks, etc.)UI State:
ida://cursor - Current cursor position and functionida://selection - Current selection rangeType Information:
ida://types - All local typesida://structs - All structures/unionsida://struct/{name} - Structure definition with fieldsLookups:
ida://import/{name} - Import details by nameida://export/{name} - Export details by nameida://xrefs/from/{addr} - Cross-references from addresslookup_funcs(queries): Get function(s) by address or name (auto-detects, accepts list or comma-separated string).int_convert(inputs): Convert numbers to different formats (decimal, hex, bytes, ASCII, binary).list_funcs(queries): List functions (paginated, filtered).list_globals(queries): List global variables (paginated, filtered).imports(offset, count): List all imported symbols with module names (paginated).decompile(addr): Decompile function at the given address.disasm(addr): Disassemble function with full details (arguments, stack frame, etc).xrefs_to(addrs): Get all cross-references to address(es).xrefs_to_field(queries): Get cross-references to specific struct field(s).callees(addrs): Get functions called by function(s) at address(es).set_comments(items): Set comments at address(es) in both disassembly and decompiler views.patch_asm(items): Patch assembly instructions at address(es).declare_type(decls): Declare C type(s) in the local type library.define_func(items): Define function(s) at address(es). Optionally specify end for explicit bounds.define_code(items): Convert bytes to code instruction(s) at address(es).undefine(items): Undefine item(s) at address(es), converting back to raw bytes. Optionally specify end or size.get_bytes(addrs): Read raw bytes at address(es).get_int(queries): Read integer values using ty (i8/u64/i16le/i16be/etc).get_string(addrs): Read null-terminated string(s).get_global_value(queries): Read global variable value(s) by address or name (auto-detects, compile-time values).stack_frame(addrs): Get stack frame variables for function(s).declare_stack(items): Create stack variable(s) at specified offset(s).delete_stack(items): Delete stack variable(s) by name.read_struct(queries): Read structure field values at specific address(es).search_structs(filter): Search structures by name pattern.Debugger tools are hidden by default. Enable with ?ext=dbg query parameter:
http://127.0.0.1:13337/mcp?ext=dbg
Control:
dbg_start(): Start debugger process.dbg_exit(): Exit debugger process.dbg_continue(): Continue execution.dbg_run_to(addr): Run to address.dbg_step_into(): Step into instruction.dbg_step_over(): Step over instruction.Breakpoints:
dbg_bps(): List all breakpoints.dbg_add_bp(addrs): Add breakpoint(s).dbg_delete_bp(addrs): Delete breakpoint(s).dbg_toggle_bp(items): Enable/disable breakpoint(s).Registers:
dbg_regs(): All registers, current thread.dbg_regs_all(): All registers, all threads.dbg_regs_remote(tids): All registers, specific thread(s).dbg_gpregs(): GP registers, current thread.dbg_gpregs_remote(tids): GP registers, specific thread(s).dbg_regs_named(names): Named registers, current thread.dbg_regs_named_remote(tid, names): Named registers, specific thread.Stack & Memory:
dbg_stacktrace(): Call stack with module/symbol info.dbg_read(regions): Read memory from debugged process.dbg_write(regions): Write memory to debugged process.py_eval(code): Execute arbitrary Python code in IDA context (returns dict with result/stdout/stderr, supports Jupyter-style evaluation).analyze_funcs(addrs): Comprehensive function analysis (decompilation, assembly, xrefs, callees, callers, strings, constants, basic blocks).find_regex(queries): Search strings with case-insensitive regex (paginated).find_bytes(patterns, limit=1000, offset=0): Find byte pattern(s) in binary (e.g., “48 8B ?? ??”). Max limit: 10000.find_insns(sequences, limit=1000, offset=0): Find instruction sequence(s) in code. Max limit: 10000.find(type, targets, limit=1000, offset=0): Advanced search (immediate values, strings, data/code references). Max limit: 10000.basic_blocks(addrs): Get basic blocks with successors and predecessors.set_type(edits): Apply type(s) to functions, globals, locals, or stack variables.infer_types(addrs): Infer types at address(es) using Hex-Rays or heuristics.export_funcs(addrs, format): Export function(s) in specified format (json, c_header, or prototypes).callgraph(roots, max_depth): Build call graph from root function(s) with configurable depth.rename(batch): Unified batch rename operation for functions, globals, locals, and stack variables (accepts dict with optional func, data, local, stack keys).patch(patches): Patch multiple byte sequences at once.put_int(items): Write integer values using ty (i8/u64/i16le/i16be/etc).Key Features:
[{..., error: null|string}, ...]cursor: {next: offset} or {done: true} (default limit: 1000, enforced max: 10000 to prevent token overflow)build_strlist calls in large projectsAdding new features is a super easy and streamlined process. All you have to do is add a new @tool function to the modular API files in src/ida_pro_mcp/ida_mcp/api_*.py and your function will be available in the MCP server without any additional boilerplate! Below is a video where I add the get_metadata function in less than 2 minutes (including testing):
https://github.com/user-attachments/assets/951de823-88ea-4235-adcb-9257e316ae64
To test the MCP server itself:
npx -y @modelcontextprotocol/inspector
This will open a web interface at http://localhost:5173 and allow you to interact with the MCP tools for testing.
For testing I create a symbolic link to the IDA plugin and then POST a JSON-RPC request directly to http://localhost:13337/mcp. After enabling symbolic links you can run the following command:
uv run ida-pro-mcp --install
Generate the changelog of direct commits to main:
git log --first-parent --no-merges 1.2.0..main "--pretty=- %s" A Model Context Protocol server for Ghidra that enables LLMs to autonomously reverse engineer applications. Provides tools for decompiling binaries, renaming methods and data, and listing methods, classes, imports, and exports.
JADX-AI-MCP is a plugin and MCP Server for the JADX decompiler that integrates directly with Model Context Protocol (MCP) to provide live reverse engineering support with LLMs like Claude.
Beelzebub is a honeypot framework that lets you build honeypot tools using MCP. Its purpose is to detect prompt injection or malicious agent behavior. The underlying idea is to provide the agent with tools it would never use in its normal work.
vet-mcp checks open source packages—like those suggested by AI coding tools—for vulnerabilities and malicious code. It supports npm and PyPI, and runs locally via Docker or as a standalone binary for fast, automated vetting.
Allow AI agents to scan code for security vulnerabilites using Semgrep.
A native Model Context Protocol server for Ghidra. Includes GUI configuration and logging, 31 powerful tools and no external dependencies.