Skip to content

feat(ida): support the official Hex-Rays IDA MCP headlessly - #4813

Merged
morluto merged 33 commits into
morluto:mainfrom
NaiJii:feat/ida-hexrays-mcp-profile
Nov 20, 2026
Merged

morluto merged 33 commits into
morluto:mainfrom
NaiJii:feat/ida-hexrays-mcp-profile

Conversation

@NaiJii

@NaiJii NaiJii commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds a hexrays protocol to the IDA provider so REA can use the official Hex-Rays IDA MCP (HexRaysSA/ida-mcp) with either the idalib or idat headless backend. Before this change, REA rejected the server at startup because it exposes database reads through execute_python.

Related to #1416. The maintainer-approved idat scope and remaining live verification are tracked in #12921.

Problem and expected behavior

A registration such as

{ "command": "ida-mcp", "args": ["stdio", "--agent=rea"], "mode": "headless", "protocol": "hexrays" }

now supports the same analyst operations as the database-supervisor headless profile: inventory and search, lookup, containment, pseudocode, assembly, instruction windows, callees, xrefs and dossiers. REA analyzes a private copy of the selected executable or packed .idb or .i64. The registration uses the existing Hex-Rays installation. To force idalib, set IDA_NEXUS_IDALIB_ONLY=1 in the registration’s env.

Change and scope

  • bridge/ida/hexrays_queries.py (new, packaged): a fixed, read-only query module. REA sends it with one trailing _rea_query(name, arguments_json) line, so caller input reaches it only as JSON data. Its replies use the database-supervisor shapes REA already validates.
  • IdaHexRaysProtocol.ts (new): the catalog, the open/list/close schemas, and runHexRaysQuery, which records execute_python, the query, its arguments and the bridge SHA-256 rather than the module body.
  • IdaOperationRunner: an optional invoke hook. For hexrays, the runner keeps its modern parsing and records the actual upstream observation.
  • IdaSessionClient verifies that the open reply and inventory agree on the owned lease, backend, and private input. It checks IDA’s recorded hash when available for executable targets and the opened database path for saved IDBs. Cleanup retains the workspace while inventory lists the lease or any database path inside it.
  • IdaConfiguration: protocol: "hexrays" requires mode: "headless" and a stdio registration, because Hex-Rays leases belong to the server process.
  • Startup profile mismatches report advertised_tools. When a registration without protocol reaches a Hex-Rays server, the message and recovery name the hexrays registration.
  • IdaMcpConnection: isError replies throw IdaToolRejection, a subclass of AnalysisProtocolError. Lifecycle code can then tell a completed rejection apart from an unreadable or missing reply.
  • scripts/verify-real-ida.mjs accepts --expected-backend idat or --expected-backend idalib. It verifies the backend that served CLI and MCP reads, checks release by workspace path, and verifies that the original target stays byte-identical and gains no sibling files.
  • scripts/verify-packed-bridge.mjs: requires and parses the packed Hex-Rays bridge.
  • docs/providers/ida-provider.md documents registration, backend selection, cleanup, and verification.

