Skip to main content
Glama

Hex-Rays IDA MCP

English announcement · 官方 IDA Nexus 之上的 MCP 服务器适配层。

本服务器让 Claude Code、Codex、GitHub Copilot 等 AI 代理直接对编译产物(ELF / PE / Mach-O / 固件 / IDB)做逆向分析:反编译为伪代码、反汇编、交叉引用、类型系统、字符串/常量检索、补丁、签名制作乃至动态调试。

除了官方的 6 个核心工具外,本仓库(feat/port-ida-pro-mcp 分支)还移植了社区服务器 ida-pro-mcp 的 95 个细化工具和 11 个资源(详见下文 Pro 工具面),两套工具面共用同一服务器、同一 open_database 生命周期、同一多数据库模型。

功能总览

能力

来源

说明

打开/保存/关闭数据库、执行任意 IDAPython

官方 6 工具

open_database / execute_python / reference / list_databases / save_database / close_database

反编译、反汇编、xref、调用图、批量分析

Pro 工具面

decompile、disasm、analyze_batch、callgraph、survey_binary 等 19 个分析类工具

内存读取、字节补丁、全局变量读写

Pro 工具面

get_bytes / get_int / patch / put_int 等,写操作标注 destructive

类型与结构体、栈变量

Pro 工具面

declare_type、enum_upsert、set_type、read_struct、stack_frame 等 12 个

重命名、注释、定义函数/代码、书签

Pro 工具面

rename、set_comments、define_func、add_bookmark 等 11 个

REPL 式 IDAPython

Pro 工具面

py_eval(局部变量跨调用持久)、py_exec_file

特征码制作

Pro 工具面

make_signature*、find_xref_signatures,内置 vendored ida-sigmaker 引擎

CTF 辅助

Pro 工具面

算法识别、混淆检测、patch 点定位、约束提取、一键分析报告等 7 个

动态调试

Pro 扩展(默认隐藏)

22 个 dbg_* 工具,需 GUI 活动调试会话,--extensions dbg 开启

会话追踪与成本看板

本仓库

ida-mcp dashboard 渲染语义轨迹并关联代理转录

Related MCP server: IDA MCP

环境要求

  • 已加入 PATH:Git、uv

  • IDA 9.4 及以上,带 idalib,Python 3.11+

  • 建议禁用其他 IDA MCP 服务器,减少代理混淆

安装

自动安装(上游正式发布版)

使用 hcli 安装,会装上 GUI 插件并交互式提供各代理插件:

uvx ida-hcli mcp install
# 或已安装 hcli 时:
hcli mcp install

从本仓库安装(含 Pro 工具面)

Pro 工具面目前只在本仓库中,从源码安装:

git clone https://github.com/HexRaysSA/ida-mcp
cd ida-mcp
uv sync                 # 按 uv.lock 安装运行时 + 开发依赖
uv run ida-mcp --help   # 验证 CLI 可用

wheel 打包只包含 ida_mcp 包(pyproject.toml 中 only-include = ["ida_mcp"]),ida_mcp.pro 运行时会随包一起分发。

手动安装

IDA GUI 插件

GUI 插件让 MCP 服务器能访问 IDA GUI 里已打开的数据库:

uvx ida-hcli plugin install ida-mcp@https://github.com/HexRaysSA/ida-mcp
# 或:
hcli plugin install ida-mcp@https://github.com/HexRaysSA/ida-mcp

注:不装 GUI 插件时,IDA MCP 仍可 headless 工作。

Claude Code

claude plugin marketplace add HexRaysSA/claude-marketplace
claude plugin install ida-mcp@HexRaysSA
claude plugin update ida-mcp@HexRaysSA   # 升级到最新版

Codex CLI

codex plugin marketplace add HexRaysSA/codex-marketplace
codex plugin add ida-mcp@HexRaysSA

GitHub Copilot CLI

copilot plugin marketplace add HexRaysSA/copilot-marketplace
copilot plugin install ida-mcp@HexRaysSA
copilot plugin update ida-mcp

Pi

pi install git:github.com/HexRaysSA/ida-mcp@latest
pi update --extensions

oh-my-pi

omp plugin install github:HexRaysSA/ida-mcp#latest
omp plugin upgrade

其他代理

在 MCP JSON 配置中配置一个常规 stdio 服务器:

{
  "mcpServers": {
    "ida": {
      "command": "uvx",
      "args": [
        "--exclude-newer=1s",
        "ida-mcp",
        "stdio",
        "--agent=my-agent"
      ]
    }
  }
}

uvx 会从 PyPI 解析最新的稳定版 ida-mcp,无需随版本更新配置。 从本仓库源码运行时,把 uvx --exclude-newer=1s ida-mcp 换成 uv --project /path/to/ida-mcp run ida-mcp 即可。

