[PR #5794] feat(binary-ninja): add GUI MCP analysis provider #7067

Open
opened 2026-11-01 21:45:07 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/5794
Author: @ewrogers
Created: 10/21/2026
Status: 🔄 Open

Base: main ← Head: feat/binary-ninja-macos


📝 Commits (10+)

  • 1273ae2 feat(binary-ninja): add read-only Binary Ninja GUI MCP provider
  • 10f3038 docs(binary-ninja): record macOS ARM64 provider verification
  • cb9095d feat(binary-ninja): align GUI provider with upstream lifecycle contracts
  • 51f2b9f chore(binary-ninja): sync with upstream main
  • 51b3693 chore: merge upstream main and resolve provider conflicts
  • 16f83fb fix(binary-ninja): validate live identity, paging, and auto budgets
  • da0fdf5 chore: merge main into Binary Ninja provider branch
  • 8fcc18d fix(binary-ninja): supervise regex searches in workers
  • 1467359 chore: merge latest main into Binary Ninja provider branch
  • 9e9f3be chore: merge main and preserve IDA registration guidance

📊 Changes

56 files changed (+6290 additions, -203 deletions)

View changed files

📝 docs/.vitepress/config.ts (+1 -0)
➕ docs/binary-ninja.md (+111 -0)
📝 docs/cli.md (+2 -2)
📝 docs/index.md (+1 -1)
📝 docs/installation.md (+8 -8)
📝 docs/testing.md (+22 -0)
📝 package.json (+1 -0)
📝 scripts/ci/scopes.mjs (+1 -0)
📝 scripts/lib/module-boundaries.mjs (+1 -0)
📝 scripts/lib/test-projects.mjs (+1 -1)
➕ scripts/verify-real-binary-ninja.mjs (+439 -0)
📝 src/android/JadxDoctor.ts (+4 -2)
📝 src/application/AnalysisContextQueries.test.ts (+1 -1)
📝 src/application/AnalysisSettings.test.ts (+16 -0)
📝 src/application/DoctorProviderIds.ts (+1 -0)
📝 src/application/binary/BinarySessionOpen.ts (+1 -1)
📝 src/application/native/NativeFunctionMatchingService.ts (+4 -2)
➕ src/binaryNinja/BinaryNinjaConfiguration.test.ts (+142 -0)
➕ src/binaryNinja/BinaryNinjaConfiguration.ts (+103 -0)
➕ src/binaryNinja/BinaryNinjaDoctor.ts (+55 -0)

...and 36 more files

📄 Description

Summary

Adds a Binary Ninja 6 GUI MCP provider, including Personal editions, for analysis of an executable already open in the GUI.

CLI/MCP → digest-bound BinaryView → read-only live Evidence

Supports inventories, searches, Pseudo C, assembly, instructions, and reference queries. REA changes the shared active-view selection and restores the original selection on close; it never launches the target or saves/closes the analyst's database. Unsupported facets and incomplete reference coverage stay explicit.

Builds on @BigLongs0's closed, unmerged #4886 with original commit attribution preserved. Refs #1551. The GUI proposal remains separate from headless #7041; maintainer scope approval is still pending.

Evidence

  • Before: these CLI/MCP workflows could not use Binary Ninja's built-in GUI server. After: select binary-ninja through the existing provider settings and receive digest-bound Evidence.
  • Current revision, 0cb1309d5, merged with main at 6be6596aa: Node 24.22.1 / npm 11.16.0; npm run check:fast passed; 107 focused Binary Ninja, HTTP-boundary, and MCP schema-helper tests passed; all 2,994 test files discovered exactly once.
  • Regressions cover complete long-string reads, UTF-32 decoding, leading U+FEFF preservation, and provider-filtered regex controls, shared paged-result and string memory admission, malformed memory payloads, exact caller cancellation causes (including final-reply aborts), lost selection replies followed by startup retries, incomplete terminal pages, missing rendered code lines, and normalized authentication redaction in transport/tool errors. Header validation rejects malformed Fetch inputs with credential-safe guidance and normalizes valid headers. Shared test fixtures register cleanup before setup writes. Transport tests use a loopback server; provider tests use a recording fixture.
  • Historical live verification at 16f83fb57: Binary Ninja Personal 6.0.10905 on macOS ARM64 passed all eight production CLI/MCP checks, including function switching, selection restoration, and unchanged input bytes. This was not rerun on the current revision. Earlier Windows verification belongs to the original proposal.
  • The verifier requests complete Evidence and validates actual advertised schemas through artifactMcpCall, preserving request timeouts. Shared-helper stdio tests cover malformed and missing schemas, reconnects, and timeouts. HTTP tests cover malformed UTF-8 in JSON/SSE, startup, pending-call settlement, and cancellation. The live GUI verifier was not rerun.
  • The full deterministic suite and additional live platforms/targets were not run for this refresh.

Merge Danger

Door: two-way. The provider is optional and can be reverted.

Blast Radius: providers. Registration parsing is shared with IDA; provider selection and doctor integration change. The GUI selection is shared with other MCP clients.

Raw bytes are rehashed before and after requests, adding MCP traffic; earlier small-fixture measurements were 24 versus 16 calls and 72 versus 52 ms median elapsed time. Those measurements were not rerun. GUI edits are not locked, so edits made and undone between checks remain unobservable. Results stay live rather than replaying snapshots.

Author readiness

Human owner: @ewrogers

  • 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.

🔄 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/5794 **Author:** [@ewrogers](https://github.com/ewrogers) **Created:** 10/21/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feat/binary-ninja-macos` --- ### 📝 Commits (10+) - [`1273ae2`](https://github.com/morluto/rea/commit/1273ae229a330d7efb3ea7e37543e300f595696a) feat(binary-ninja): add read-only Binary Ninja GUI MCP provider - [`10f3038`](https://github.com/morluto/rea/commit/10f30380fa90aa028e5c266c9bdb60bc0abfedf3) docs(binary-ninja): record macOS ARM64 provider verification - [`cb9095d`](https://github.com/morluto/rea/commit/cb9095d03bb28f2942b3334567f6d6831f487f58) feat(binary-ninja): align GUI provider with upstream lifecycle contracts - [`51f2b9f`](https://github.com/morluto/rea/commit/51f2b9f5412bebe92df965eedef4b6cb8211292c) chore(binary-ninja): sync with upstream main - [`51b3693`](https://github.com/morluto/rea/commit/51b369354ccf0481419587882ff865988bb5f3e0) chore: merge upstream main and resolve provider conflicts - [`16f83fb`](https://github.com/morluto/rea/commit/16f83fb57f750ff2912457af04f4c0c2e872317e) fix(binary-ninja): validate live identity, paging, and auto budgets - [`da0fdf5`](https://github.com/morluto/rea/commit/da0fdf5d3333f92881e591cd13b05b4c8b6e9e03) chore: merge main into Binary Ninja provider branch - [`8fcc18d`](https://github.com/morluto/rea/commit/8fcc18dc6788f3a2444d911c81a0219d3e91d7a4) fix(binary-ninja): supervise regex searches in workers - [`1467359`](https://github.com/morluto/rea/commit/1467359f4fa501b6de66b0ec531d810ec453572c) chore: merge latest main into Binary Ninja provider branch - [`9e9f3be`](https://github.com/morluto/rea/commit/9e9f3be224e839be11ae25942025bcb7efd0631f) chore: merge main and preserve IDA registration guidance ### 📊 Changes **56 files changed** (+6290 additions, -203 deletions) <details> <summary>View changed files</summary> 📝 `docs/.vitepress/config.ts` (+1 -0) ➕ `docs/binary-ninja.md` (+111 -0) 📝 `docs/cli.md` (+2 -2) 📝 `docs/index.md` (+1 -1) 📝 `docs/installation.md` (+8 -8) 📝 `docs/testing.md` (+22 -0) 📝 `package.json` (+1 -0) 📝 `scripts/ci/scopes.mjs` (+1 -0) 📝 `scripts/lib/module-boundaries.mjs` (+1 -0) 📝 `scripts/lib/test-projects.mjs` (+1 -1) ➕ `scripts/verify-real-binary-ninja.mjs` (+439 -0) 📝 `src/android/JadxDoctor.ts` (+4 -2) 📝 `src/application/AnalysisContextQueries.test.ts` (+1 -1) 📝 `src/application/AnalysisSettings.test.ts` (+16 -0) 📝 `src/application/DoctorProviderIds.ts` (+1 -0) 📝 `src/application/binary/BinarySessionOpen.ts` (+1 -1) 📝 `src/application/native/NativeFunctionMatchingService.ts` (+4 -2) ➕ `src/binaryNinja/BinaryNinjaConfiguration.test.ts` (+142 -0) ➕ `src/binaryNinja/BinaryNinjaConfiguration.ts` (+103 -0) ➕ `src/binaryNinja/BinaryNinjaDoctor.ts` (+55 -0) _...and 36 more files_ </details> ### 📄 Description ## Summary Adds a Binary Ninja 6 GUI MCP provider, including Personal editions, for analysis of an executable already open in the GUI. `CLI/MCP → digest-bound BinaryView → read-only live Evidence` Supports inventories, searches, Pseudo C, assembly, instructions, and reference queries. REA changes the shared active-view selection and restores the original selection on close; it never launches the target or saves/closes the analyst's database. Unsupported facets and incomplete reference coverage stay explicit. Builds on @BigLongs0's closed, unmerged #4886 with original commit attribution preserved. Refs #1551. The GUI proposal remains separate from headless #7041; maintainer scope approval is still pending. ## Evidence - **Before:** these CLI/MCP workflows could not use Binary Ninja's built-in GUI server. **After:** select `binary-ninja` through the existing provider settings and receive digest-bound Evidence. - **Current revision, `0cb1309d5`, merged with `main` at `6be6596aa`:** Node 24.22.1 / npm 11.16.0; `npm run check:fast` passed; 107 focused Binary Ninja, HTTP-boundary, and MCP schema-helper tests passed; all 2,994 test files discovered exactly once. - Regressions cover complete long-string reads, UTF-32 decoding, leading U+FEFF preservation, and provider-filtered regex controls, shared paged-result and string memory admission, malformed memory payloads, exact caller cancellation causes (including final-reply aborts), lost selection replies followed by startup retries, incomplete terminal pages, missing rendered code lines, and normalized authentication redaction in transport/tool errors. Header validation rejects malformed Fetch inputs with credential-safe guidance and normalizes valid headers. Shared test fixtures register cleanup before setup writes. Transport tests use a loopback server; provider tests use a recording fixture. - **Historical live verification at `16f83fb57`:** Binary Ninja Personal 6.0.10905 on macOS ARM64 passed all eight production CLI/MCP checks, including function switching, selection restoration, and unchanged input bytes. This was **not rerun on the current revision**. Earlier Windows verification belongs to the original proposal. - The verifier requests complete Evidence and validates actual advertised schemas through `artifactMcpCall`, preserving request timeouts. Shared-helper stdio tests cover malformed and missing schemas, reconnects, and timeouts. HTTP tests cover malformed UTF-8 in JSON/SSE, startup, pending-call settlement, and cancellation. The live GUI verifier was not rerun. - The full deterministic suite and additional live platforms/targets were not run for this refresh. ## Merge Danger **Door:** two-way. The provider is optional and can be reverted. **Blast Radius:** providers. Registration parsing is shared with IDA; provider selection and doctor integration change. The GUI selection is shared with other MCP clients. Raw bytes are rehashed before and after requests, adding MCP traffic; earlier small-fixture measurements were 24 versus 16 calls and 72 versus 52 ms median elapsed time. Those measurements were not rerun. GUI edits are not locked, so edits made and undone between checks remain unobservable. Results stay live rather than replaying snapshots. ## Author readiness Human owner: @ewrogers - [x] 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. - [x] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [x] I declare this PR ready for initial maintainer review. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#7067
No description provided.