Back to Home
akrutsinger icon

binja-codemode-mcp

Verified Safe

by akrutsinger

Overview

Enables LLM-assisted reverse engineering in Binary Ninja by executing Python code directly against its API.

Installation

Run Command
python3 ~/.binaryninja/plugins/repositories/community/plugins/akrutsinger_binja_codemode_mcp/bridge/mcp_bridge.py

Environment Variables

  • BINJA_MCP_URL
  • BINJA_MCP_KEY
  • BINJA_MCP_LOG_LEVEL

Security Notes

The server executes arbitrary Python code provided by the LLM. However, it implements strong security measures: - Code is validated using an AST parser (`CodeValidator`) to block forbidden modules (e.g., `os`, `subprocess`, `socket`, `importlib`, `sys`, `shutil`) and dangerous built-ins/attributes (e.g., `eval`, `exec`, `open`, `__import__`, `__subclasses__`). - Execution occurs in a restricted global environment, exposing only safe built-ins and the `binja` API object. - There is a 30-second execution timeout to prevent resource exhaustion. - The HTTP server binds only to localhost (`127.0.0.1`). - API key authentication is required for all requests. While `exec` is used, the comprehensive sandboxing significantly mitigates risk. The README explicitly warns users to 'only use with trusted MCP clients and LLMs,' which is appropriate for a tool that inherently deals with arbitrary code execution for analysis.

Similar Servers

Stats

Interest Score33
Security Score7
Cost ClassMedium
Avg Tokens1000
Stars3
Forks1
Last Update2026-01-09

Tags

Binary NinjaReverse EngineeringLLMCode ExecutionMCP