Skip to content

feat: add network exposure setting and TypeScript MCP bridge (solve #59)#60

Merged
CX330Blake merged 1 commit into
fosdickio:mainfrom
CX330Blake:solve-issue-59
Mar 22, 2026
Merged

feat: add network exposure setting and TypeScript MCP bridge (solve #59)#60
CX330Blake merged 1 commit into
fosdickio:mainfrom
CX330Blake:solve-issue-59

Conversation

@CX330Blake
Copy link
Copy Markdown
Collaborator

  • Add "Expose to Network" setting (mcp.exposeToNetwork) for binding server to 0.0.0.0
  • Fix mcp.port setting to use string type with default "9009"
  • Create TypeScript MCP bridge (binary-ninja-mcp) for npx execution
  • Implement 54 MCP tools mapping to Binary Ninja API endpoints
  • Add CLI options and environment variables for host/port configuration
  • Update documentation for npm package setup

…osdickio#59)

- Add "Expose to Network" setting (mcp.exposeToNetwork) for binding server to 0.0.0.0
- Fix mcp.port setting to use string type with default "9009"
- Create TypeScript MCP bridge (binary-ninja-mcp) for npx execution
- Implement 54 MCP tools mapping to Binary Ninja API endpoints
- Add CLI options and environment variables for host/port configuration
- Update documentation for npm package setup
Copilot AI review requested due to automatic review settings January 17, 2026 13:36
@CX330Blake CX330Blake requested review from fosdickio and removed request for Copilot January 17, 2026 13:37
@CX330Blake
Copy link
Copy Markdown
Collaborator Author

This is really useful to analyze and debugging cross architecture binary! For me, I run Binja on my M3 Macbook and run the LLM agent remotely via ssh. Thus, the LLM can use Binja + gdb to analyze the program easier.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request adds network exposure configuration and creates a standalone TypeScript MCP bridge for Binary Ninja integration.

Changes:

  • Added "Expose to Network" setting to bind server to 0.0.0.0 for remote access
  • Created TypeScript MCP bridge (binary-ninja-mcp) as an npm package with 54 MCP tools
  • Added CLI options and environment variables for host/port configuration in the bridge

Reviewed changes

Copilot reviewed 8 out of 10 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
plugin/init.py Added network exposure and port settings with dynamic config application
bridge/package.json New npm package definition for TypeScript MCP bridge
bridge/package-lock.json Dependency lock file for npm package
bridge/tsconfig.json TypeScript compiler configuration for ES2022 target
bridge/src/index.ts Main entry point with CLI argument parsing and MCP server setup
bridge/src/client.ts HTTP client for Binary Ninja API communication
bridge/src/tools.ts Implementation of 54 MCP tools mapping to Binary Ninja APIs
bridge/README.md Documentation for the TypeScript bridge usage and configuration
README.md Updated main documentation with npm package setup instructions
.gitignore Added bridge/node_modules to ignore list
Files not reviewed (1)
  • bridge/package-lock.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread bridge/package-lock.json
Comment on lines +2 to +8
"name": "@binary-ninja/mcp-server",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@binary-ninja/mcp-server",
Copy link

Copilot AI Jan 18, 2026

Choose a reason for hiding this comment

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

The package name in package-lock.json is "@binary-ninja/mcp-server" but in package.json it's "binary-ninja-mcp". These names should match to avoid confusion and potential issues during package installation and publishing.

Suggested change
"name": "@binary-ninja/mcp-server",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@binary-ninja/mcp-server",
"name": "binary-ninja-mcp",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "binary-ninja-mcp",

Copilot uses AI. Check for mistakes.
Comment thread plugin/__init__.py
try:
plugin.config.server.port = int(port_str)
except ValueError:
pass
Copy link

Copilot AI Jan 18, 2026

Choose a reason for hiding this comment

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

When ValueError is caught during port parsing, the code silently ignores the error with pass. This means an invalid port string will leave the port unchanged, which could be confusing. Consider logging a warning message to inform users that their configured port is invalid and the previous or default value is being used.

Suggested change
pass
bn.log_warn(
f"Invalid MCP port value '{port_str}' in settings; "
f"continuing to use port {plugin.config.server.port}"
)

Copilot uses AI. Check for mistakes.
Comment thread bridge/README.md
## Features

- **Standalone MCP Server**: Run independently with any MCP client
- **50+ Tools**: Full access to Binary Ninja's reverse engineering capabilities
Copy link

Copilot AI Jan 18, 2026

Choose a reason for hiding this comment

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

The documentation claims "50+ Tools" but there are actually 54 tools defined. Consider updating this to be more precise, such as "54 Tools" or "55+ Tools" for consistency and accuracy.

Suggested change
- **50+ Tools**: Full access to Binary Ninja's reverse engineering capabilities
- **54 Tools**: Full access to Binary Ninja's reverse engineering capabilities

Copilot uses AI. Check for mistakes.
Comment thread bridge/package.json
Comment on lines +8 to +10
"bin": {
"binary-ninja-mcp": "./dist/index.js"
},
Copy link

Copilot AI Jan 18, 2026

Choose a reason for hiding this comment

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

The bin field points to "./dist/index.js" but this file won't exist until after the build step. This could cause issues when the package is published to npm. Consider adding a "prepublishOnly" script that runs "npm run build" to ensure the dist folder is built before publishing, or document that users must run "npm run build" before publishing.

Copilot uses AI. Check for mistakes.
Comment thread bridge/src/client.ts
params,
timeout,
});
response.data as T;
Copy link

Copilot AI Jan 18, 2026

Choose a reason for hiding this comment

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

This line has no effect. The expression evaluates the result of casting to T but doesn't assign or use it. This appears to be a no-op statement that should be removed.

Suggested change
response.data as T;

Copilot uses AI. Check for mistakes.
@CX330Blake CX330Blake merged commit 410d3dd into fosdickio:main Mar 22, 2026
15 checks passed
@CX330Blake CX330Blake deleted the solve-issue-59 branch March 22, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants