binary-ninja-mcp
v1.0.0
Published
Model Context Protocol server for Binary Ninja - enables seamless integration of Binary Ninja's capabilities with MCP clients
Maintainers
Readme
Binary Ninja MCP Server (TypeScript)
This is the TypeScript implementation of the Binary Ninja MCP bridge server. It provides a standalone MCP server that connects to a running Binary Ninja instance and exposes its capabilities through the Model Context Protocol.
Features
- Standalone MCP Server: Run independently with any MCP client
- 50+ Tools: Full access to Binary Ninja's reverse engineering capabilities
- Easy Configuration: CLI options and environment variables for host/port
- TypeScript: Full type safety and better developer experience
Installation
Using npx (Recommended)
npx -y @binary-ninja/mcp-serverGlobal Installation
npm install -g @binary-ninja/mcp-server
binary-ninja-mcpFrom Source
cd bridge
npm install
npm run buildUsage
Command Line Options
# Connect to default (localhost:9009)
npx -y @binary-ninja/mcp-server
# Connect to custom host/port
npx -y @binary-ninja/mcp-server --host 192.168.1.100 --port 9009
# Show help
npx -y @binary-ninja/mcp-server --helpEnvironment Variables
# Set host and port via environment
BINJA_MCP_HOST=localhost BINJA_MCP_PORT=9009 npx -y @binary-ninja/mcp-serverMCP Client Configuration
Claude Desktop
Add to ~/.config/claude-desktop/claude_desktop_config.json:
{
"mcpServers": {
"binary-ninja-mcp": {
"command": "npx",
"args": ["-y", "@binary-ninja/mcp-server", "--host", "localhost", "--port", "9009"]
}
}
}Cline
Add to your Cline MCP configuration:
{
"mcpServers": {
"binary-ninja-mcp": {
"command": "npx",
"args": ["-y", "@binary-ninja/mcp-server"]
}
}
}Custom Installation
If installed globally:
{
"mcpServers": {
"binary-ninja-mcp": {
"command": "binary-ninja-mcp",
"args": ["--host", "localhost", "--port", "9009"]
}
}
}Available Tools
Function Analysis
list_methods- List all function names with paginationget_entry_points- List entry point(s) of the loaded binarysearch_functions_by_name- Search functions by name substringdecompile_function- Decompile a function to C codeget_il- Get IL (HLIL/MLIL/LLIL) for a functionfetch_disassembly- Get assembly mnemonics for a function
Rename Tools
rename_function- Rename a functionrename_single_variable- Rename a single variablerename_multi_variables- Batch rename multiple variablesrename_data- Rename a data label
Comment Tools
set_comment- Set comment at an addressget_comment- Get comment at an addressdelete_comment- Delete comment at an addressset_function_comment- Set function commentget_function_comment- Get function commentdelete_function_comment- Delete function comment
Type Tools
define_types- Define types from C codelist_local_types- List local typessearch_types- Search types by nameget_user_defined_type- Get user defined type definitionget_type_info- Get type informationdeclare_c_type- Declare C typeretype_variable- Retype a variableset_local_variable_type- Set local variable type
Data Tools
list_data_items- List data labelshexdump_address- Hexdump at addresshexdump_data- Hexdump data symbolget_data_decl- Get data declaration and hexdump
Cross-Reference Tools
get_xrefs_to- Get xrefs to addressget_xrefs_to_field- Get xrefs to struct fieldget_xrefs_to_struct- Get xrefs to structget_xrefs_to_type- Get xrefs to typeget_xrefs_to_enum- Get xrefs to enumget_xrefs_to_union- Get xrefs to union
Binary Modification Tools
set_function_prototype- Set function prototypemake_function_at- Create function at addresslist_platforms- List available platformspatch_bytes- Patch bytes in binary
Utility Tools
function_at- Find function at addressget_stack_frame_vars- Get stack frame variableslist_classes- List classes/namespaceslist_namespaces- List namespaceslist_segments- List memory segmentslist_sections- List sectionslist_imports- List importslist_exports- List exportslist_strings- List stringslist_all_strings- List all strings (aggregated)get_binary_status- Get binary statuslist_binaries- List open binariesselect_binary- Select active binaryformat_value- Format and annotate valueconvert_number- Convert number representations
Requirements
- Node.js 18.0.0 or higher
- A running Binary Ninja instance with the MCP plugin
- MCP client (Claude Desktop, Cline, etc.)
License
GPL-3.0 - See LICENSE file for details.
