[PR #1544] [MERGED] feat(ida): support optional native IDA Free MCP in attached mode #2960

Closed
opened 2026-10-17 21:12:17 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/1544
Author: @imissapixel
Created: 10/10/2026
Status: ✅ Merged
Merged: 10/12/2026
Merged by: @N0zoM1z0

Base: main ← Head: feat/ida-free-native-mcp


📝 Commits (9)

  • 0b60a2c feat(ida): support optional native IDA Free MCP in attached mode
  • c9c40f6 fix(ida): reconcile native bridge with main and verify function switching
  • 0294a68 Merge remote-tracking branch 'origin/main' into codex/fold-pr-1544
  • e2c9ec4 docs(ida): pin the corrected native navigation prerequisite
  • 8fbe06b fix(ida): correlate every procedure lookup with its requested query
  • 990bd8e perf(ida): batch native lookups and narrow literal search
  • 74aea7e chore: sync latest main for native IDA verification
  • a530446 fix(ida): preserve relationship coverage and require native switching proof
  • 3a763d4 test(ida): verify unknown caller coverage with IDA Pro

📊 Changes

19 files changed (+1524 additions, -149 deletions)

View changed files

📝 README.md (+1 -1)
📝 docs/ida-provider.md (+35 -5)
📝 docs/testing.md (+8 -3)
➕ experiments/analysis-efficiency/ida-native-windows.md (+101 -0)
📝 scripts/verify-real-ida.mjs (+59 -2)
📝 src/ida/IdaConfiguration.ts (+37 -27)
📝 src/ida/IdaMcpConnection.ts (+46 -1)
➕ src/ida/IdaNativeProtocol.test.ts (+713 -0)
➕ src/ida/IdaNativeProtocol.ts (+115 -0)
📝 src/ida/IdaOperationFailures.test.ts (+4 -0)
📝 src/ida/IdaOperationRunner.ts (+203 -79)
📝 src/ida/IdaProvider.ts (+6 -3)
📝 src/ida/IdaProviderCapabilities.ts (+19 -8)
📝 src/ida/IdaSessionClient.ts (+27 -6)
📝 tests/boundary/mcp/idaTransport.test.ts (+42 -4)
📝 tests/boundary/providers/ida/calleeRelationships.test.ts (+23 -0)
➕ tests/boundary/providers/ida/verifierRequirements.test.ts (+68 -0)
📝 tests/conformance/ida/inventory.c (+5 -1)
📝 tests/fixtures/idaMcp.ts (+12 -9)

📄 Description

Summary

Add an explicit attached protocol: "native" registration for the IDA Free/Pro native MCP plugin, preserving the existing legacy Python MCP path. Native headless mode is rejected. Preserve input SHA-256 checks, complete producer observations, unavailable callers, and the user's open GUI database; close releases the MCP connection only.

The native plugin owns GUI output identity. Reliable function switching requires upstream 1.1.3 or a build including the merged navigation fix. REA does not repair stale widget text. The revised real verifier requires --second-procedure with a unique nonempty --second-marker, checks that marker is absent from the first function and present in the second, then verifies restoration of the first function. The plugin's listener/firewall and cloud-decompiler prerequisites remain documented.

Contributor preservation

Keep imissapixel's original commit and PR as the canonical contribution. Folded the reconciliation, adapter profile naming, verifier correction, and documentation from #2236 without rewriting that history.

Current follow-up: correctness and performance

Batch unique native callee lookups, correlate every reply with its query, and narrow literal-search candidates conservatively while preserving REA Unicode/case semantics, full source Evidence, pagination and explicit upstream failures. Regex retains the full scan. Native C-string rendering limitations are explicit; live database results are not cached without revision proof.

Verified with Windows IDA Pro 9.3, using the native MCP plugin built from upstream c9d15d98e8a143fc74f6e14037c48f63889b6d6c, including the navigation correction. The only local upstream change bound its listener to loopback. Production CLI/MCP checks passed on the public two-function fixture and an unchanged Windows whoami.exe; neither test executable was run. Attached GUI databases were preserved. Windows IDA Free was not used. No personal paths, raw private observations, or license registration information are published.

Same-main before/after completed tasks: mean warm time 675 → 317 ms; response token estimates 16,618 → 11,509; callee lookup calls 17 → 2; string pages 4 → 1. Fresh-start, overall CPU and memory improvements were not established. Full catalog costs, token-estimation method, CPU, peak memory, two-sample limits and cache experiment are recorded in the verification note. Measurements pin their historical source baseline and do not claim a universal speedup.

Final integrated-head validation: 200 focused tests, serial typecheck/lint/format/knip/metadata checks, architecture guards, test discovery and docs checks passed. Windows IDA Pro native production verification passed again after requiring the switching arguments and preserving unknown dossier caller coverage; real whoami.exe tasks retained the same answers and standalone callee coverage. All 36 CI jobs passed on 3a763d4909eb1f3ac07ad0ab7e745a800736029a. The later requested automated review returned two additional findings concerning native callee truncation and verification value oracles. These are addressed in merged follow-up #2324 (37b7550ec; current-head review without findings and all 36 CI jobs passed), with stronger actual Windows IDA Pro evidence: eight normal production checks and six live response-fault cases. Earlier envelope-only checks did not independently establish string/xref semantic correctness. Final source and boundary checks are recorded above.

Earlier validation and real-provider scope

On the consolidated head: npm run check, npm run docs:check, and test discovery passed; IDA adapter/composition/MCP tests passed (exact final count recorded in the consolidation comment). Verifier syntax validation passed. Review covered both repository standards and the originating proposal; the stale-second-function verifier thread is addressed.

Historical verification is retained with its limits:

  • Original #1544: Linux x64 IDA Free 9.4 under WSL, native plugin 1.1.2 built from cbf92f709d6170f57696d74ab22f870393d6711d with local navigation and earlier compatibility additions. Real CLI/MCP inventory, search, assembly, pseudocode, callees, xrefs, instruction windows, input mismatch rejection, two-function switching and restoration were reported. This predates the stronger marker verifier and does not establish stock 1.1.2 correctness.
  • Folded #2236: Windows IDA Pro 9.3 using the existing legacy Python MCP path. Production CLI/MCP, unique second-function marker, restoration, original-input identity and connection cleanup passed. This validates the revised verifier and legacy path, not the native Windows plugin.
  • This consolidation did not run a real IDA instance. Stock upstream native 1.1.3, native macOS, other Free versions/architectures and broad cloud-decompiler reliability remain unverified by this earlier consolidation; the newer native Windows IDA Pro verification is scoped above. No plugin binary, installer, license handling or automatic GUI startup is bundled.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/1544 **Author:** [@imissapixel](https://github.com/imissapixel) **Created:** 10/10/2026 **Status:** ✅ Merged **Merged:** 10/12/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `feat/ida-free-native-mcp` --- ### 📝 Commits (9) - [`0b60a2c`](https://github.com/morluto/rea/commit/0b60a2ce900457d7d75503b0aa7695e1e5b7ec17) feat(ida): support optional native IDA Free MCP in attached mode - [`c9c40f6`](https://github.com/morluto/rea/commit/c9c40f6f9ee028c2f95372e0170e7d85b355a8d0) fix(ida): reconcile native bridge with main and verify function switching - [`0294a68`](https://github.com/morluto/rea/commit/0294a68738fdc68c22f6699562e17847749cf974) Merge remote-tracking branch 'origin/main' into codex/fold-pr-1544 - [`e2c9ec4`](https://github.com/morluto/rea/commit/e2c9ec4f65391583f502b6300c14a99b84d34ee0) docs(ida): pin the corrected native navigation prerequisite - [`8fbe06b`](https://github.com/morluto/rea/commit/8fbe06b1fb399416cd6caa05adcfa3871a610f18) fix(ida): correlate every procedure lookup with its requested query - [`990bd8e`](https://github.com/morluto/rea/commit/990bd8ecf45c8b236d7fd923af435346ee9b9cb4) perf(ida): batch native lookups and narrow literal search - [`74aea7e`](https://github.com/morluto/rea/commit/74aea7ed64b4d93dcf3abffcd8c78c18683b398f) chore: sync latest main for native IDA verification - [`a530446`](https://github.com/morluto/rea/commit/a5304466695741561fc5a0ddfc6a23f9f159e5d8) fix(ida): preserve relationship coverage and require native switching proof - [`3a763d4`](https://github.com/morluto/rea/commit/3a763d4909eb1f3ac07ad0ab7e745a800736029a) test(ida): verify unknown caller coverage with IDA Pro ### 📊 Changes **19 files changed** (+1524 additions, -149 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+1 -1) 📝 `docs/ida-provider.md` (+35 -5) 📝 `docs/testing.md` (+8 -3) ➕ `experiments/analysis-efficiency/ida-native-windows.md` (+101 -0) 📝 `scripts/verify-real-ida.mjs` (+59 -2) 📝 `src/ida/IdaConfiguration.ts` (+37 -27) 📝 `src/ida/IdaMcpConnection.ts` (+46 -1) ➕ `src/ida/IdaNativeProtocol.test.ts` (+713 -0) ➕ `src/ida/IdaNativeProtocol.ts` (+115 -0) 📝 `src/ida/IdaOperationFailures.test.ts` (+4 -0) 📝 `src/ida/IdaOperationRunner.ts` (+203 -79) 📝 `src/ida/IdaProvider.ts` (+6 -3) 📝 `src/ida/IdaProviderCapabilities.ts` (+19 -8) 📝 `src/ida/IdaSessionClient.ts` (+27 -6) 📝 `tests/boundary/mcp/idaTransport.test.ts` (+42 -4) 📝 `tests/boundary/providers/ida/calleeRelationships.test.ts` (+23 -0) ➕ `tests/boundary/providers/ida/verifierRequirements.test.ts` (+68 -0) 📝 `tests/conformance/ida/inventory.c` (+5 -1) 📝 `tests/fixtures/idaMcp.ts` (+12 -9) </details> ### 📄 Description ## Summary Add an explicit attached `protocol: "native"` registration for the IDA Free/Pro native MCP plugin, preserving the existing legacy Python MCP path. Native headless mode is rejected. Preserve input SHA-256 checks, complete producer observations, unavailable callers, and the user's open GUI database; close releases the MCP connection only. The native plugin owns GUI output identity. Reliable function switching requires upstream 1.1.3 or a build including [the merged navigation fix](https://github.com/0xshlomil/ida-free-mcp/commit/6adf2c615a2a03661059673e9c136ef28d0dc778). REA does not repair stale widget text. The revised real verifier requires `--second-procedure` with a unique nonempty `--second-marker`, checks that marker is absent from the first function and present in the second, then verifies restoration of the first function. The plugin's listener/firewall and cloud-decompiler prerequisites remain documented. ## Contributor preservation Keep imissapixel's original commit and PR as the canonical contribution. Folded the reconciliation, adapter profile naming, verifier correction, and documentation from #2236 without rewriting that history. ## Current follow-up: correctness and performance Batch unique native callee lookups, correlate every reply with its query, and narrow literal-search candidates conservatively while preserving REA Unicode/case semantics, full source Evidence, pagination and explicit upstream failures. Regex retains the full scan. Native C-string rendering limitations are explicit; live database results are not cached without revision proof. **Verified with Windows IDA Pro 9.3**, using the native MCP plugin built from upstream `c9d15d98e8a143fc74f6e14037c48f63889b6d6c`, including the navigation correction. The only local upstream change bound its listener to loopback. Production CLI/MCP checks passed on the public two-function fixture and an unchanged Windows `whoami.exe`; neither test executable was run. Attached GUI databases were preserved. Windows IDA Free was not used. No personal paths, raw private observations, or license registration information are published. Same-main before/after completed tasks: mean warm time 675 → 317 ms; response token estimates 16,618 → 11,509; callee lookup calls 17 → 2; string pages 4 → 1. Fresh-start, overall CPU and memory improvements were **not** established. Full catalog costs, token-estimation method, CPU, peak memory, two-sample limits and cache experiment are recorded in [the verification note](https://github.com/imissapixel/rea/blob/feat/ida-free-native-mcp/experiments/analysis-efficiency/ida-native-windows.md). Measurements pin their historical source baseline and do not claim a universal speedup. Final integrated-head validation: 200 focused tests, serial typecheck/lint/format/knip/metadata checks, architecture guards, test discovery and docs checks passed. Windows IDA Pro native production verification passed again after requiring the switching arguments and preserving unknown dossier caller coverage; real `whoami.exe` tasks retained the same answers and standalone callee coverage. All 36 CI jobs passed on `3a763d4909eb1f3ac07ad0ab7e745a800736029a`. The later requested automated review returned two additional findings concerning native callee truncation and verification value oracles. These are addressed in merged follow-up [#2324](https://github.com/morluto/rea/pull/2324) (`37b7550ec`; current-head review without findings and all 36 CI jobs passed), with stronger actual Windows IDA Pro evidence: eight normal production checks and six live response-fault cases. Earlier envelope-only checks did not independently establish string/xref semantic correctness. Final source and boundary checks are recorded above. ## Earlier validation and real-provider scope On the consolidated head: `npm run check`, `npm run docs:check`, and test discovery passed; IDA adapter/composition/MCP tests passed (exact final count recorded in the consolidation comment). Verifier syntax validation passed. Review covered both repository standards and the originating proposal; the stale-second-function verifier thread is addressed. Historical verification is retained with its limits: - Original #1544: Linux x64 IDA Free 9.4 under WSL, native plugin 1.1.2 built from `cbf92f709d6170f57696d74ab22f870393d6711d` with local navigation and earlier compatibility additions. Real CLI/MCP inventory, search, assembly, pseudocode, callees, xrefs, instruction windows, input mismatch rejection, two-function switching and restoration were reported. This predates the stronger marker verifier and does not establish stock 1.1.2 correctness. - Folded #2236: Windows IDA Pro 9.3 using the existing **legacy Python MCP** path. Production CLI/MCP, unique second-function marker, restoration, original-input identity and connection cleanup passed. This validates the revised verifier and legacy path, not the native Windows plugin. - This consolidation did not run a real IDA instance. Stock upstream native 1.1.3, native macOS, other Free versions/architectures and broad cloud-decompiler reliability remain unverified by this earlier consolidation; the newer native Windows IDA Pro verification is scoped above. No plugin binary, installer, license handling or automatic GUI startup is bundled. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-17 21:12:17 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#2960
No description provided.