--agent=my-agent 是人工命名的标签(如 claude-code、cursor、my-custom-agent),用于在看板里区分不同代理的会话。

CLI 参考

# 标准输入/输出上的 MCP 服务器
uvx ida-mcp stdio --agent=my-agent

# Streamable HTTP 上的 MCP 服务器(默认 127.0.0.1:8737)
uvx ida-mcp http --host 127.0.0.1 --port 8737

# 查看会话日志看板
uvx ida-mcp dashboard --open

# 导出会话日志用于排障(生成校验过的 ZIP 归档)
uvx ida-mcp logs

# 为 Claude / Codex / Copilot 的 pre-tool 载荷附加转录元数据
uvx ida-mcp hook

stdio 与 http 共用的服务器参数:

参数

默认

说明

--database <path>

无

启动时打开并激活的执行文件或 IDB 路径

--agent <name>

无

记录到 MCP 会话轨迹中的代理名

--idle-timeout <sec>

不超时

管理型 idalib 租约空闲该秒数后自动释放;0 禁用。环境变量 IDA_MCP_IDLE_TIMEOUT

--extensions <groups>

空

启用的 ida_mcp.pro 扩展组,逗号分隔(调试器工具用 dbg)。环境变量 IDA_MCP_PRO_EXTENSIONS

其他环境变量:

变量

作用

IDA_MCP_PRO_EXTENSIONS

等价于 --extensions(插件清单可从客户端环境透传)

IDA_MCP_IDLE_TIMEOUT

等价于 --idle-timeout

IDA_MCP_STATE_DIR

语义轨迹根目录,默认 <IDAUSR>/mcp/sessions

IDA_MCP_ID

可选的进程级关联 ID,用于可信关联

官方六工具

工具

签名

说明

open_database

path, set_current=True, load_options=None

打开可执行文件/共享库/固件镜像或现成的 .i64/.idb;load_options 可指定 processor(如 metapc)、file_type、image_base、entry_point(仅对新生成的 headless worker 生效;已在 GUI 打开的数据库自动附着)

execute_python

code, timeout=360, instance_id=None

在目标 worker 中运行 IDAPython/IDA domain API,等待初始自动分析完成后执行;支持 MCP 取消(对未完成的只读请求转发取消,已执行的变更请求绝不重试)

reference

query

按 IDA domain API 用法查询参考(如"decompile function"、"xrefs to address"),返回签名与示例

list_databases

—

列出 GUI / headless worker 中当前打开的数据库与实例 ID

save_database

instance_id=None

保存 IDB(renames、comments、types、patches 等持久化)

close_database

instance_id=None

释放本进程租约;绝不动 GUI 数据库或其他客户端的租约

官方工具 + pro 工具都支持尾部 instance_id 参数实现多数据库定向。

Pro 工具面

ida_mcp.pro 从社区服务器 ida-pro-mcp(MIT,© 2025 Duncan Ogilvie)移植,与官方六工具运行在同样的 Nexus worker 上。95 个 @tool 函数按运行时模块分成 9 组:

分组

数量

工具

备注

核心列表/查询

12

server_health、lookup_funcs、list_funcs、func_query、list_globals、entity_query、imports、imports_query、find_regex、search_text、int_convert、idb_save

字符串检索使用 worker 侧增量缓存

内存

6

get_bytes、get_int、get_string、get_global_value、patch、put_int

patch/put_int 标注 destructive

分析

19

decompile、disasm、func_profile、analyze_batch、analyze_function、analyze_component、xrefs_to、xref_query、xrefs_to_field、callees、find_bytes、basic_blocks、find、insn_query、export_funcs(json / c_header / prototypes 三种格式)、callgraph、diff_before_after、trace_data_flow

analyze_batch 可一次综合分析多个函数(伪代码、常量、字符串、调用者/被调用者、xref、基本块)

类型与栈

12

declare_type、enum_upsert、set_type、type_apply_batch、type_inspect、type_query、read_struct、search_structs、infer_types、stack_frame、declare_stack、delete_stack

修改

11

add_bookmark、set_comments、append_comments、rename(函数/全局/局部/栈变量批量)、define_func、define_code、force_recompile、set_op_type、patch_asm、undefine、make_data

写字节类工具标注 destructive

Python

2

py_eval、py_exec_file

REPL 局部变量按 worker 持久(跨调用、跨 MCP 会话)

签名

4

make_signature、make_signature_for_function、make_signature_for_range、find_xref_signatures

vendored ida-sigmaker 引擎(MIT,© 2024 Mahmoud Abdelkader)

CTF 辅助

7

get_algorithm_signature、detect_obfuscation、get_patch_points、get_function_constraints、get_dynamic_string_map、get_analysis_report、generate_analysis_report_md

算法识别(md5/sha/aes/des/rc4/tea/xor/base64/crc32/zlib…)、控制流平坦化等混淆检测、可 patch 点定位、约束线索提取、一键 Markdown 分析报告

调试器

22

dbg_*(见下节)

扩展组门控

调试器扩展(dbg)

22 个 dbg_* 工具(dbg_start、dbg_run_to、dbg_step_into/over、dbg_add_bp、dbg_set_bp_condition、dbg_read/write、dbg_regs*、dbg_stacktrace、dbg_status 等)需要 GUI 活动调试会话,默认从 tools/list 隐藏:

ida-mcp stdio --extensions dbg
# 或
export IDA_MCP_PRO_EXTENSIONS=dbg

不开扩展时 tools/list 显示 79 个工具(6 官方 + 73 pro);调用被门控的工具会返回一条错误,消息中给出确切的开启方法。

资源

11 个 MCP 资源沿用上游 URI:ida://idb/metadata、ida://idb/segments、ida://idb/entrypoints、ida://cursor、ida://selection、ida://types、ida://structs,外加模板 ida://struct/{name}、ida://import/{name}、ida://export/{name}、ida://xrefs/from/{addr}。其中 ida://cursor 与 ida://selection 在 idalib worker(无 GUI)上返回明确的 GUI-only 错误,而不是过期数据。

与上游 ida-pro-mcp 的差异(有意为之)

  • 所有工具多一个尾部 instance_id 参数,对齐官方多数据库模型;

  • server_health 省去 busy_tool / queued_calls(busy 上报由 Nexus 统一负责);

  • py_eval 不再注入 mcp_time_left() / mcp_deadline_exceeded()(超时由 Nexus 在服务端强制);

  • 工具超时预算为 ida_mcp/pro/spec.py 中记录的 execute_python 预算:每工具 30–300 s,默认 120 s(decompile 90 s、py_eval 300 s、analyze_component 180 s 等);

  • 参数量超过 2 MiB(HTTP body 上限)的批量请求被拒绝并提示"收窄查询",而不是传输层报错。

完整文档见 docs/PRO_TOOLS.md。

使用示例

启动代理后直接下指令:

Reverse /path/to/sample.elf for me in IDA

测试 GUI 集成(先在 IDA GUI 里打开某个文件):

What do I have open in the IDA GUI?

典型工作流:

  1. open_database 打开样本 → 自动分析完成;

  2. survey_binary 一览全貌(段布局、入口点、xref Top15 字符串/函数、导入分类、调用图摘要);

  3. decompile / analyze_function 深挖重点函数;

  4. rename、set_type、set_comments 持久化你的结论;

  5. make_signature_for_function 提特征码、dbg_*(开启扩展后)动态验证;

  6. save_database 保存 IDB,close_database 释放。

架构

IDA MCP 是协议无关的 IDA Nexus 库之上的适配层:Nexus 负责 IDA 进程发现、认证的数据库服务、租约、worker 与 Python 执行;本仓库负责面向模型的 MCP 协议、语义追踪、代理转录关联、看板与支持日志归档。

agent / MCP client
        │
        ├─ stdio 或 Streamable HTTP
        │
    ida_mcp.mcp            (ZeroMCP 服务器:6 官方工具 + 95 pro 包装器 + 11 资源)
        │
        ├─ 语义轨迹 ──> <IDA_MCP_STATE_DIR>/sessions/<server-id>.jsonl
        │
        └─ ida_nexus.DatabaseManager
                    │
                    └─ DatabaseHandle 租约 ──> GUI worker 或 idalib worker
  • 可靠关闭:stdio EOF、SIGINT/SIGTERM、解释器正常退出、HTTP 显式关停都会释放本进程句柄;最后一个租约消失时 Nexus 执行最终保存并关闭托管 worker。

  • Pro 移植机制:服务器进程从不导入运行时。ida_mcp/pro/tools.py 持有 95 个薄 @tool 包装器(zeromcp 从签名推导严格 schema);dispatch 把参数序列化为 JSON,经标准 execute_python 路径执行 pro_call(...) 程序。每个 worker 上的第一次 pro 调用会安装内容寻址的 bundle 模块(_ida_mcp_pro_<sha16>)——重新构建即产生新模块名,不存在旧代码窗口。worker 侧状态(find_regex 字符串缓存、py_eval REPL 局部变量)放在 bundle 模块里,对挂在同一 worker 上的所有 MCP 会话共享。

  • 追踪:首次工具调用时惰性创建 schema-1 JSONL 轨迹(纯生命周期连接不落盘);每条记录含时间戳、服务器 ID、进程 ID 与事件,工具调用与结果靠 call_id 配对。

  • 代理关联:代理 hook 用 <agent-kind>_session_path 约定把转录路径放进隐藏请求元数据;嵌入元数据在 dispatch 前从公开参数中剥离、复制进语义记录,且只保留与配置的 --agent 匹配的键。

  • 看板:纯标准库实现的 ida-mcp dashboard 读取本地轨迹或校验过的支持归档,关联工具调用与结果、渲染 Python 执行与错误、跟踪数据库目标,并按 Cost / Task time(根据关联转录估算的 LLM/工具墙钟时间)排序;ida-mcp logs 生成带校验和的 ida-mcp-logs ZIP。

  • 归档安全:解压拒绝重复/不安全成员名,校验尺寸与哈希;缺失引用绝不解析到接收方文件系统。

  • 嵌入 API:应用可从 ida_mcp.mcp 导入 serve_http、serve_stdio、stop_http_server、tool;serve_http 接受 DatabaseManager 子类,便于云/枢纽应用自定义数据库解析而保留官方工具、追踪、取消与关停行为。

