MCP Directory

Binary Ninja MCP

Connect your LLM/MCP client to Binary Ninja for AI-assisted reverse engineering and malware analysis.

Unverified
stdio (local)
No auth
Python

Add to your client

Copy the config for your MCP client and paste it into its config file.

Install / run
npx -y binary-ninja-mcp

Paste into ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "binary-ninja-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "binary-ninja-mcp",
        "--host",
        "localhost",
        "--port",
        "9009"
      ]
    }
  }
}

Step-by-step guides: Add to Claude Desktop · Add to Cursor · Add to Windsurf

Before you start

  • Binary Ninja (https://binary.ninja/)
  • Python 3.12+
  • An MCP client (Cline, Roo Code, Claude Desktop, Cursor, Windsurf, Claude Code, or LM Studio)
  • Node.js / npx (for the recommended npm bridge)

About Binary Ninja MCP

A Binary Ninja plugin and MCP bridge that exposes Binary Ninja's reverse-engineering capabilities to any MCP client. The plugin runs an HTTP MCP server inside Binary Ninja; the bridge (npm package binary-ninja-mcp or a legacy Python bridge) relays MCP client calls to it. Once a binary is loaded in Binary Ninja and the server is started, you can prompt an LLM to decompile, analyze, rename, retype, comment, and patch code — useful for CTF challenges and malware analysis.

Tools & capabilities (54)

decompile_function

Decompile a specific function by name and return HLIL-like code with addresses.

get_il

Get IL for a function in hlil, mlil, or llil (SSA supported for MLIL/LLIL).

fetch_disassembly

Get the assembly representation of a function by name or address.

define_types

Add type definitions from a C string type definition.

declare_c_type

Create/update a local type from a single C declaration.

get_user_defined_type

Retrieve definition of a user-defined type (struct, enum, typedef, union).

get_type_info

Resolve a type and return declaration, kind, and members.

set_comment

Set a comment at a specific address.

get_comment

Get the comment at a specific address.

delete_comment

Delete the comment at a specific address.

set_function_comment

Set a comment for a function.

get_function_comment

Get the comment for a function.

delete_function_comment

Delete the comment for a function.

function_at

Retrieve the name of the function the address belongs to.

make_function_at

Create a function at an address (platform optional; 'default' uses BinaryView/platform default).

get_entry_points

List entry point(s) of the loaded binary.

get_binary_status

Get the current status of the loaded binary.

get_xrefs_to

Get all cross references (code and data) to an address.

get_xrefs_to_enum

Get usages related to an enum (matches member constants in code).

get_xrefs_to_field

Get all cross references to a named struct field.

get_xrefs_to_struct

Get xrefs/usages related to a struct (members, globals, code refs).

get_xrefs_to_type

Get xrefs/usages related to a struct/type (globals, refs, HLIL matches).

get_xrefs_to_union

Get xrefs/usages related to a union (members, globals, code refs).

get_callers

List callers plus call sites for one or more function identifiers.

get_callees

List callees plus call sites for one or more function identifiers.

get_stack_frame_vars

Get stack frame variable information for a function (names, offsets, sizes, types).

get_data_decl

Return a C-like declaration and a hexdump for a data symbol or address.

hexdump_address

Text hexdump at address. length < 0 reads exact defined size if available.

hexdump_data

Hexdump by data symbol name or address. length < 0 reads exact defined size if available.

format_value

Convert a value and annotate it at an address in BN (adds a comment).

list_platforms

List all available platform names.

list_binaries

List managed/open binaries with ids and active flag.

select_binary

Select active binary by id or filename.

list_all_strings

List all strings (no pagination; aggregates all pages).

list_strings

List all strings in the database (paginated).

list_strings_filter

List matching strings (paginated, filtered by substring).

list_classes

List all namespace/class names in the program.

list_data_items

List defined data labels and their values.

list_exports

List exported functions/symbols.

list_imports

List imported symbols in the program.

list_local_types

List local types in the current database (name/kind/decl).

list_methods

List all function names in the program.

list_namespaces

List all non-global namespaces in the program.

list_segments

List all memory segments in the program.

rename_data

Rename a data label at the specified address.

rename_function

Rename a function by its current name to a new user-defined name.

rename_single_variable

Rename a single local variable inside a function.

rename_multi_variables

Batch rename multiple local variables in a function (mapping or pairs).

set_local_variable_type

Set a local variable's type.

retype_variable

Retype a variable inside a given function.

set_function_prototype

Set a function's prototype by name or address.

search_functions_by_name

Search for functions whose name contains the given substring.

search_types

Search local types by substring (name/decl).

patch_bytes

Patch raw bytes at an address (byte-level). Can patch entire instructions via bytecode; save_to_file (default True) saves to disk and re-signs on macOS.

When to use it

  • Solving reverse-engineering CTF challenges with an LLM driving Binary Ninja
  • AI-assisted malware analysis: decompile, comment, and assess a sample from its entry point
  • Bulk renaming functions and variables to make decompiled code human-readable
  • Recovering and defining struct/type information across a binary
  • Tracing cross references, callers, and callees to understand control and data flow
  • Patching bytes/instructions directly from the LLM client

Security notes

The MCP bridge connects to a local Binary Ninja HTTP server (default localhost:9009) with no authentication. The server can patch bytes and write files to disk (patch_bytes with save_to_file defaults to True, and re-signs binaries on macOS). Only analyze binaries you trust, and keep the HTTP server bound to localhost.

Binary Ninja MCP FAQ

What are the two components?

A Binary Ninja plugin that runs an MCP server exposing Binary Ninja over HTTP endpoints, and a separate MCP bridge that connects your MCP client to that server.

How do I install it?

Install your MCP client first, then install the plugin via Binary Ninja's Plugin Manager (or manually). Supported clients are auto-configured. The recommended bridge is the npm package run with 'npx -y binary-ninja-mcp'.

Which MCP clients are supported?

Auto-setup is supported for Cline, Roo Code, Claude Desktop, Cursor, Windsurf, Claude Code, and LM Studio. Any MCP-compatible client can also be configured manually.

What host and port does it use?

The bridge connects to the plugin's HTTP server at localhost on port 9009 by default (configurable via --host and --port).

Is there a non-npm bridge?

Yes. A legacy Python bridge (bridge/binja_mcp_bridge.py) can be run with the plugin's virtual-environment Python interpreter for clients that need it.

Alternatives to Binary Ninja MCP

Compare all alternatives →

Microsoft's official browser-automation MCP using Playwright's accessibility tree (no vision model).

Featured
Verified
stdio (local)
No auth
TypeScript
12 tools
Updated 21 days agoRepo

Up-to-date, version-specific library documentation injected into your coding agent.

Verified
stdio (local)
API key
TypeScript
2 tools
Updated 25 days agoRepo

Code intelligence engine that indexes repos into a persistent knowledge graph for AI coding agents.

Unverified
stdio (local)
No auth
C
14 tools
Updated 11 hours agoRepo