IDA Pro MCP Server with Domain-Driven Design (DDD) architecture for LLM-assisted reverse engineering.
Based on mrexodia/ida-pro-mcp, restructured with DDD architecture for better maintainability, testability, and extensibility.
This project follows Domain-Driven Design principles with a layered architecture:
src/ida_pro_mcp/ida_mcp/
domain/ # Business logic: entities, repositories, services, value objects
application/ # Use cases, DTOs, command/query handlers
infrastructure/ # IDA SDK adapters, caching, thread synchronization
interface/ # MCP tools (13 modules) and resources (3 modules)
129 MCP tools across 13 interface modules:
- Analysis, Core, Memory, Types, Modify, Stack, Debug, Python, Search, Export, Conversion, Control Flow, Graph
14 MCP resources for browsable state access via ida:// URIs.
- Python (3.11 or higher)
- Use
idapyswitchto switch to the newest Python version
- Use
- IDA Pro (8.3 or higher, 9 recommended), IDA Free is not supported
- Supported MCP Client (pick one you like)
Install the package:
pip install https://github.com/JordanRO2/MCP-IDA-PRO/archive/refs/heads/main.zipConfigure MCP servers and install the IDA Plugin:
ida-pro-mcp --installImportant: Restart IDA and your MCP client completely after installation.
Note: Load a binary in IDA before the plugin menu appears.
Database State:
ida://database/info- IDB file info (path, arch, base, size, hashes)ida://database/segments- Memory segments with permissionsida://database/entrypoints- Entry points
UI State:
ida://cursor- Current cursor position and functionida://selection- Current selection range
Type Information:
ida://types- All local typesida://structs- All structures/unionsida://struct/{name}- Structure definition with fields
Lookups:
ida://import/{name}- Import details by nameida://export/{name}- Export details by nameida://xrefs/from/{addr}- Cross-references from address
lookup_funcs(queries): Get function(s) by address or namelist_funcs(queries): List functions (paginated, filtered)list_globals(queries): List global variables (paginated, filtered)imports(offset, count): List imported symbols with module namesdecompile(addr): Decompile function at addressdisasm(addr): Disassemble function with full detailsxrefs_to(addrs): Get cross-references to address(es)callees(addrs): Get functions called by function(s)
set_comments(items): Set comments at address(es)patch_asm(items): Patch assembly instructionsdeclare_type(decls): Declare C type(s) in local type libraryrename(batch): Batch rename functions, globals, locals, stack variables
get_bytes(addrs): Read raw bytesget_int(queries): Read integer values (i8/u64/i16le/i16be/etc)get_string(addrs): Read null-terminated stringspatch(patches): Patch byte sequencesput_int(items): Write integer values
analyze_funcs(addrs): Comprehensive function analysisbasic_blocks(addrs): Get basic blocks with successors/predecessorscallgraph(roots, max_depth): Build call graph
find_regex(queries): Search strings with regexfind_bytes(patterns): Find byte patterns (e.g., "48 8B ?? ??")find_insns(sequences): Find instruction sequencesfind(type, targets): Advanced search (immediates, strings, references)
set_type(edits): Apply types to functions, globals, localsinfer_types(addrs): Infer types using Hex-Raysread_struct(queries): Read structure field valuessearch_structs(filter): Search structures by name
stack_frame(addrs): Get stack frame variablesdeclare_stack(items): Create stack variablesdelete_stack(items): Delete stack variables
Enable with ?ext=dbg query parameter:
http://127.0.0.1:13337/mcp?ext=dbg
- Control:
dbg_start,dbg_exit,dbg_continue,dbg_step_into,dbg_step_over - Breakpoints:
dbg_bps,dbg_add_bp,dbg_delete_bp,dbg_toggle_bp - Registers:
dbg_regs,dbg_gpregs,dbg_regs_named - Memory:
dbg_read,dbg_write,dbg_stacktrace
py_eval(code): Execute Python code in IDA context (Jupyter-style evaluation)
Run SSE server:
ida-pro-mcp --transport http://127.0.0.1:8744/sseHeadless mode with idalib:
idalib-mcp --host 127.0.0.1 --port 8745 path/to/executableLLMs can hallucinate on number conversions. Use the conversion tools provided. Before LLM analysis, consider removing:
- String encryption
- Import hashing
- Control flow flattening
- Anti-decompilation tricks
Use Lumina or FLIRT to resolve library functions for better accuracy.
The DDD architecture makes adding new features straightforward:
- Add domain entities/services in
domain/ - Create use cases in
application/ - Implement IDA adapters in
infrastructure/ - Expose tools in
interface/tools/
Test with MCP inspector:
npx -y @modelcontextprotocol/inspectorMIT License - see LICENSE for details.
Original project by Duncan Ogilvie (mrexodia). DDD architecture restructuring by JordanRO2.