MCP Server
IDA-MCP
Each IDA instance starts its own FastMCP Streamable HTTP endpoint at /mcp
Install
claude mcp add ida-mcp -- npx -y ida-mcpIDA-MCP
<p align="center"> <img src="Sarma.png" width="75%"> </p>IDA-MCP (FastMCP + Multi-instance Gateway)
- Each IDA instance starts its own FastMCP Streamable HTTP endpoint at
/mcp - A standalone gateway daemon maintains the in-memory instance registry and forwards tool calls
- The gateway serves both the internal API at
/internaland the client-facing MCP proxy at/mcpon127.0.0.1:11338by default - The stdio proxy is a separate subprocess entrypoint that reuses the same proxy tool set
- MCP Resources are exposed by each IDA instance directly, not by the gateway/proxy
- A PySide6 desktop IDE provides installation, configuration, gateway management, and status monitoring
Architecture
Repository Structure
IDA-MCP/
├── ide/ # PySide6 desktop IDE (main project)
│ ├── app/ # UI layer
│ ├── supervisor/ # Gateway lifecycle & installation
│ ├── resources/ida_mcp/ # Bundled IDA plugin, API reference, and live-IDA tests
│ └── tests/
├── skills/ # MCP skill documentation
├── codemap.md # Repository map and ownership boundaries
├── README.md / README_CN.md
└── project.md / roadmap.md
The full tool and response contract reference lives with the bundled plugin at
ide/resources/ida_mcp/API.md. The IDE treats ide/resources/ida_mcp/ as
installable plugin resources and does not import the ida_mcp package directly.
Core Infrastructure (inside ide/resources/ida_mcp/ida_mcp/)
rpc.py-@tool/@resource/@unsafedecorators and registrationsync.py-@idaread/@idawriteIDA thread synchronization decoratorsutils.py- Address parsing, pagination, pattern filtering utilities
API Modules
api_core.py- IDB metadata, function/string/global listsapi_analysis.py- Decompilation, disassembly, cross-referencesapi_memory.py- Memory reading operationsapi_modeling.py- Database shaping (functions, code/data/string creation)api_types.py- Type operations (prototypes, local types)api_modify.py- Comments, renamingapi_stack.py- Stack frame operationsapi_debug.py- Debugger control (marked unsafe)api_python.py- Python execution in IDA context (marked unsafe)api_resources.py- MCP Resources (ida://URI patterns)
Key Features
- Decorator Chain Pattern:
@tool+@idaread/@idawritefor clean API definitions - Batch Operations: Most tools accept lists for batch processing
- MCP Resources: REST-like
ida://URI patterns for read-only data access on direct instance connections - Multi-instance Support: A standalone gateway on port 11338 manages multiple IDA instances
- HTTP-first Defaults: The bundled config defaults to
enable_http=true,enable_stdio=false, andenable_unsafe=true - IDA 9.x Only: Development and tests target IDA 9.x APIs only; IDA 7/8 compatibility paths are not maintained
- Desktop IDE: PySide6 GUI for one-click install, config, gateway control, and status monitoring
Installation
Via Desktop IDE (Recommended)
- Launch the IDE:
python ide/launcher.py - In Settings → Config, set IDA Python path (e.g.
D:\IDA\ida-python\python.exe) - Plugin directory defaults to
%APPDATA%\Hex-Rays\IDA Pro\plugins - Click Install — the IDE copies plugin files and installs Python dependencies
- Click Start Gateway from the status page or toolbar
Via Command Line
python ide/resources/ida_mcp/ida_mcp/command.py gateway start --json
Manual Installation
- Copy
ida_mcp.pyandida_mcp/fromide/resources/ida_mcp/to IDA'splugins/directory - Install dependencies using IDA's Python:
<ida_python> -m pip install -r ide/resources/ida_mcp/requirements.txt - Open a target binary in IDA and wait for initial analysis
Startup Steps
- Install the plugin (via IDE or manually).
- Open a target binary and wait for initial analysis.
- Start the gateway (via IDE or
command.py gateway start). - In IDA, trigger the plugin manually or via
open_in_idafrom the proxy. - On startup, the instance:
- selects a free instance port starting from
10000 - serves MCP over
http://127.0.0.1:<instance_port>/mcp/ - registers itself with the gateway at
http://127.0.0.1:11338/internal
- selects a free instance port starting from
Closing an IDA instance only deregisters that instance. The standalone gateway keeps running.
Current Tools
Core Tools (api_core.py)
check_connection– Gateway/registry health check (ok/count)list_instances– List all IDA instances registered in the shared gatewayget_metadata– IDB metadata (hash/arch/bits/endian)list_functions– Paginated function list with optional pattern filterlist_globals– Global symbols (non-functions)list_strings– Extracted stringslist_local_types– Local type definitionsget_entry_points– Program entry pointsconvert_number– Number format conversionlist_imports– List imported functions with module nameslist_exports– List exported functions/symbolslist_segments– List memory segments with permissionsget_cursor– Get current cursor position and context
Analysis Tools (api_analysis.py)
decompile– Batch decompile functions (Hex-Rays)disasm– Batch disassemble functionslinear_disasm– Linear disassembly from arbitrary addressget_callers– Structured caller summary grouped by function and call siteget_callees– Structured callee summary grouped by function and call siteget_function_signature– Best-available function signature stringxrefs_to– Batch cross-references to addressesxrefs_from– Batch cross-references from addressesxrefs_to_field– Heuristic struct field referencesfind_bytes– Search for byte patterns with wildcardsget_basic_blocks– Get basic blocks with control flow
Memory Tools (api_memory.py)
get_bytes– Read raw bytesread_scalar– Read integers with explicit widthget_string– Read null-terminated strings
Modeling Tools (api_modeling.py)
create_function– Create a function at an addressdelete_function– Delete an existing functionmake_code– Convert bytes at an address into codeundefine_items– Undefine a byte rangemake_data– Create typed data itemsmake_string– Create a string literal
Type Tools (api_types.py)
declare_struct– Create/update local structsdeclare_enum– Create/update local enumsdeclare_typedef– Create/update local typedefsset_function_prototype– Set function signatureset_local_variable_type– Set local variable type (Hex-Rays)set_global_variable_type– Set global variable typelist_structs– List all structures/unionsget_struct_info– Get structure definition with fields
Modify Tools (api_modify.py)
set_comment– Batch set commentsrename_function– Rename functionrename_local_variable– Rename local variable (Hex-Rays)rename_global_variable– Rename global symbolpatch_bytes– Patch bytes at addresses
Stack Tools (api_stack.py)
stack_frame– Get stack frame variablesdeclare_stack– Create stack variablesdelete_stack– Delete stack variables
Python Tools (api_python.py) - Unsafe
py_eval– Execute arbitrary Python code in IDA context
Debug Tools (api_debug.py) - Unsafe
dbg_regs– Get all registersdbg_callstack– Get call stackdbg_list_bps– List breakpointsdbg_start/dbg_exit/dbg_continue– Start/stop/continue debuggingdbg_run_to– Run to addressdbg_add_bp/dbg_delete_bp/dbg_enable_bp– Breakpoint managementdbg_step_into/dbg_step_over– Single-step executiondbg_read_mem/dbg_write_mem– Debugger memory access
MCP Resources (api_resources.py)
ida://idb/metadata– IDB metadataida://functions– Function listida://function/{addr}– Single function detailsida://function/{addr}/decompile– Function decompilation snapshotida://function/{addr}/disasm– Function disassembly snapshotida://function/{addr}/basic_blocks– Function CFG/basic block viewida://function/{addr}/stack– Function stack/local-variable viewida://strings/ida://globals/ida://types/ida://segmentsida://imports/ida://imports/{module}/ida://exports/ida://entry_pointsida://structs/ida://struct/{name}ida://xrefs/to/{addr}/ida://xrefs/from/{addr}(+/summaryvariants)ida://memory/{addr}?size=N– Read memory
Transport Overview
| Mode | Description | Configuration |
|---|---|---|
| HTTP proxy (recommended) | Connects to the standalone gateway MCP proxy on 11338 | Only requires url |
| stdio proxy | MCP client launches ida_mcp/proxy/ida_mcp_proxy.py as a subprocess | Requires command and args |
| Direct instance HTTP | Connects straight to one IDA instance, mainly useful for ida:// resources | Requires the selected instance port |
Proxy Tools:
| Category | Tools |
|---|---|
| Management | check_connection, list_instances, select_instance |
| Lifecycle | open_in_ida, close_ida, shutdown_gateway |
| Core | list_functions, get_metadata, list_strings, list_globals, list_local_types, get_entry_points, convert_number, list_imports, list_exports, list_segments, get_cursor |
| Analysis | decompile, disasm, linear_disasm, get_callers, get_callees, get_function_signature, xrefs_to, xrefs_from, xrefs_to_field, find_bytes, get_basic_blocks |
| Modeling | create_function, delete_function, make_code, undefine_items, make_data, make_string |
| Modify | set_comment, rename_function, rename_global_variable, rename_local_variable, patch_bytes |
| Memory | get_bytes, read_scalar, get_string |
| Types | set_function_prototype, set_local_variable_type, set_global_variable_type, declare_struct, declare_enum, declare_typedef, list_structs, get_struct_info |
| Stack | stack_frame, declare_stack, delete_stack |
| Python | py_eval |
| Debug | dbg_start, dbg_continue, dbg_step_into, dbg_step_over, dbg_regs, dbg_add_bp, dbg_delete_bp, ... |
Works with any MCP client: Claude Code, Codex, Cursor, VSCode, LangChain, Cherry Studio, etc.
Method 1: HTTP Proxy Mode (Recommended)
{
"mcpServers": {
"ida-mcp": {
"url": "http://127.0.0.1:11338/mcp"
}
}
}
Method 2: stdio Proxy Mode
{
"mcpServers": {
"ida-mcp-proxy": {
"command": "path/to/ida-python/python.exe",
"args": ["path/to/ida_mcp/proxy/ida_mcp_proxy.py"]
}
}
}
Configuration
Edit ida_mcp/config.conf (located in the IDA plugins directory after installation):
enable_stdio = false
enable_http = true
enable_unsafe = true
wsl_path_bridge = false
http_host = "0.0.0.0"
http_port = 11338
http_path = "/mcp"
ida_default_port = 10000
ida_host = "127.0.0.1"
# ida_path = "C:\\Path\\To\\ida.exe"
# ida_python = "C:\\Path\\To\\ida-python\\python.exe"
open_in_ida_bundle_dir = ""
open_in_ida_autonomous = true
auto_start = false
server_name = "IDA-MCP"
request_timeout = 30
debug = false
Command Helper
The installed command.py provides CLI access:
python <plugins>/ida_mcp/command.py gateway start
python <plugins>/ida_mcp/command.py gateway status
python <plugins>/ida_mcp/command.py gateway stop
python <plugins>/ida_mcp/command.py ida list
python <plugins>/ida_mcp/command.py ida open ./target.exe
python <plugins>/ida_mcp/command.py tool call get_metadata --port 10000
Add --json for machine-readable output.
Development
It's not about having many tools, but about having precise ones; the power of the API is what truly matters. Additionally, the tools should be comprehensive, and the more tools there are, the more obstacles there are for the model to call them. If certain tools can be achieved through existing ones, then those tools are unnecessary. What I need are the missing tools—the ones that existing tools cannot accomplish.
License
See LICENSE.
Related Git & Version Control Servers
View allFetch MCP Server
modelcontextprotocol/servers
Sequential Thinking MCP Server
modelcontextprotocol/servers
Everything MCP Server
modelcontextprotocol/servers
mcp-server-git: A git MCP server
modelcontextprotocol/servers
Knowledge Graph Memory Server
modelcontextprotocol/servers
Time MCP Server
modelcontextprotocol/servers