更多细节见 docs/ARCHITECTURE.md。

开发

依赖(pyproject.toml):运行时 packaging、ida-nexus>=0.13.4、zeromcp>=1.10.3;开发组 pytest>=9.0.3、ruff>=0.12.0、ty>=0.0.83。要求 Python 3.11+。

uv sync                # 安装全部依赖

# 测试(16 个测试文件:CLI / MCP / dashboard / logs / hooks / pro 全链路 mock 覆盖)
uv run pytest

# Lint(ida_mcp/pro/runtime 为逐字移植的上游代码,已排除 house style)
uv run ruff check

# 类型检查(同样排除移植运行时)
uv run ty check

Pro 表面的签名漂移由 tests/test_pro_signature_parity.py 围栏防护;tools.py 由 artifacts_port/gen_tools.py 生成。

许可证与致谢

本仓库以 MIT 许可发布(见 LICENSE)。

ida_mcp.pro 包基于两份 MIT 许可的第三方代码移植,两份许可文本原文收录于 ida_mcp/pro/NOTICE:

  • ida-pro-mcp(© 2025 Duncan Ogilvie):runtime 模块与工具包装表面;

  • ida-sigmaker(© 2024 Mahmoud Abdelkader):bundle 内 vendored 的特征码引擎。

Available Tools

79 tools
add_bookmarkSet or replace a bookmarkA

Add or replace the IDA bookmark at an address. Set prefix="" for no prefix.

Inputs: addr (required), name (required), prefix, instance_id. Returns: ea, ok, addr, slot, +3 more

analyze_batchBatch multi-function analysisC
Read-only

Run comprehensive analysis over one or more target functions.

Inputs: queries (required), instance_id. Returns: result

analyze_componentGroup analysis of related functionsA
Read-only

Analyze related functions as a group: per-function summaries, internal call graph, shared data.

Inputs: addrs (required), instance_id. Returns: error, functions, string_usage, internal_only, +3 more

analyze_functionCompact single-function analysisA
Read-only

Compact single-function analysis: pseudocode, strings, constants, callers, callees, xrefs, blocks.

Inputs: addr (required), include_asm, instance_id. Returns: addr, name, size, error, +12 more

append_commentsAppend comments at addressesC

Append comments at addresses, deduping exact text by default.

Inputs: items (required), instance_id. Returns: result

basic_blocksFunction CFG blocks (paginated)B
Read-only

Return function CFG blocks with offset/max_blocks pagination.

Inputs: addrs (required), offset, max_blocks, instance_id. Returns: result

calleesUnique callees per functionB
Read-only

Return unique callees per function, capped by limit.

Inputs: addrs (required), limit, instance_id. Returns: result

callgraphBounded call graph from rootsB
Read-only

Build bounded callgraph from roots with depth/node/edge limits.

Inputs: roots (required), max_depth, max_edges, max_nodes, +2 more. Returns: result

close_databaseRelease IDA databaseA

Release this session's lease on an IDA database (.i64/.idb) without disrupting other clients. If this is the final lease on a managed idalib worker, orphaned IDA Python execution is cancelled and this call waits for the IDB to shut down. Databases open in the IDA GUI stay open.

Inputs: instance_id. Returns: closed

declare_stackCreate function stack variablesC

Create stack variables from typed stack declarations.

Inputs: items (required), instance_id. Returns: result

declare_typeDeclare C types in the local libraryC

Declare C type definitions in local type library.

Inputs: decls (required), instance_id. Returns: result

decompileDecompile function to pseudocodeA
Read-only

Decompile function(s) at address(es); returns pseudocode and per-item errors.

Inputs: addr (required), instance_id, include_addresses. Returns: addr, code, refs, error

define_codeDefine code instructionsC

Convert bytes to code instruction(s) at address(es).

Inputs: items (required), instance_id. Returns: result

define_funcDefine functions from bytesC

Define functions; IDA infers bounds unless end is provided.

Inputs: items (required), instance_id. Returns: result

delete_stackDelete function stack variablesC

Delete stack variables by name or offset.

Inputs: items (required), instance_id. Returns: result

detect_obfuscationDetect obfuscation patternsB
Read-only

检测常见混淆模式:控制流平坦化、字符串加密、反调试、死代码,返回各标志与详情。

Inputs: function_address (required), instance_id. Returns: details, dead_code, anti_debug, flattening, +1 more

diff_before_afterBefore/after decompile of one editA

Rename a function, set its type, or add a comment, and immediately see the before/after decompilation side by side. Use this instead of calling rename then decompile separately when you want to verify that a rename or type change actually improved readability. Actions: 'rename_func' (action_args: {name: str}), 'set_type' (action_args: {type: str}), 'set_comment' (action_args: {comment: str}). Returns {before, after, action_applied, changes_detected}. Especially useful during batch renaming to confirm each change had the intended effect.

Inputs: addr (required), action (required), action_args (required), instance_id. Returns: after, error, before, action_applied, +1 more

disasmDisassemble a functionB
Read-only

Disassemble function with offset/max_instructions pagination and optional total count.

Inputs: addr (required), offset, instance_id, include_total, +1 more. Returns: asm, addr, error, cursor, +2 more

entity_queryGeneric IDB entity queryC
Read-only

Query IDB entities with typed filters, projection, and pagination.

Inputs: queries (required), instance_id. Returns: result

enum_upsertCreate or extend a local enumB

Create or extend local enums in an idempotent way.

Inputs: queries (required), instance_id. Returns: result

execute_pythonRun IDA Python analysisA

Run Python (IDAPython and the ida-domain API) against the binary open in IDA: decompile a function to Hex-Rays pseudocode, disassemble (disasm) instructions, enumerate functions, strings, imports, exports, symbols, segments and sections, find cross references (xrefs to/from an address, callers, callees, call graph), get the function at an address, inspect or apply types and structs, rename functions and variables, add comments, and patch bytes. Returns the result plus stdout/stderr. Look up API names with reference first.

Inputs: code (required), timeout, instance_id. Returns: result, stderr, stdout

export_funcsExport function prototypesC
Read-only

Export function data for addresses in json/c_header/prototypes formats.

Inputs: addrs (required), format, instance_id. Returns: object

findSearch strings/immediates/refsB
Read-only

Search strings/immediates/refs for targets with offset/limit pagination.

Inputs: type (required), targets (required), limit, offset, +1 more. Returns: result

find_bytesByte pattern searchB
Read-only

Search byte patterns (supports ??) with offset/limit pagination.

Inputs: patterns (required), limit, offset, instance_id. Returns: result

find_regexSearch strings by regexA
Read-only

Search strings by case-insensitive regex with offset/limit pagination.

Inputs: pattern (required), limit, offset, instance_id. Returns: n, error, cursor, matches

find_xref_signaturesSignature generation at xref sitesA
Read-only

Find signatures for code locations that reference an address. For each input address, finds all code cross-references TO it, generates a unique signature at each xref site, and returns the shortest ones. Ideal for creating signatures for data addresses, vtable entries, or string references that can't be signatured directly.

Inputs: addrs (required), top, format, max_length, +1 more. Returns: result

force_recompileInvalidate Hex-Rays decompile cacheA

Invalidate the Hex-Rays decompile cache for one or more functions.

Use after set_type, rename (especially of locals), set_op_type, or make_data so the next decompile call regenerates fresh pseudocode instead of returning a cached, stale view.

Inputs: items, instance_id. Returns: object

func_profileFunction profiling queryB
Read-only

Profile functions with summary metrics and optional sampled details.

Inputs: queries (required), instance_id. Returns: result

func_queryQuery functions by filtersB
Read-only

Query functions with richer filtering than list_funcs.

Inputs: queries (required), instance_id. Returns: result

generate_analysis_report_mdStructured markdown reportA
Read-only

一键生成结构化 markdown 报告,帮助快速理解程序核心逻辑(全量函数扫描)。

Inputs: instance_id.

get_algorithm_signatureDetect common crypto/algorithm patternsB
Read-only

自动识别常见算法(md5/sha/aes/des/rc4/tea/xor/base64/crc32/zlib 等),返回算法类型和置信度。

Inputs: function_address (required), instance_id. Returns: algorithm, confidence

