feat: add network exposure setting and TypeScript MCP bridge (solve #59)#60
Conversation
CX330Blake
commented
Jan 17, 2026
- 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
|
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. |
There was a problem hiding this comment.
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.
| "name": "@binary-ninja/mcp-server", | ||
| "version": "1.0.0", | ||
| "lockfileVersion": 3, | ||
| "requires": true, | ||
| "packages": { | ||
| "": { | ||
| "name": "@binary-ninja/mcp-server", |
There was a problem hiding this comment.
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.
| "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", |
| try: | ||
| plugin.config.server.port = int(port_str) | ||
| except ValueError: | ||
| pass |
There was a problem hiding this comment.
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.
| pass | |
| bn.log_warn( | |
| f"Invalid MCP port value '{port_str}' in settings; " | |
| f"continuing to use port {plugin.config.server.port}" | |
| ) |
| ## Features | ||
|
|
||
| - **Standalone MCP Server**: Run independently with any MCP client | ||
| - **50+ Tools**: Full access to Binary Ninja's reverse engineering capabilities |
There was a problem hiding this comment.
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.
| - **50+ Tools**: Full access to Binary Ninja's reverse engineering capabilities | |
| - **54 Tools**: Full access to Binary Ninja's reverse engineering capabilities |
| "bin": { | ||
| "binary-ninja-mcp": "./dist/index.js" | ||
| }, |
There was a problem hiding this comment.
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.
| params, | ||
| timeout, | ||
| }); | ||
| response.data as T; |
There was a problem hiding this comment.
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.
| response.data as T; |