binary-ninja-mcp
Model Context Protocol server for Binary Ninja - enables seamless integration of Binary Ninja's capabilities with MCP clients
Versions
1.0.0latestTools 56
list_methods List all function names in the program with pagination.
get_entry_points List entry point(s) of the loaded binary.
retype_variable Retype a variable in a function.
rename_single_variable Rename a variable in a function.
rename_multi_variables Rename multiple local variables in one call. - function_identifier: function name or address (hex) - Provide either mapping_json (JSON object old->new), renames_json (JSON array of {old,new}), or pairs ("old1:new1,old2:new2"). Returns per-item results and totals.
define_types Define types from a C code string.
list_classes List all namespace/class names in the program with pagination.
hexdump_address Hexdump data starting at an address. When length < 0, reads the exact defined size if available.
hexdump_data Hexdump a data symbol by name or address. When length < 0, reads the exact defined size if available.
get_data_decl Return a declaration-like string and a hexdump for a data symbol by name or address. LLM-friendly: includes both a C-like declaration (when possible) and text hexdump.
decompile_function Decompile a specific function by name and return the decompiled C code.
get_il Get IL for a function in the selected view. - view: one of hlil, mlil, llil - ssa: set True to request SSA form (MLIL/LLIL only)
fetch_disassembly Retrive the disassembled code of a function with a given name as assemby mnemonic instructions.
get_xrefs_to_field Get all cross references to a named struct field (member).
rename_function Rename a function by its current name to a new user-defined name. The configured prefix (default "mcp_") will be automatically prepended if not present.
rename_data Rename a data label at the specified address.
set_comment Set a comment at a specific address.
set_function_comment Set a comment for a function.
get_comment Get the comment at a specific address.
get_function_comment Get the comment for a function.
list_segments List all memory segments in the program with pagination.
list_sections List sections in the program with pagination. Returns one line per section with: start-end, size, name, and any semantics/type if available.
list_imports List imported symbols in the program with pagination.
list_strings List all strings in the database (paginated).
list_strings_filter List matching strings in the database (paginated, filtered).
list_local_types List all local types in the database (paginated).
search_types Search local types whose name or declaration contains the substring.
list_all_strings List all strings in the database (aggregated across pages).
list_exports List exported functions/symbols with pagination.
list_namespaces List all non-global namespaces in the program with pagination.
list_data_items List defined data labels and their values with pagination.
search_functions_by_name Search for functions whose name contains the given substring.
get_binary_status Get the current status of the loaded binary.
list_binaries List managed/open binaries known to the server with ids and active flag.
select_binary Select which binary to analyze by ordinal, internal view id, full path, or basename. Call this after listing binaries whenever you need to switch analysis targets.
delete_comment Delete the comment at a specific address.
delete_function_comment Delete the comment for a function.
function_at Retrive the name of the function the address belongs to. Address must be in hexadecimal format 0x00001
get_user_defined_type Retrive definition of a user defined type (struct, enumeration, typedef, union)
get_xrefs_to Get all cross references (code and data) to the given address. Address can be hex (e.g., 0x401000) or decimal.
get_xrefs_to_struct Get cross references/usages related to a struct name.
get_xrefs_to_type Get xrefs/usages related to a struct or type name. Includes global instances, code refs to those, HLIL matches, and functions whose signature mentions the type.
get_xrefs_to_enum Get usages/xrefs of an enum by scanning for member values and matches.
get_xrefs_to_union Get cross references/usages related to a union type by name.
get_stack_frame_vars Get stack frame variable information for a function by name or address. Returns names, offsets, sizes, and types of local variables.
format_value Convert and annotate a value at an address in Binary Ninja. Adds a comment with hex/dec and C literal/string so you can see the change.
convert_number Convert a number or string to multiple representations (hex/dec/bin, LE/BE, C char/string literals). Accepts decimal (e.g., 123), hex (0x7b or 7Bh), binary (0b1111011), octal (0o173), char ('A'), or string ("ABC" with escapes like A).
get_type_info Resolve a type name and return its declaration and details (kind, members, enum values).
get_callers List callers and caller sites for one or more function identifiers (name or address). Provide comma-separated identifiers like "sub_401000,main".
get_callees List callees and call sites for one or more function identifiers (name or address). Provide comma-separated identifiers like "sub_401000,main".
set_function_prototype Set a function's prototype by name or address.
make_function_at Create a function at the given address. Platform is optional (e.g., "linux-x86_64"). Use "default" to explicitly select the BinaryView/platform default. Returns status and function info; no-op if the function already exists.
list_platforms List all available platform names from Binary Ninja.
declare_c_type Create or update a local type from a C declaration.
set_local_variable_type Set a local variable's type.
patch_bytes Patch bytes at a given address in the binary. - address: Address to patch (hex string like "0x401000" or decimal) - data: Hex string of bytes to write (e.g., "90 90" or "9090" or "0x90 0x90") - save_to_file: If True (default), save patched binary to disk and re-sign on macOS. If False, only modify in memory without affecting the original file. Returns status with original and patched bytes. On macOS, automatically re-signs the binary after patching to avoid execution errors.
Permissions 4
network medium filesystem low shell high env_vars low