get_analysis_reportFull entity inventory reportB
Read-only

自动生成结构化分析报告(函数/全局/字符串/入口点全量清单)。

Inputs: instance_id. Returns: globals, strings, functions, entry_points

get_bytesRead raw bytes from memoryC
Read-only

Read bytes from memory addresses

Inputs: regions (required), instance_id. Returns: result

get_dynamic_string_mapStatic + recorded dynamic stringsC
Read-only

动态字符串解密映射(静态字符串 + 运行期记录的动态字符串)。

Inputs: instance_id. Returns: object

get_function_constraintsExtract flag/check constraintsB
Read-only

从反编译伪代码中启发式提取 flag/校验约束线索(长度比较、常量 == 等)。

Inputs: function_address (required), instance_id.

get_global_valueRead global variable valuesC
Read-only

Read global variable values by address or symbol name.

Inputs: queries (required), instance_id. Returns: result

get_intRead integers from memoryC
Read-only

Read integer values from memory addresses

Inputs: queries (required), instance_id. Returns: result

get_patch_pointsLocate patchable branch sitesB
Read-only

自动定位可 patch 位置(条件跳转、call、反调试 int 0x2d 等)。

Inputs: function_address (required), instance_id. Returns: result

get_stringRead strings from memoryC
Read-only

Read strings from memory addresses

Inputs: addrs (required), instance_id. Returns: result

idb_saveSave the IDB databaseA

Save active IDB to disk, optionally to a provided path.