Not included: attached use or databases already open in the IDA GUI (#1416 use case 4), HTTP registrations, direct callers, and any forwarding of caller Python. REA never calls save_database.

Contract and boundary impact

  • Semantic owner and earliest changed stage: IDA provider registration (IdaConfiguration) and upstream lifecycle (IdaSessionClient).
  • Maintainer scope approval is recorded in [Design] Support the Hex-Rays idat headless worker #12921. REA uses the registered stdio MCP server and its headless IDA worker. The idat worker uses IDA’s Python and installed plugins. Live verification of the current patch remains required before integration.
  • CLI and MCP/tool-catalog contract: unchanged. Operations and output contracts are the existing IDA ones.
  • Provider, bridge, target-format, or platform compatibility: new optional protocol. Existing registrations behave as before.
  • Evidence records the upstream tool (execute_python), bridge digest, and bound backend (raw_result.worker_backend). The compatibility profile is hexrays-ida-mcp.
  • REA opens the private copy and refuses GUI backends. A close reply confirms release of REA’s lease. Cleanup also checks inventory for any path inside the workspace, including an unleased database held by a peer or a worker still shutting down. Hex-Rays can flush and repack the private database.
  • Generated metadata, package, or installation impact: package.json#files adds bridge/ida/hexrays_queries.py. Nothing is installed.

Expected effects:

  • Read existing files or captured data.
  • Launch or attach to a process. (The registered stdio MCP server starts a managed idalib or idat worker.)
  • Inject instrumentation or run scripts/code. (A fixed REA query module inside IDA, never inside the target.)
  • Change process memory, registers, files, or configuration. (Files only: the private copy and its .i64 inside REA's workspace. Upstream Hex-Rays MCP session traces under ~/.idapro/mcp/sessions/. No process memory.)
  • Contact network services. (Upstream only: uvx package resolution and IDA licensing. REA makes no network calls.)
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

Evidence and regression coverage

  • Tests added or updated:

    • src/ida/IdaHexRaysProtocol.test.ts with a stateful RecordingHexRaysIdaMcp fixture:
      • the registration boundary
      • full lease, read, and release for both backends, including backend provenance and refusal when the open reply disagrees with inventory
      • workspace retention during peer ownership or worker shutdown, followed by cleanup retry
      • refusal when an idat database path lies outside the private workspace or IDA reports a conflicting executable hash
      • a profile mismatch naming execute_python, and a protocol-less registration pointed at Hex-Rays naming the hexrays registration
      • GUI refusal, with no close_database call and the workspace retained
      • a lost open reply, both with a late lease (adopted and released) and with none (workspace retained)
      • retention after a generic open error with empty inventory, followed by observation of a late unleased worker
      • a rejected close, both released and retained, and retried on the next close
      • a Python round trip of the generated _rea_query line with adversarial lookup names
    • bridge/ida/test_hexrays_queries.py (8 tests, added to npm run test:python): runs the bridge as execute_python would, against IDA module stand-ins. It covers paging and cursors, the snapshot bound, failure rows, callees keeping interior, non-function and pointer-slot targets, call-graph entries only, and xrefs excluding ordinary flow and duplicates.
  • Base reproduction: on the base revision, a Hex-Rays registration fails at startup with missing_tools covering the whole database-supervisor catalog.

  • Remaining proof gaps:

    • Full REA idat verification is pending on Linux and macOS. Windows, PE, and large-target coverage remain unverified. The bridge holds one enumeration snapshot, such as the full string list, while it is paged.
    • Every read resends the module (about 11 KB). Local reads took about 20–30 ms each; no before/after performance comparison was made.
    • Health reads during auto-analysis drain on cancellation rather than abort.
  • Observed, derived, and inferred claims remain distinguishable.

  • Artifact identity, source provenance, and failed attempts remain preserved.

  • Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.

Validation on the current head

At 52af35a144, the bridge uses typed IDA call references for graph edges and keeps Python execution budgets within the MCP deadline. The verifier's --verify-peer-cleanup option checks that a second connection retains the private workspace until its lease is released. 539 source tests and 8 Python bridge tests passed. The verifier also passed end to end through the production CLI and MCP with a simulated two-client upstream. A licensed IDA run remains pending.

The earlier startup-cleanup fix in fce441e54d treats generic Hex-Rays open errors as unverified startup outcomes. Nexus can return an error while a worker is still starting, so REA retains the private workspace even when inventory is initially empty. A regression covers the error, empty inventory, and late unleased worker. The 129 focused source tests, 7 compiled CLI startup tests, static checks, formatting, and documentation checks passed locally.

Earlier local checks for b3fe304795: 535 source tests, 22 additional compiled-boundary tests, and 8 Python bridge tests passed. Static, formatting, and documentation checks passed. These runs included simulated IDA backends.

A live idat run was attempted with a source-built arm64 Mach-O fixture. The verifier stopped at preflight because this workspace lacks a licensed IDA installation and a REA_IDA_MCP_CONFIG registration. No live result is claimed for this head.

Before merge, run the live verifier with --expected-backend idat --verify-peer-cleanup on licensed Linux and macOS hosts with the official plugin, a source-built executable, and a saved database. Run a forced-idalib control as well. #12921 tracks the checklist. The Linux contributor report used an earlier patch, and the macOS report exercised the upstream server and query bridge.

Historical validation

  • npm run test:local -- src/ida/*.test.ts tests/composition/idaProvider.test.ts: 20 files, 338 tests passed.
  • npm run test:focused -- tests/boundary/cli/idaStartupAttributionCli.test.ts: passed.
  • Production CLI with a protocol-less registration against the real Hex-Rays server: the error reported the six advertised tools and recommended "protocol": "hexrays".
  • npm run test:python: passed, including 8 new bridge tests.
  • npm run check:fast: typecheck and lint passed.
  • npm run verify:test-discovery: all test files discovered exactly once.
  • npm run docs:check: passed.
  • npx oxfmt --check .: passed.
  • npm run verify:ida -- --target <x86-64 ELF fixture> --procedure rea_fixture_add --expected-xref <call site>: passed (Linux x64, Hex-Rays IDA MCP 20261008.0.1).
  • The same with --expected-string, on the fixture plus one string literal: passed with no unverified items.
  • The same on a statically linked AArch64 ELF build of the fixture (--expected-xref taken from the decoded BL instruction): passed. main's callees came from the call-graph query.
  • All three runs repeated after the review fixes: passed, including the new no-sibling-files check.

Compatibility, safety, and release

  • Breaking changes or migration steps: none. protocol gains a value; existing registrations are unchanged.
  • Real Hopper/Ghidra, browser, or OS coverage: not applicable. IDA coverage is listed above.
  • Package or release metadata impact: one bridge file added to files.
  • Security, privacy, process, or containment review: the bridge is fixed and read-only, and its digest is recorded. Caller input is JSON data, never source. Stdio only.

Author readiness

Human owner: @NaiJii

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

Conflict-resolution validation (2026-11-05)

Merged current main into this branch, preserving upstream profile ownership, cancellation, target-file cleanup and isolated package verification. Updated the Hex-Rays bridge and database fixtures for those contracts.

  • Node 24.22.1 / npm 11.16.0; check:fast passed.
  • Selected source tests: 27 files, 528 tests passed. Compiled CLI/MCP, target admission and packed-bridge boundaries: 6 files, 139 passed, 2 skipped.
  • Python tests: 51 bridge tests (including Hex-Rays) and 93 analysis-efficiency tests passed. Documentation, formatting and test discovery passed.
  • At that revision, live Linux x64 CLI verification failed because the server reported a backend outside the then-supported gui and idalib schema. The same refusal occurred with ida-mcp==20261008.0.1. The current patch accepts idat and still requires a new live run.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-17T14:38:20.151158Z fd23f10 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@greptile-apps

greptile-apps Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5 Tier: plus

[Medium impact] No new blocking code issue was found; the documented licensed-provider checks remain pending before integration.

Summary

Adds the optional hexrays headless profile, fixed Python queries, private saved-database copies, and lease-aware cleanup.

  • Hex-Rays IDA MCP can serve REA's existing analysis reads headlessly.
  • Saved IDA databases can be analyzed through a private Hex-Rays copy.
  • The IDA verifier can check Hex-Rays backends and peer-held cleanup.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Selected executable or saved database] --> B[Create and verify private copy]
  B --> C[Open Hex-Rays lease]
  C --> D[Check inventory and backend]
  D --> E[Check target identity]
  E --> F[Run fixed read-only query]
  F --> G[Keep result and source details]
  G --> H[Release owned lease]
  H --> I{Lease or workspace path still listed?}
  I -- Yes --> J[Retain workspace for retry]
  I -- No --> K[Close connection and remove workspace]
Loading

Reviews (22) · Last reviewed commit: "fix(ida): retain the worker backend in p..." · Reviewed by Greptile

Comment thread bridge/ida/hexrays_queries.py Resolved
Comment thread src/ida/IdaSessionClient.ts Resolved
Hex-Rays IDA MCP serves database reads only through execute_python, so
REA rejected it as an upstream. A `hexrays` headless stdio registration
now leases a private idalib worker through open_database, answers the
existing database-supervisor reads with a fixed, packaged, read-only
query module, and releases the lease with close_database, verified by
list_databases.

Observations record execute_python, the query and the module digest.
Tool errors are typed so a completed rejection is distinguished from an
unknown outcome; an unconfirmed release is retried and a late lease on
the private input is adopted.

Validated IDA source and bridge tests, static checks, docs, and npm run
verify:ida on Linux x64 against x86-64 and AArch64 ELF fixtures.
A registration without `protocol` that reaches the official Hex-Rays
server failed with only the missing database-supervisor tools. Startup
profile failures now report the advertised catalog, and when it is the
Hex-Rays one the message and recovery name the `hexrays` registration.

Refs morluto#1416
Upstream needs IDA 9.4 or later with idalib, Python 3.11 or later, uv
and Git. The profile does not analyze databases open in the IDA GUI, and
the server keeps its own session traces outside REA's workspace.

Refs morluto#1416
@N0zoM1z0
N0zoM1z0 self-requested a review October 17, 2026 16:03
The call scan decoded every head that FuncItems yields. Inline data such
as a jump table can decode as a call and refer to a function or import,
which reported false callees and call-graph edges. Skip non-code heads
before decoding, as disassembly already does.

Refs morluto#1416
The identity and readiness reads around each operation kept only their
parsed result, dropping the bridge digest and any engine output. Keep
them whole as health_observations beside the parsed metadata, in both
successful and partial-failure Evidence.

Refs morluto#1416
Comment thread bridge/ida/hexrays_queries.py Resolved
The packed-bridge verifier has required bridge/ida/hexrays_queries.py
since the Hex-Rays profile landed, but three package tests still built
their member lists without it. The verifier stopped at that file, so 21
cases failed or asserted on the wrong omission.

Refs morluto#1416
A headless open re-ran auto-analysis from the input binary, discarding
the names, types and comments of an existing database and taking far
longer on large targets. Target admission now identifies IDA databases
by their IDA1/IDA2 signature, and the hexrays profile opens a private
copy of one; Hopper and the other IDA profiles reject them.

The copy is required, not incidental: idalib repacks a database when
its last lease is released, even without a save. A database reports
the input it was created from, so the session is bound to the opened
copy's idb_path, and health now reports the input SHA-256 it records.

Validated with resolver, provider and session tests, check:fast,
docs:check and test:changed, plus a real Hex-Rays MCP run against a
1.4 GB SC2 .i64 whose original file was left byte-identical.

Refs morluto#1416
Comment thread scripts/verify-real-ida.mjs Resolved
Resolve package.json, IdaProvider and IdaWorkspace conflicts, then adapt to main's async IDA registration reading:
- add the hexrays-ida-mcp compatibility profile to main's extracted profile construction;
- the synchronous target check now reports an IDA database as unknown, and inspectTargetSupportWithOptions resolves the registration and admits it only for the hexrays protocol (main's universal Mach-O pattern);
- await readIdaConfiguration with a resource scope in the Hex-Rays registration test;
- give main's new Hopper database test target its databaseEngine.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kaoru0822-kitauji

Copy link
Copy Markdown
Collaborator

Merged latest main into this branch (5174ec3) to clear the merge conflict. No force-push; your commits are untouched.

Conflicts

  • package.json: test:python now runs both main's new bridge/pwndbg/test_core_context.py and your bridge/ida/test_hexrays_queries.py.
  • src/ida/IdaWorkspace.ts: kept main's new resolveIdaWorkspaceParent and your expanded IdaWorkspace doc comment.
  • src/ida/IdaProvider.ts: main moved the analysis profile into a local profile shared with a bound client factory. I added your hexrays → "hexrays-ida-mcp" compatibility-profile branch there.

Breakage from the merge (did not compile after merging)
main made readIdaConfiguration (and IdaProvider.#configuration) async, with a required resourceScope. The branch's synchronous inspectTargetSupport read the registration to decide whether an IDA database is supported, so I moved that decision to follow main's existing universal Mach-O pattern:

  • inspectTargetSupport still refuses non-IDA databases as target_format_unsupported. For an IDA .idb/.i64 it now returns unknown ("registration has not been resolved").
  • inspectTargetSupportWithOptions resolves the registration. It admits the database only for protocol: "hexrays", refuses other registrations with your target_kind_unsupported message, and returns unknown if the registration cannot be read. The provider registry already prefers this method, so session.open behaves as before.
  • tests/composition/idaProvider.test.ts: the supervisor-registration refusal now goes through inspectTargetSupportWithOptions. The Hex-Rays database test also asserts the sync unknown → async supported path.
  • src/ida/IdaHexRaysProtocol.test.ts: awaits readIdaConfiguration(path, { resourceScope }) with the same no-op scope IdaConfiguration.test.ts uses.
  • src/hopper/HopperNameInventory.test.ts (new on main): its database target gets databaseEngine: "hopper", which this branch makes required on database targets.

Validation (local macOS, merged head)

  • tsc --noEmit: clean
  • npm run test:focused on all src/ida tests, tests/composition/idaProvider.test.ts, HopperNameInventory and AnalysisProviderRegistry: 22 files, 382 passed
  • python3 -m unittest bridge/ida/test_hexrays_queries.py: 8 passed
  • check:fast, format:check, docs:check, metadata:check: pass

Not verified: a real Hex-Rays ida-mcp run; this machine has no IDA.

@NaiJii

NaiJii commented Oct 21, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the merge. main moved again, so I merged it once more (one conflict, in docs/ida-provider.md).

  • Your async target-support split is correct; I made it read the registration once for both the database and universal Mach-O cases.
  • Real run: verify:ida with Hex-Rays ida-mcp 20261008.0.1 and IDA 9.5b2 idalib on Linux x64 passed on the x86-64 fixture and on its saved .i64. The .i64 held a function renamed in the database, which REA found, and the database stayed byte-identical.
  • tsc, the focused tests (387), check:fast, format:check, docs:check and metadata:check all pass.

@kaoru0822-kitauji

Copy link
Copy Markdown
Collaborator

I merged the latest main into this branch (merge commit, no force-push) and resolved one conflict, in src/ida/IdaConfiguration.ts:

  • main moved the timeoutMs default and ceiling into the exported DEFAULT_IDA_REQUEST_TIMEOUT_MS and MAX_IDA_REQUEST_TIMEOUT_MS constants. The values didn't change.
  • This PR widened protocol to z.enum(["native", "hexrays"]).

The resolution keeps your protocol enum and uses main's constants for timeoutMs. Nothing else changed. Locally, npm run check:fast, npm run format:check, and all 19 src/ida/*.test.ts files (352 tests) passed. CI is running again.

@advokat11

Copy link
Copy Markdown

Tested this branch against the current Hex-Rays ida-mcp release and hit one incompatibility worth handling before merge.

ida-mcp 20261023.0.2 leases idat workers. open_database (with set_current: false) now returns "backend": "idat", and list_databases reports the same value. The output schema describes backend as "gui, idalib, or idat". Because the PR only accepts gui | idalib and then requires idalib, every open_binary fails. The failure shows up as unreadable_output / cleanup_incomplete with backend: Invalid option: expected one of "gui"|"idalib", and the private workspace is kept.

Raw open_database reply from 20261023.0.2:

{ "instance_id": "63fc0d2ac660", "backend": "idat", "status": "current", "recovery": "none", "mcp_id": null }

The uvx --exclude-newer=1s ida-mcp stdio form in the docs always resolves the newest release, so anyone following them gets this version today.

A minimal fix that worked for me: accept idat as a private headless lease and refuse only gui.

--- a/src/ida/IdaHexRaysProtocol.ts
-    backend: z.enum(["gui", "idalib"]),
+    backend: z.enum(["gui", "idalib", "idat"]),
 ...
-          backend: z.enum(["gui", "idalib"]),
+          backend: z.enum(["gui", "idalib", "idat"]),
--- a/src/ida/IdaSessionClient.ts
-    if (opened.backend !== "idalib")
+    // Newer servers lease idat workers; both headless backends are private to this server.
+    if (opened.backend === "gui")
       throw new AnalysisProtocolError(
-        "IDA attached a GUI database instead of a private idalib worker for the private input copy.",
+        "IDA attached a GUI database instead of a private headless worker for the private input copy.",
       );

The inventory mapping already treats any non-gui row as worker, so nothing else needed to change. The test that checks the GUI-refusal message needs the same wording update.

Results with the fix on Linux x64, IDA Pro 9.5 and ida-mcp 20261023.0.2:

  • rea search /usr/bin/true --pattern version and rea decompile /usr/bin/true --procedure main succeed with compatibility_profile: "hexrays-ida-mcp", and the private workspace is released afterwards.
  • src/ida and tests/composition/idaProvider.test.ts pass (440 tests).

Separately, the branch currently conflicts with main in 9 files. Most of the work is in IdaSessionClient.ts, IdaProvider.ts and BinaryTargetResolver.ts, where main introduced idaCompatibilityProfile() and IdaIdentityRefusal. I resolved them locally by adding a hexrays entry to IDA_COMPATIBILITY_PROFILES (identity: "hexrays-ida-mcp", diagnosticIdentity: "hexrays"). I'm happy to share that resolution if it helps the rebase.

@morluto

morluto commented Nov 5, 2026

Copy link
Copy Markdown
Owner

Hey @NaiJii, thanks for putting this together, the addition looks useful. What's left: it has merge conflicts with main in docs/ida-provider.md, package.json, scripts/verify-packed-bridge.mjs and 7 other files (merging main into the branch is fine). Once that's done I'm happy to merge it.

@NaiJii
NaiJii requested a review from gensokyo-dev as a code owner November 5, 2026 09:07
Comment thread src/ida/IdaSessionClient.ts Resolved
@greptile-apps

greptile-apps Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Want your agent to iterate on Greptile's feedback? Try greploops.

@julianxhokaxhiu

Copy link
Copy Markdown

@morluto can you please have a look again at this PR? I think this would be a truly valuable addition to REA as using the other MCP would downgrade the experience while using IDA. Thanks again

@qiyuey

qiyuey commented Nov 17, 2026

Copy link
Copy Markdown

我这边刚在两台 macOS 上配置了 REA 6.9.0 + IDA Pro 9.5,现有 mrexodia 路线已跑通反编译、反汇编和字符串搜索。但两台机器原本都装了 Hex-Rays 官方 MCP,为了接入 REA,还需要额外安装、配置和维护一套桥接依赖。

这个 PR 有实际需求。mrexodia 作者已在 README 中推荐使用官方 MCP,Hex-Rays 的安装说明也建议减少同时启用的其他 IDA MCP。能直接复用用户已有的官方安装,会减少配置和版本管理的负担。mrexodia 的说明、Hex-Rays 的说明。

接着前面关于 idat 的反馈,我补做了一组 macOS 验证。环境是 IDA Pro 9.5、ida-mcp 20261008.0.1、ida-nexus 0.14.2,已安装官方 GUI 插件。打开一份自建 arm64 Mach-O 的独立副本时,open_database 和 list_databases 都返回 backend: "idat"。把当前提交 cb765d2 的 hexrays_queries.py 通过官方 execute_python 执行,健康检查、函数查找、反编译均成功,伪代码与源码一致。释放租约后返回 closed: true,实例列表为空。桥接模块的 8 项 Python 测试也通过。本次验证范围是官方 MCP 和 PR 内的查询模块,完整 REA 链路仍需在修复后验证。

建议优先处理三处:

  1. HexRaysOpenSchema、HexRaysListSchema 和 #openHexRays 统一支持经过确认的 idat 后端。当前提交仍只接受 gui、idalib,会在读取打开结果和清理所需的实例列表时同时失败。继续保留私有路径、租约归属和实例身份检查。
  2. 给 idat 补齐打开、查询、关闭,以及打开失败后的清理测试。已有评论和这次 macOS 实测都遇到了它,适合作为合并前的实际验证项。之前的反馈
  3. 文档列出实际验证的 ida-mcp、ida-nexus 版本和后端选择条件。仅固定 ida-mcp 版本不能保证得到 idalib,上面这组旧版服务器同样返回了 idat。官方文档已说明 GUI 插件会影响 worker 的启动方式,也提供了 IDA_NEXUS_IDALIB_ONLY=1,建议把支持范围和配置方法一起说清楚。官方后端说明

cursoragent and others added 2 commits November 20, 2026 20:22
Keep main's removed legacy attached protocol, provider guide path,
cancellation helpers, and packed-bridge checks, and keep the Hex-Rays
headless profile, private database admission, and query bridge.

Co-authored-by: morluto <[email protected]>
A list_databases row with instance_id null is a live owner, not a stopped
database. Mapping it to the supervisor's released-worker shape made cleanup
delete files another client still held. Unleased rows stay active, so the
private path must leave inventory before the workspace is removed.

Accept idat inventory rows, hash the query bridge with sha256Hex, and
complete databaseEngine on Hopper fixtures added on main.
Comment thread bridge/ida/hexrays_queries.py Resolved
Comment thread docs/providers/ida-provider.md Resolved
Comment thread src/ida/IdaSessionClient.ts Resolved
@morluto
morluto merged commit 6822ebe into morluto:main Nov 20, 2026
53 checks passed
@morluto morluto added area: mcp MCP server, transport, and tool registration enhancement New feature or request provider: ida Analysis provider / engine: ida labels Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: mcp MCP server, transport, and tool registration enhancement New feature or request provider: ida Analysis provider / engine: ida

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants