binscout
Headless, agent-first binary analysis. Open a binary (ELF/PE/Mach-O/LE/raw),
get functions, CFGs, xrefs, strings, symbols, and IR — over a JSON CLI or an
MCP server over stdio. Annotations (renames, comments) live in a redb
sidecar; the binary is never written.
Full docs live in the book.
Install
From crates.io:
Or from git (latest master):
Or from source:
This installs both binscout (JSON CLI) and binscout-mcp (MCP server).
Quickstart
CLI
Every command prints exactly one JSON value to stdout. Runtime failures print
{"error": "..."} with exit 1, so stdout is always valid JSON. (Clap usage
errors for unknown flags/subcommands still go to stderr with exit 2.)
--db overrides the sidecar DB (default <binary>.rsdbg.redb).
| Command | Example | Output |
|---|---|---|
load |
binscout load fw.elf |
project info; caches the analysis snapshot |
functions |
binscout functions fw.elf --offset 0 --limit 50 |
function rows, renames resolved |
func |
binscout func fw.elf 0x400000 |
blocks with instructions, edges, calls |
disasm |
binscout disasm fw.elf 0x400000 32 |
decoded instructions (addr = hex or decimal, then byte count) |
cfg |
binscout cfg fw.elf 0x400000 |
block nodes plus (from, to) edges |
xrefs |
binscout xrefs fw.elf --to 0x400000 --kind code |
filtered/paged cross-references |
strings |
binscout strings fw.elf --limit 20 |
extracted strings by address |
symbols |
binscout symbols fw.elf |
imports and exports |
sections |
binscout sections fw.elf |
section table: name, vaddr (flat VA = IMAGE_BASE + RVA on PE), in-memory/file sizes, permissions |
ir |
binscout ir fw.elf 0x400000 32 |
P-code-inspired lift of the range |
stats |
binscout stats fw.elf |
storage stats: binary size, sidecar DB size, analysis counts |
annotate |
binscout annotate fw.elf 0x400000 --rename main --comment "entry" |
read/write annotation at an address |
Annotate without flags reads; --rename "" / omitting --comment clears.
rename only accepts known function entries; comment accepts any address.
MCP server
binscout-mcp serves 13 tools over stdio (newline-delimited JSON-RPC):
project_info, functions, func, disasm, cfg, xrefs, strings,
symbols, sections, ir, stats, rename, comment. Each takes binary plus optional db
and returns one JSON document as text; failures are tool errors.
Develop
Project database
Analysis snapshots live in a redb sidecar next to the binary:
<binary>.rsdbg.redb by default, overridden per-invocation with --db PATH (CLI) or the db parameter (MCP). load writes the snapshot;
rename/comment persist immediately; every other command only reads.
binscout stats <binary> reports the binary size, the sidecar size
(db_size, 0 before the first load), and the analysis counts, so the
storage cost of a snapshot stays visible.
The sidecar is a cache: delete it to drop analysis and annotations, and
it is rebuilt on the next load. Never commit sidecars — keep them out
of version control:
*.rsdbg.redb
License
Dual-licensed under either of:
at your option.