A headless IDA Pro MCP server built on idalib. Exposes IDA Pro's binary analysis capabilities over the Model Context Protocol (MCP), letting LLMs drive IDA Pro for reverse engineering tasks. Supports multiple simultaneous databases through a supervisor/worker architecture.
Note: This is a standalone server, not an IDA plugin. It uses idalib (IDA as a library) to run IDA's analysis engine headlessly ā no IDA GUI needs to be running. You just need IDA Pro 9+ installed on the same machine.
- IDA Pro 9+ with a valid license (including Hex-Rays decompiler for decompilation tools)
- Python 3.12+
- uv package manager (recommended) or pip
- macOS, Windows, or Linux
uv tool install ida-mcpOr with pip:
pip install ida-mcpThe 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.
git clone https://github.com/jtsylve/ida-mcp && cd ida-mcp
uv syncOr with pip:
git clone https://github.com/jtsylve/ida-mcp && cd ida-mcp
pip install -e .At startup, the server looks for your IDA Pro installation in the following order:
IDADIRenvironment variable ā checked first; set this if IDA is in a non-standard location.- IDA's own config file ā
Paths.ida-install-dirin~/.idapro/ida-config.json(macOS/Linux) or%APPDATA%\Hex-Rays\IDA Pro\ida-config.json(Windows). If theIDAUSRenvironment variable is set, it is used as the config directory instead. This is the same config file IDA itself uses. - 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 their Program Files (x86) equivalents |
| Linux | /opt/ida-pro-9.3, /opt/idapro-9.3, /opt/ida-9.3, ~/ida-pro-9.3, ~/idapro-9.3 |
If the server can't find IDA, you'll get a clear error message telling you to set IDADIR.
uvx ida-mcpOr if installed with pip:
ida-mcpYou can run the server without installing it first:
# uv
IDADIR=/path/to/ida uvx ida-mcp
# pipx (set IDADIR if IDA isn't in a standard location)
IDADIR=/path/to/ida pipx run ida-mcp# uv
$env:IDADIR = "C:\Program Files\IDA Professional 9.3"
uvx ida-mcp
# pipx (set IDADIR if IDA isn't in a standard location)
$env:IDADIR = "C:\Program Files\IDA Professional 9.3"
pipx run ida-mcpAdd to your MCP client config (e.g. Claude Desktop claude_desktop_config.json):
{
"mcpServers": {
"ida": {
"command": "uvx",
"args": ["ida-mcp"]
}
}
}If you don't use uv, use ida-mcp directly (assuming it's installed and on your PATH):
{
"mcpServers": {
"ida": {
"command": "ida-mcp"
}
}
}If ida-mcp isn't on your PATH (e.g. installed into a pyenv or virtualenv), use the full path to the executable:
{
"mcpServers": {
"ida": {
"command": "/home/user/.pyenv/versions/<version>/bin/ida-mcp"
}
}
}On macOS, the path would typically be /Users/<you>/.pyenv/versions/<version>/bin/ida-mcp.
If IDA is not in a default location, add IDADIR via the env key (works with any command):
{
"mcpServers": {
"ida": {
"command": "uvx",
"args": ["ida-mcp"],
"env": {
"IDADIR": "/path/to/ida"
}
}
}
}- Open a binary ā call
open_databasewith the path to a binary or an existing.i64/.idbdatabase, thenwait_for_analysisto block until it is ready - Analyze ā use the available tools (list functions, decompile, search strings, read bytes, etc.)
- Close ā call
close_databasewhen done (auto-saves by default)
Raw binaries must be in a writable directory since IDA creates a .i64 database file alongside them. When opening an existing database, the original binary does not need to be present.
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) 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
| Variable | Default | Description |
|---|---|---|
IDADIR |
(auto-detected) | Path to IDA Pro installation directory |
IDA_MCP_MAX_WORKERS |
(no limit) | Maximum simultaneous databases (1-8, unset for unlimited) |
IDA_MCP_ALLOW_SCRIPTS |
(unset) | Set to 1, true, or yes to enable the run_script tool for arbitrary IDAPython execution |
IDA_MCP_LOG_LEVEL |
WARNING |
Logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL) ā output goes to stderr |
The server provides tools covering all major areas of IDA Pro's functionality:
- Database ā open/close/save/list databases, file region mapping, metadata
- Functions ā list, query, decompile, disassemble, rename, prototypes, chunks, stack frames
- Decompiler ā pseudocode variable renaming/retyping, decompiler comments, microcode
- Ctree ā Hex-Rays AST exploration and pattern matching
- Cross-References ā xref queries, call graphs, xref creation/deletion
- Imports & Exports ā imported functions, exported symbols, entry points
- Search ā string extraction, byte patterns, text in disassembly, immediate values, string-to-code references, string list rebuilding
- Types & Structures ā local types, structs, enums, type parsing and application, source declarations
- Instructions & Operands ā decode instructions, resolve operand values, change operand display format
- Control Flow ā basic blocks, CFG edges, switch/jump tables
- Data ā raw byte reading, hex dumps, segment listing, pointer tables
- Patching ā byte patching, instruction assembly, function/code creation, data loading
- Data Definition ā define bytes, words, dwords, qwords, floats, doubles, strings, and arrays
- Segments ā create, modify, and rebase segments
- Names & Comments ā rename addresses, manage comments (get, set, and append)
- Demangling ā C++ symbol name demangling
- Analysis ā auto-analysis, fixups, exception handlers, segment registers
- Address Metadata ā source line numbers, analysis flags, library item marking
- Register Tracking ā register and stack pointer value tracking
- Register Variables ā register-to-name mappings within functions
- Signatures ā FLIRT signatures, type libraries, IDS modules
- Export ā batch decompilation/disassembly, output file generation, executable rebuilding
- Snapshots ā take, list, and restore database snapshots
- Processor ā architecture info, register names, instruction classification
- Bookmarks ā marked-position management
- Colors ā address/function coloring
- Undo ā undo/redo operations
- Directory Tree ā IDA folder organization
- Utility ā number conversion, IDC 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.
See docs/tools.md for the complete tools reference.
The server exposes MCP resources ā read-only, cacheable context endpoints that provide structured data without consuming tool calls:
- Static binary data ā imports, exports, entry points (with regex search variants)
- Aggregate snapshot ā statistics (function/segment/entry point/string/name counts, code coverage)
- Supervisor ā
ida://databaseslists all open databases with worker state
The server provides MCP prompts ā guided workflow templates that instruct the LLM to use tools in a structured sequence:
survey_binaryā binary triage producing an executive summaryanalyze_functionā full single-function analysis with decompilation, data flow, and behavior summarydiff_before_afterā preview the effect of renaming/retyping on decompiler outputclassify_functionsā categorize functions by behavioral patternfind_crypto_constantsā scan for known cryptographic constantsauto_rename_stringsā suggest function renames based on string referencesapply_abiā apply known ABI type information to identified functionsexport_idc_scriptā generate an IDAPython script that reproduces user annotations
See docs/architecture.md for detailed architecture documentation.
# With uv (recommended)
uv sync # Install dependencies
uv run ruff check src/ # Lint
uv run ruff format src/ # Format
uv run ruff check --fix src/ # Lint with auto-fix
# With pip
pip install -e . # Install in editable mode
pip install pre-commit pytest pytest-asyncio ruff # Install dev tools (see [dependency-groups] in pyproject.toml for pinned versions)
ruff check src/ # Lint
ruff format src/ # Format
ruff check --fix src/ # Lint with auto-fixPre-commit hooks run REUSE compliance checks, ruff lint (with auto-fix), ruff formatting, idalib threading lint, and pytest on every commit.
This project is licensed under the MIT License.
Ā© 2026 Joe T. Sylve, Ph.D.
This project is REUSE compliant.
IDA Pro and Hex-Rays are trademarks of Hex-Rays SA. ida-mcp is an independent project and is not affiliated with or endorsed by Hex-Rays.
