rbinmcp
Health Warn
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 9 GitHub stars
Code Pass
- Code scan — Scanned 9 files during light audit, no dangerous patterns found
Permissions Pass
- Permissions — No dangerous permissions requested
This tool is a Model Context Protocol (MCP) server designed to give AI agents the ability to perform static analysis, reverse engineering, and malware triage on binary files. It integrates with established analysis frameworks like radare2 and Ghidra.
Security Assessment
Overall risk: Medium. The server is built to analyze potentially dangerous malware samples, meaning it inherently processes untrusted, risky files. To function properly, it relies heavily on executing external shell commands and system utilities—such as `file`, `strings`, `objdump`, and radare2—on the host machine. The automated code scan found no hardcoded secrets or malicious patterns within the server's own source code, and it does not require dangerous OS permissions. However, running external tools against unknown binaries always carries an inherent execution risk that relies on the host environment's isolation.
Quality Assessment
The project is actively maintained, with its most recent code push occurring today. It is properly licensed under the permissive MIT license. However, it currently has low community visibility with only 9 GitHub stars. Because of this low footprint, the project has not undergone widespread peer review or security auditing by the broader infosec community, so trust is placed primarily in the active maintainer.
Verdict
Use with caution: the server's own code is safe, but because it automatically orchestrates external system tools to analyze potentially malicious files, it should only be run in secure, isolated environments.
Rogue Binary MCP (rbinmcp) is a Rust MCP server for binary analysis, reverse engineering, and malware triage.
Rogue Binary MCP
Death to Malware.
rbinmcp is a Rust MCP server for binary analysis, reverse engineering, and malware triage. It is built specifically for AI agents, with compact outputs, focused follow-up tools, and source navigation designed to keep analysis token cost low.
The project is intentionally focused on binary work. The production MCP surface helps an agent inspect binaries, collect evidence, compare artifacts, and navigate the codebase cheaply while maintaining these tools.
Public documentation: Rogue Binary Wiki
What It Provides
- Fast first-pass binary triage through
triage_binary - Static PE, ELF, and Mach-O parsing through
static_view - radare2-backed sessions, metadata, search, disassembly, decompilation, xrefs, traces, and compact function projections
- Ghidra-backed import, cached project inspection, decompilation, CFGs, xrefs, P-code, callsite facts, and targeted analysis slices
- Native wrappers for
file,strings,objdump,radiff2, and the Rustbinwalkcrate - Pure Rust analysis for hardening/security properties, static call graphs, capability clustering, fuzzable-function suggestions, component evidence, entropy, compiler and packer hints, crypto constants, DLL export shape, MBA simplification, and VM bytecode helpers
- AI-agent usability helpers for tool discovery, backend status, workflows, error guidance, repo navigation, validation suggestions, and local Ghidra/r2 reference lookup
Run list_tools from an MCP client for the authoritative live tool list. The current server surface is generated from the registered handlers and pinned by tests.
Start Here
Use these tools first when analyzing an unknown binary:
get_backend_status- confirm which optional backends are availablelist_toolsorlookup_tool- discover the exact live surfacetriage_binary- file hashes, format, sections, imports, function stats, strings, xref-heavy functions, and call-graph summarystatic_view- quick PE/ELF/Mach-O metadata without opening r2binary_security_properties- Rust-native hardening posture with direct evidence and bounded outputstatic_callgraph- Rust-native x86/x64 call graph summary with paged nodes, edges, confidence, and external fanoutbinary_capabilities- ranked capability families with import/callgraph evidence and source function attachmentsfuzzable_functions- bounded fuzz target suggestions with evidence and follow-up tool callsbinary_component_profile- high-confidence component evidence, imported libraries, and low-confidence runtime hintsr2_openthenr2_function_view- cheap function triage and compact control-flow contextghidra_importthenghidra_decompiler_calls- import once, then query focused decompiler projectionsghidra_callsite_facts- listing-grounded call argument evidence when pseudocode may be misleading
Tool Families
Orchestration
triage_binarybuilds a compact multi-backend overview for one binary.int_convertconverts decimal, hex, binary, and octal values with printable ASCII context.
Static Parsing
static_viewreads PE, ELF, and Mach-O metadata throughgoblin.- Supported static modes include format info, sections, imports, exports, relocations, libraries, and entry points.
- Universal/fat Mach-O containers are projected through a selected architecture slice so agents can inspect real sections, imports, libraries, and entry points without a separate preprocessing step.
export_hash_resolveresolves API/export hashes against local PE/DLL export corpora and optional candidates.
Native Tools
file_identifywrapsfile(1)for human file type and MIME type.strings_extractwrapsstrings(1)with structured limits and offsets.objdump_viewexposes mode-driven headers, disassembly, section dumps, and archive-member views.objdump_search_disasmsearches objdump disassembly and returns contextual matches.binary_diffwrapsradiff2for code, graph, and byte-oriented binary diffs.binwalk_scanuses the Rustbinwalkcrate for embedded signature scans.
radare2 Tools
- Session lifecycle:
r2_open,r2_close,r2_sessions, andr2_cmd. - Metadata and inventory:
r2_metadata,r2_find,r2_classes,r2_imports_grouped, andr2_lookup_address. - Code views:
r2_disassemble,r2_decompile, andr2_function_view. - References and flow:
r2_xrefs,r2_trace_data_flow,r2_value_trace, andr2_var_xrefs. - Focused binary projections:
r2_path_digest,r2_artifact_summary,r2_field_xrefs,r2_jump_table_slices, andr2_esil_accesses. - Byte and expression helpers:
r2_get_bytesandr2_calculate.
Prefer r2_function_view mode analyze for first-pass function triage, then use mode cfg, refs, vars, profile, or strings when narrowing the question.
Ghidra Tools
- Availability and cache:
ghidra_check,ghidra_import,ghidra_project_binaries,ghidra_binary_metadata, andghidra_delete_binary. - Inventory and search:
ghidra_inventory,ghidra_xrefs,ghidra_search_bytes,ghidra_read_bytes, and symbol/string/data modes through inventory. - Code views:
ghidra_decompile,ghidra_decompile_meta,ghidra_disassemble,ghidra_pcode,ghidra_cfg, andghidra_decompiler_cfg. - Decompiler projections:
ghidra_decompiler_calls,ghidra_decompiler_block_behavior,ghidra_decompiler_memory, andghidra_decompiler_divergence. - Function evidence:
ghidra_callsite_slices,ghidra_callsite_facts,ghidra_function_checkpoints,ghidra_function_dossier,ghidra_path_digest,ghidra_variables, andghidra_thunk_target. - Specialized reverse-engineering views:
ghidra_dynamic_dispatch_table,ghidra_context_api_slots,ghidra_jump_table_field_summary,ghidra_field_flow,ghidra_field_lineage,ghidra_indirect_jump_slices, andghidra_local_buffer_slices. - Persistent project edits:
ghidra_rename_function,ghidra_set_function_prototype,ghidra_set_bookmark,ghidra_set_comment,ghidra_create_label, andghidra_create_function.
Import is cache-backed by SHA-256. Most read tools use the warm path with analyzeHeadless -process <name> -noanalysis, so the expensive import and analysis work happens once per binary.
For large targets, use ghidra_decompiler_calls first, then narrow with ghidra_decompiler_block_behavior, ghidra_decompiler_memory, or ghidra_callsite_facts.
Analysis Tools
binary_security_propertiesreports Rust-native loader and hardening properties for PE, ELF, and Mach-O: NX/DEP, PIE/ASLR, RELRO/bind-now, executable stack, RPATH/RUNPATH, PE CFG/SafeSEH/Authenticode indicators, and Mach-O code signature/hardened-runtime hints.static_callgraphbuilds a bounded Rust-native x86/x64 graph from PE, ELF, and Mach-O executable sections usingiced-x86, with function seeds from entry points, exports, symbols, PE unwind ranges, section starts, and direct call targets. It resolves static import thunks and stubs where evidence is available, then reports direct calls, tailcalls, import/API fanout, top connected functions, and per-edge confidence.binary_capabilitiesclusters imports, symbols, and static-callgraph external calls into capability families such as network, file I/O, process/thread, registry, crypto, compression, anti-debug, dynamic loading, and memory allocation/protection.fuzzable_functionsranks functions by parser/decoder/input-handling names, proximity to file/network/compression APIs, callgraph position, and thunk/runtime penalties. Results are fuzzing-interest suggestions with evidence, not vulnerability claims.binary_component_profileseparates high-confidence components, imported shared libraries, and low-confidence runtime/package hints. The first pass supports Go build info, Rust cargo-auditable.dep-v0sections when decodable, imported library inventory, and .NET runtime hints.entropy_profilescores section entropy and packer likelihood.compiler_packer_detectidentifies compiler, runtime, packer, and protector hints.crypto_detectscans bytes for common crypto constants.dll_export_profileanalyzes DLL exports, dispatch shape, lifecycle hints, and plugin/host indicators.
The rbm-analysis crate also contains reusable Rust helpers for MBA simplification and VM bytecode/opcode analysis. Those internals are kept behind focused MCP tools unless a projection is useful for active binary work.
AI-Agent Usability And Reference Helpers
These are intentionally allowed even though they are not binary-analysis tools, because they reduce context cost while using and maintaining rbinmcp:
- Tool discovery:
list_tools,lookup_tool,lookup_r2_cmd, andget_workflow - Runtime help:
get_backend_status,get_architecture,get_ghidra_info, andlookup_error - Source navigation:
get_repo_overview,get_crate_overview,get_module_overview,get_file_overview,get_test_overview,search_repo_functions,search_repo_types,search_repo_tests,search_tool_handlers, andsuggest_validation - Reference indexes:
get_ghidra_reference_info,refresh_ghidra_reference,lookup_ghidra_reference,get_r2_reference_info,refresh_r2_reference, andlookup_r2_reference
Use the reference helpers before changing Ghidra Java scripts, r2 command projections, or backend-specific assumptions.
Architecture
The repository is a Rust workspace:
crates/rbm-server- MCP server, tool registration, thin MCP adapters, and cross-backend servicescrates/rbm-core- config, cache paths, common errors, output guarding, and shared utility typescrates/rbm-r2- primitive radare2 session, command, metadata, disassembly, search, trace, and projection logiccrates/rbm-ghidra- Ghidra project cache,analyzeHeadlessorchestration, warm-path extractors, and typed result modelscrates/rbm-native- wrappers around native tools and subprocess executioncrates/rbm-static- static PE/ELF/Mach-O parsing throughgoblincrates/rbm-analysis- pure Rust analysis helpers and structured binary heuristicsghidra_scripts/- Java postScripts used by the Ghidra warm-path tools
Within rbm-server, src/tools/*_live.rs should stay thin. Tool handlers adapt MCP parameters and errors. Cross-backend orchestration belongs in src/services/. Backend crates own primitive execution and analysis logic.
Install
Required:
- Rust stable 1.85 or newer
Optional runtime backends:
radare2forr2_*tools- Ghidra for
ghidra_*tools file,strings,objdump, andradiff2for native wrappers
Build a release server:
git clone https://github.com/kirkderp/rbinmcp.git
cd rbinmcp
cargo build --release --bin rbm-server
The built binary is:
target/release/rbm-server
Optional local install:
cargo install --path crates/rbm-server
Run
rbm-server currently supports stdio transport:
target/release/rbm-server --transport stdio --log-level info
For local development:
cargo run --release --bin rbm-server -- --transport stdio --log-level debug
Generic MCP client command:
{
"command": "/absolute/path/to/rbinmcp/target/release/rbm-server",
"args": ["--transport", "stdio", "--log-level", "info"]
}
Configuration
Environment variables:
RBINMCP_CACHE_DIR- override the cache rootGHIDRA_INSTALL_DIR- Ghidra install rootRBINMCP_GHIDRA_SCRIPTS_DIR- override bundled script directoryRBINMCP_GHIDRA_TIMEOUT- standard Ghidra call timeout in seconds, default60RBINMCP_GHIDRA_IMPORT_TIMEOUT- Ghidra import timeout in seconds, default900RBINMCP_R2_OPEN_TIMEOUT- radare2 open timeout in seconds, default120RBINMCP_NATIVE_TIMEOUT- native tool timeout in seconds, default60
Default cache root is the platform user cache directory plus rbinmcp, unless RBINMCP_CACHE_DIR is set.
Cache contents:
overflow/for large MCP responses written by the output guardghidra/for per-SHA-256 Ghidra projectsr2_sessions/for r2 session statetmp/for temporary tool files
Recommended Workflows
Quick triage:
get_backend_statusfile_identifytriage_binarystatic_viewwithmode=infobinary_security_propertiesstatic_callgraphbinary_capabilitiesfuzzable_functionsbinary_component_profilestrings_extract
Quick binary posture:
file_identifystatic_viewwithmode=infobinary_security_propertiesentropy_profilecompiler_packer_detectbinary_component_profile
Callgraph-first triage:
static_viewwithmode=infostatic_callgraphwith default pagingbinary_capabilitiesto rank API families and source functions- Pick a high-signal function from
top_connected_functions,external_api_fanout, or capability evidence r2_function_viewwithmode=analyzeghidra_decompiler_callsonly after narrowing the function
Capability triage:
static_viewwithmode=importsbinary_capabilities- Pivot from a ranked capability source function into
r2_function_view - Use
ghidra_decompiler_callsorghidra_callsite_factsonly for the narrowed function
Fuzz target discovery:
static_callgraphwith bounded pagingbinary_capabilitiesto identify input-facing API familiesfuzzable_functionsto rank parser, decoder, unpacking, and input-handling candidatesr2_function_viewon a candidate address before drafting a harnessghidra_callsite_factsfor exact argument setup at selected input API callsites
Component inventory:
static_viewwithmode=infobinary_component_profile- Review
identified_components,imported_libraries, andlow_confidence_hintsseparately - Use
strings_extractonly when a low-confidence runtime hint needs manual confirmation
r2 function analysis:
r2_openr2_metadatawithmode=functionsr2_function_viewwithmode=analyzer2_function_viewwithmode=cfgormode=refsr2_disassembleorr2_decompileonly after narrowing the target
Ghidra decompiler workflow:
ghidra_checkghidra_importghidra_project_binariesghidra_inventorywithmode=functionsghidra_decompiler_callsghidra_callsite_factsfor exact listing-grounded call setupghidra_cfgwhen decompiler CFG is invalid, timed out, or too transformed
Packed or staged binary workflow:
entropy_profilebinwalk_scancompiler_packer_detectr2_path_digestorghidra_path_digestghidra_dynamic_dispatch_tablewhen a hash/API dispatcher is suspected
Binary comparison workflow:
file_identifyfor both filesbinary_diffwithmode=codebinary_diffwithmode=graphbinary_diffwithmode=bytes
Maintenance workflow:
get_repo_overviewsearch_tool_handlersfor a tool nameget_file_overviewbefore editingsuggest_validationto choose testslookup_ghidra_referenceorlookup_r2_referencebefore changing backend-specific APIs
Development
Core checks:
cargo fmt --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace
RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps
Build all workspace crates:
cargo build --workspace
Run ignored integration suites only when the matching external backend is installed:
cargo test -p rbm-r2 --features integration-r2 -- --ignored
cargo test -p rbm-ghidra --features integration-ghidra -- --ignored
The workspace uses strict linting:
- Rust edition 2024
clippy::all,clippy::pedantic,clippy::nursery, andclippy::cargodenieddbg!,todo!,unimplemented!, undocumented unsafe blocks, and unsafe operations in unsafe functions deniedmultiple_crate_versionsallowed because required tool crates currently pull incompatible transitive dependency lines
Design Principles
The public MCP surface is optimized for binary analysis by AI agents. Tools should produce compact, deterministic evidence that can be chained into follow-up calls without forcing the client to read unbounded payloads.
- Prefer focused projections over raw backend dumps
- Keep schemas stable and additive
- Use summaries, counts, previews, and pagination for large results
- Preserve escape hatches such as
r2_cmdwhen a backend-specific command is still necessary - Keep source navigation and reference lookup cheap enough to use during active maintenance
Security And License
- Security reporting: see SECURITY.md
- License: MIT
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found