Skip to main content

MCP plugin for IDA Pro/IDA Free that uses ida-domain for database access

Project description

ida-domain-mcp

A headless Model Context Protocol (MCP) server for IDA Pro built on top of ida-domain. It lets AI agents (or any MCP client) open and analyze IDA databases on demand — without launching the IDA manully — and control common reverse engineering workflows programmatically.

Unlike GUI-centric approaches, ida-domain-mcp spins up per-project worker processes on demand and loads binaries via an MCP tool call during the agent’s workflow. You don’t have to pre-load binaries at MCP server startup, and once configured, the whole flow can run fully automatically without human interaction.

Why It’s Different

  • Headless by design: No dependency on the IDA graphical UI. Uses idat/idat64 (IDA’s headless runners) underneath via ida-domain.
  • On-demand database loading: Call the open_database MCP tool at any time during the agent session to load a binary or IDB; no manual preloading required.
  • Multi-project isolation: Each project_name runs in its own worker process; multiple binaries can be analyzed concurrently without interfering with each other.
  • Agent-friendly: Returns JSON-serializable results (as strings) so LLM agents can easily parse and chain operations.

Features (tools)

High-level categories of tools exposed via MCP (see src/ida_domain_mcp/main.py and ida_tools.py for the full list):

  • Project/session management: open_database, close_database, get_metadata
  • Navigation and listings: list_segments, list_functions, list_functions_filter, list_globals, list_globals_filter, list_imports, list_strings, list_strings_filter, get_entry_points
  • Function-oriented: get_function_by_name, get_function_by_address, get_callers, get_callees, decompile_function (requires Hex-Rays), disassemble_function
  • Cross-references: get_xrefs_to, get_xrefs_to_field
  • Types and structures: list_local_types, declare_c_type, get_defined_structures, analyze_struct_detailed, get_struct_info_simple, search_structures, get_stack_frame_variables, set_function_prototype, set_local_variable_type, set_global_variable_type
  • Renaming and comments: rename_function, rename_local_variable, rename_stack_frame_variable, rename_global_variable, set_comment
  • Data access and patching: read_memory_bytes, data_read_{byte,word,dword,qword,string}, get_global_variable_value_{by_name,at_address}, patch_address_assembles

Notes:

  • decompile_function requires a valid Hex-Rays license; otherwise use disassemble_function.
  • Address parameters are accepted as integers by MCP entry points and are converted internally; results commonly encode addresses as hex strings.

Requirements

  • Python: 3.11+
  • IDA: IDA Pro 9.1.0 or later installed. Headless executables (idat/idat64) must be available on your system.
    • Make sure idat/idat64 is in your PATH (e.g., add your IDA install directory), or configure the executable path according to ida-domain’s documentation.
      export IDADIR="[IDA Installation Directory]"
      
    • Hex-Rays decompiler is optional but required for decompile_function.
  • OS: Linux, Windows, or macOS supported by your IDA installation. The included examples were exercised on Linux.

Installation

From source:

# With uv
uv venv
uv pip install -e .

# Or with pip/venv
python3.11 -m venv .venv
source .venv/bin/activate
pip install -e .

From PyPI:

# With uv
uv add ida-domain-mcp

# Or with pip
pip install ida-domain-mcp

This installs ida-domain-mcp along with its runtime dependencies:

  • ida-domain (database control via headless IDA)

Before running, verify IDA’s headless binary is accessible:

which idat64 || which idat

If not found, add the IDA folder to your PATH or use the configuration options provided by ida-domain to point to your IDA installation.

Running the MCP server

Two transport modes are supported by the server entrypoint ida-domain-mcp:

  1. stdio (default, for direct MCP client integration)
uv run ida-domain-mcp --transport stdio
  1. HTTP SSE (useful with the MCP Inspector and remote clients)
uv run ida-domain-mcp --transport http://127.0.0.1:8744
# Server prints: MCP Server available at http://127.0.0.1:8744/sse

You can then connect with the MCP Inspector for quick exploration:

npx @modelcontextprotocol/inspector
# Point it to: http://127.0.0.1:8744/sse

Testing

A simple dual-database test is provided:

# Start the server first (SSE mode)
uv run ida-domain-mcp --transport http://127.0.0.1:8744

# In another shell, run the test client
uv run ida_domain_mcp/tests/test_ida_mcp.py http://127.0.0.1:8744/sse

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ida_domain_mcp-0.1.1.tar.gz (32.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ida_domain_mcp-0.1.1-py3-none-any.whl (27.4 kB view details)

Uploaded Python 3

File details

Details for the file ida_domain_mcp-0.1.1.tar.gz.

File metadata

  • Download URL: ida_domain_mcp-0.1.1.tar.gz
  • Upload date:
  • Size: 32.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for ida_domain_mcp-0.1.1.tar.gz
Algorithm Hash digest
SHA256 847106ca6f2d4c29a81f092472a049e07cb7a35d5f07ad5db078d9f2f2dfcecf
MD5 aa90bfcb7b2c90a231fed69d1b7c4d53
BLAKE2b-256 3efb7485c6d8979627b66be8bc8888ff01c4723bb5ec700cdba77635c5441523

See more details on using hashes here.

File details

Details for the file ida_domain_mcp-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: ida_domain_mcp-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 27.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for ida_domain_mcp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2ea5c46a65c48c39009549ad13304af4d856789fd4b933a00fe973c6508b76ef
MD5 1afb8d44a9e1608b9c2d0bf55493c449
BLAKE2b-256 ce82efea0f983003252468c3aed6748dfad13a6b866fbf053e44dc0306e259d6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page