The open database is backed by loose working files (.id0/.id1/.id2/.nam/.til) that IDA actively manages, headless included. Killing them out from under the open database corrupts it (issues #446, #498), so DBFL_KILL is never used here: an in-place save uses IDA's native save (Ctrl+W), and an explicit different destination gets a compressed copy while the working files stay.

Inputs: path, instance_id. Returns: ok, path, error

importsList importsB
Read-only

List imports with module names using offset/count pagination.

Inputs: count (required), offset (required), instance_id. Returns: object

imports_queryQuery imports with filtersB
Read-only

Query imports with richer filtering than imports(offset,count).

Inputs: queries (required), instance_id. Returns: result

infer_typesInfer types at addressesC
Read-only

Infer and apply likely types at target addresses.

Inputs: addrs (required), instance_id. Returns: result

insn_queryInstruction query by mnemonic/operandC
Read-only

Query instructions with mnemonic/operand filters and scoped scans.

Inputs: queries (required), instance_id. Returns: result

int_convertConvert numbers between formatsC
Read-only

Convert numbers to different formats

Inputs: inputs (required), instance_id. Returns: result

list_databasesShow open IDA databasesA
Read-only

Show the IDA databases (analyzed binaries, .i64/.idb) currently open in the IDA GUI or in headless idalib workers, with their instance ids.

Inputs: no named parameters. Returns: hint, instances

list_funcsList functions with filters and paginationB
Read-only

List functions with optional filtering and offset/count pagination.

Inputs: queries (required), instance_id. Returns: result

list_globalsList globals with filters and paginationB
Read-only

List globals with optional filtering and offset/count pagination.

Inputs: queries (required), instance_id. Returns: result

lookup_funcsLook up functions by address or nameB
Read-only

Get functions by address or name (auto-detects)

Inputs: queries (required), instance_id. Returns: result

make_dataCreate typed data symbolsA

Create a typed data symbol at an address, replacing any prior items.

Use this to harden a symbol boundary that the decompiler is currently expressing through a neighboring global plus offset. set_type alone leaves the underlying byte items unchanged; this tool deletes them first, then re-creates them at the right size with the right type, then optionally renames.

The type field is a full C declaration with a placeholder name, e.g. "ISP_SNS_STATE_S * g_pastImx290[4]" — IDA parses it via SetType.

Inputs: items (required), instance_id. Returns: result

make_signatureUnique signature at an addressA
Read-only

Create unique byte signatures for addresses. Generates the shortest unique signature starting at each address by walking instructions and wildcarding operands. Useful for finding stable patterns that survive recompilation.

Inputs: addrs (required), format, max_length, instance_id, +1 more. Returns: result

make_signature_for_functionSignature at a function entryB
Read-only

Create unique byte signatures for function entry points. Resolves each name/address to a function, then generates the shortest unique signature starting at the function start.

Inputs: addrs (required), format, max_length, instance_id, +1 more. Returns: result

make_signature_for_rangeSignature for a byte rangeA
Read-only

Create a byte signature for a specific address range (e.g. a selected region). Unlike make_signature, this does NOT guarantee uniqueness — it simply encodes the bytes in the range with optional operand wildcarding.

Inputs: end (required), start (required), format, instance_id, +1 more. Returns: addr, error, query, format, +2 more

open_databaseOpen binary in IDAA

Open (load) a binary executable, shared library, firmware image, or an existing .i64/.idb IDA database in IDA Pro for reverse engineering. Runs IDA auto-analysis (functions, disassembly, cross references, strings) in a headless idalib worker, or attaches to the file already open in the IDA GUI. Call this first, then use execute_python to decompile, disassemble and query the binary. load_options apply only when a new headless worker is spawned; they do not change an already-open IDA GUI database or a reused worker.

Inputs: path (required), set_current, load_options. Returns: hint, mcp_id, status, backend, +3 more

patchPatch IDB bytesB
Destructive

Patch bytes at memory addresses with hex data

Inputs: patches (required), instance_id. Returns: result

patch_asmAssemble and patch instructionsC

Patch assembly instructions at addresses

Inputs: items (required), instance_id. Returns: result

put_intWrite integers to memoryC
Destructive

Write integer values to memory addresses

Inputs: items (required), instance_id. Returns: result

py_evalEvaluate Python in the worker (REPL)A

Execute Python in IDA context and return result/stdout/stderr.

Locals persistence (Jupyter-style): the locals namespace persists across calls by default, so variables, imports, and definitions from previous calls stay visible. Pass new_locals=True to reset the stored namespace and start fresh.

Note: the globals namespace (IDA modules and helpers) is always rebuilt per call; only locals persist. Jupyter-style last-expression return: if the code ends with an expression, its value is returned in "result".

Timeouts for long snippets: this tool runs with a 300s ceiling enforced by the nexus side — a snippet that blocks past it is cancelled there (the worker's main-thread pump cannot be interrupted from inside Python, so no pollable deadline helpers are provided).

Inputs: code (required), new_locals, instance_id. Returns: result, stderr, stdout

py_exec_fileExecute a Python file in the workerA

Execute a Python script file in IDA context and return stdout/stderr.

Unlike py_eval, this runs the entire file with exec() using a single shared globals dict (no locals split), so top-level definitions are visible to all code in the script. Handles large scripts that would be unwieldy as inline code.

Inputs: file_path (required), instance_id. Returns: result, stderr, stdout

read_structRead struct fields at an addressB
Read-only

Read struct fields from memory at address; auto-detect type when possible.

Inputs: queries (required), instance_id. Returns: result

referenceSearch IDA API referenceA
Read-only

Look up the IDA Pro ida-domain Python API by task or name, e.g. "decompile function", "xrefs to address", "list strings", "rename local variable", "struct type". Returns API signatures and usage examples for IDA analysis via execute_python.

Inputs: query (required).

renameBatch rename funcs/globals/locals/stackC

Batch-rename funcs/globals/locals/stack vars with dry-run options.

Inputs: batch (required), instance_id. Returns: data, func, local, stack, +2 more

save_databaseSave IDA databaseA

Save the IDA database (.i64) to disk so renames, comments, types and patches made during reverse engineering persist.

Inputs: instance_id. Returns: path

search_structsSearch local structs/unionsB
Read-only

Search local structs/unions by name pattern.

Inputs: filter (required), instance_id. Returns: result

search_textSearch the rendered listingA
Read-only

Search the rendered listing for pattern over [start, end).

Iterates idautils.Heads() in pure Python and renders each via ida_lines.generate_disassembly(). Per-head iteration is cheap and yields between heads, so the per-tool deadline (sync_wrapper) and the UI Cancel button both interrupt the walk reliably — unlike the C-level ida_search.find_text() it replaced, which on huge .text segments could run for minutes without polling user_cancelled().

Use start/end to scope the work for predictable performance on large binaries; without them the scan covers the whole image.

Inputs: pattern (required), end, limit, regex, +5 more. Returns: n, hits, error, cursor

server_healthPro runtime health and IDB statsA
Read-only

Health/ready probe for MCP server and current IDB state.

Inputs: instance_id. Returns: module, status, busy_sec, idb_path, +9 more

set_commentsSet comments at addressesC

Set comments at addresses (both disassembly and decompiler views)

Inputs: items (required), instance_id. Returns: result

set_op_typeSet an instruction operand typeA

Set the type of an instruction operand. GUI 'Y' / 'O' / '#' equivalent.

Tags an operand at a specific instruction with a desired interpretation. Useful when the decompiler picks an awkward expression form (e.g., the "earlier-named-symbol + offset" form for contiguous globals).

kind values:

  • "stroff": struct-offset reference. Requires struct, optional delta.

  • "offset": absolute offset / pointer. Optional target_addr.

  • "hex" | "dec" | "char" | "binary" | "octal": numeric format.

  • "stkvar": stack-variable reference (function-local).

Inputs: items (required), instance_id. Returns: result

set_typeApply a C type to an entityC

Apply types (function/global/local/stack)

Inputs: edits (required), instance_id. Returns: result

stack_frameList function stack variablesC
Read-only

Return stack variables for function address(es).

Inputs: addrs (required), instance_id. Returns: result

survey_binaryOne-call binary surveyA
Read-only

Get a compact overview of the binary in one call. Returns file metadata, segment layout, entry points, statistics, top 15 strings and functions ranked by xref count (functions include classification: thunk/wrapper/leaf/dispatcher/ complex), imports by category, and call graph summary. Use this as your FIRST tool call when starting analysis. Do not call list_funcs, imports, or find_regex separately for triage — this returns all of that. Use detail_level='minimal' for binaries with >10k functions.

Inputs: instance_id, detail_level. Returns: _note, metadata, segments, statistics, +5 more

trace_data_flowFollow xrefs across multiple hopsA
Read-only

Follow cross-references from or to an address, automatically traversing multiple hops. Use 'forward' to see where data flows TO (xrefs-from), or 'backward' to see where data flows FROM (xrefs-to). At each node in the traversal, returns the function name, instruction, and whether it's code or data. Use this when you find an interesting string, constant, or global and want to understand every code path that touches it without manually chaining xrefs_to calls. Do not use for call graph traversal — use callgraph for that. max_depth controls how many hops to follow (default 5, max 20).

Inputs: addr (required), direction, max_depth, instance_id. Returns: edges, error, nodes, start, +2 more

type_apply_batchApply multiple type editsC

Apply multiple type edits and return aggregate status.

Inputs: batch (required), instance_id. Returns: ok, failed, applied, results, +1 more

type_inspectInspect a named typeB
Read-only

Inspect named types (size/kind/declaration/members).

Inputs: queries (required), instance_id. Returns: result

type_queryQuery local types with filtersB
Read-only

Query local types with structured filters/projection-friendly output.

Inputs: queries (required), instance_id. Returns: result

undefineUndefine items to raw bytesC

Undefine item(s) at address(es), converting back to raw bytes.

Inputs: items (required), instance_id. Returns: result

xref_queryGeneric xref queryC
Read-only

Query xrefs with direction/type filters and pagination.

Inputs: queries (required), instance_id. Returns: result

xrefs_toCross references to an addressA
Read-only

Return xrefs to address(es) or named symbols, capped per target with truncation flag.

Inputs: addrs (required), limit, instance_id. Returns: result

xrefs_to_fieldXrefs to a structure fieldC
Read-only

Get cross-references to structure fields

Inputs: queries (required), instance_id. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.8/5.0

    Scored across 79 tools

    Disambiguation2/5

    Multiple tools have overlapping or indistinguishable purposes: execute_python, py_eval, and py_exec_file all run Python in IDA; save_database and idb_save both save; list_funcs, func_query, and lookup_funcs all retrieve functions; imports/imports_query and xrefs_to/xref_query duplicate. Descriptions provide some guidance, but an agent will struggle to choose reliably among many near-equivalent tools.

    Naming Consistency3/5

    Most names use snake_case, but conventions are mixed: some are bare nouns or verbs (decompile, disasm, imports, callees, callgraph), others use get_/list_/set_ verbs, and duplicate concepts are named inconsistently (save_database vs idb_save, py_eval vs execute_python). The naming is readable but not predictable.

    Tool Count1/5

    79 tools is far beyond a well-scoped set for this server, even for a broad reverse-engineering domain. Many tools are redundant or narrowly specialized variants that should be consolidated, making the surface overwhelming.

    Completeness4/5

    The set covers database lifecycle, analysis, decompilation/disassembly, xrefs, types, patching, renaming, signatures, and reporting. Some minor gaps exist, such as no explicit exports-listing tool and limited structured deletion beyond undefine/delete_stack, but Python execution provides workarounds.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Enables AI agents to interact with IDA Pro databases and GUI, supporting reverse engineering tasks such as analyzing binaries and querying open files via natural language.
      6
      31 npm
      3,410 PyPI
      1,544
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to inspect, reverse engineer, decompile, and operate on binaries through IDA Pro, including headless and GUI sessions, over stdio or Streamable HTTP.
      31 npm
      MIT
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables AI assistants to drive IDA Pro for reverse engineering and binary analysis, including running Python scripts inside the disassembler, extracting strings, imports, exports and functions, searching for immediate values, text and byte sequences, and retrieving disassembly for address ranges.
      -
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables AI assistants to interact with IDA Pro for reverse engineering and binary analysis tasks. Supports executing Python scripts, retrieving binary strings, imports, exports, and functions, and searching immediate values, text, and byte sequences, plus disassembly.
      -