Skip to content

feat(ida): support optional native IDA Free MCP in attached mode - #1544

Merged
N0zoM1z0 merged 9 commits into
morluto:mainfrom
imissapixel:feat/ida-free-native-mcp
Oct 12, 2026
Merged

N0zoM1z0 merged 9 commits into
morluto:mainfrom
imissapixel:feat/ida-free-native-mcp

Conversation

@imissapixel

@imissapixel imissapixel commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

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 feat(ida): support optional native IDA Free MCP in attached mode #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 fix(ida): update native bridge for main and verify with IDA Pro #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.

@imissapixel
imissapixel marked this pull request as ready for review October 10, 2026 11:41
@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.

@morluto

morluto commented Oct 12, 2026

Copy link
Copy Markdown
Owner

@codex

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

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 ✅ Completed 2026-10-12T19:08:54.382164Z 3a763d4 Manual request
ℹ️ 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 chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0b60a2ce90

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/verify-real-ida.mjs Resolved

@dandgabr dandgabr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consolidated review

  • P1 — Verify the second function's pseudocode identity. In scripts/verify-real-ida.mjs, the --second-procedure check only asserts that the returned pseudocode is a nonempty string. The documented native plugin stale-view behavior can therefore return the original function's pseudocode and still pass, while the later restoration check also succeeds against that same original body. Validate the second result against a procedure-specific expected marker or another identity check before reporting function switching as verified. This consolidates the still-applicable inline review finding; no additional actionable findings were confirmed.

…hing

Merge the PR 1544 native IDA bridge onto current main and validate two-function pseudocode identity with a unique second-body marker. Preserve current input-error and GUI-effect semantics, identify the adapter without implying an IDA edition, and document the upstream listener and navigation limits.

Verified on Windows IDA Pro 9.3 through the attached legacy MCP workflow: production CLI/MCP analysis, distinct-function pseudocode, return to the original function, target identity, and cleanup. Native Windows plugin and IDA Free runtime workflows were not verified in this follow-up. No private target paths or license details are included.
@morluto

morluto commented Oct 12, 2026

Copy link
Copy Markdown
Owner

Kept this earlier PR and your original commit as canonical. Folded #2236 without rewriting your history, including the unique-second-function verifier correction and adapter profile naming. Updated the upstream prerequisite to the now-merged navigation fix; historical patched Linux native and Windows legacy evidence remain separate.

Standards and proposal reviews are complete, with their findings addressed. Current consolidated validation: 130 IDA adapter/composition/MCP tests passed, plus full source checks, docs checks, discovery and verifier syntax. The inline verifier thread is addressed. Current native 1.1.3 and native Windows/macOS remain unverified. #2236 can now close as folded into this PR.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e2c9ec4f65

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/ida/IdaOperationRunner.ts Resolved
morluto and others added 3 commits October 13, 2026 02:30
Bind each lookup reply to its query, batch unique native callees, and fetch conservative literal string candidates while preserving Unicode, case, pagination, and raw source Evidence. Preserve explicit native search failures and describe unknown string representations.

Verified with Windows IDA Pro 9.3 and the native MCP plugin built from c9d15d98e8a143fc74f6e14037c48f63889b6d6c with a loopback listener. Production CLI/MCP parity and two-function switching passed on the public fixture; equivalent tasks passed on Windows whoami.exe. Windows IDA Free was not used. No personal paths or license registration information are included.

Validation: 182 focused tests, static checks, architecture guards, test discovery, and docs checks passed. Same-main measurements show warm task time 675 to 317 ms and estimated response tokens 16618 to 11509; cold-start, overall CPU, and memory improvement were not established. Detailed scope and measurements are in experiments/analysis-efficiency/ida-native-windows.md.
@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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8fbe06b1fb

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/verify-real-ida.mjs Resolved
Comment thread src/ida/IdaOperationRunner.ts Resolved
morluto and others added 2 commits October 13, 2026 02:50
Assert unknown dossier caller coverage in the production native verifier and record its required switching arguments and observed coverage scope.

Verified the maintainer-integrated implementation with Windows IDA Pro 9.3 and the native MCP plugin built from c9d15d98e8a143fc74f6e14037c48f63889b6d6c with a loopback listener. Production CLI/MCP parity, distinct-function switching/restoration, input identity and connection cleanup passed. Windows IDA Free was not used. No personal paths or license registration information are included.

Validation: 200 focused tests, serial static checks, architecture guards, test discovery and docs checks passed. Performance measurements retain their historical source pins and stated limits.
@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.

@N0zoM1z0

Copy link
Copy Markdown
Collaborator

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3a763d4909

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/ida/IdaNativeProtocol.ts Resolved
Comment thread scripts/verify-real-ida.mjs Resolved
N0zoM1z0 added a commit that referenced this pull request Oct 13, 2026
Reject native callee successes without an explicit truncation marker while preserving provider failure reasons. Verify positive procedure inventory/search and function-result parity in the real-provider lane; support independent string/xref oracles and label their absence as unverified.

Verified with Windows IDA Pro 9.3: eight normal production CLI/MCP checks passed, and six real-provider response-fault cases reproduced old false positives and validated the correction. Windows IDA Free was not used. No personal paths or license registration information are included.

Repair inconsistent complete-file Ghidra test probe sizes after the shared ELF-header validation change, deriving sizes from the fixture buffers. Reproduced the three failures before the correction; 115 related installation/doctor and ELF tests pass afterward. Runtime parsing and installation behavior are unchanged; no real-Ghidra verification is claimed.

207 focused IDA tests and static/documentation checks passed. Automated review completed on d1e0b10 without findings. CI run 38327862093 passed all 36 jobs, including Windows, all six test shards, coverage/timing, and real Apple CLI/MCP workflows.

Follow-up to #1544.
@morluto morluto added enhancement New feature or request area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior labels Oct 14, 2026
@morluto morluto added area: mcp MCP server, transport, and tool registration 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 area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior enhancement New feature or request provider: ida Analysis provider / engine: ida

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants