mirror of
https://github.com/morluto/rea.git
synced 2026-10-12 02:19:24 +00:00
729d3e927cbcf17224e6b988eebcfae0d215c876
39 tools total: - 31 official Hopper 6 tools proxied via STDIO/NDJSON - 8 RE-specific tools: swift_classes, get_objc_classes, get_objc_protocols, batch_decompile, get_call_graph, analyze_swift_types, find_xrefs_to_name, binary_overview No Python injection needed - wraps official HopperMCPServer binary.
betterBinaryMCP
An enhanced MCP (Model Context Protocol) server for Hopper Disassembler that wraps the official Hopper 6 MCP server and adds reverse engineering–specific analysis tools.
No Python injection or plugins needed — just Hopper open with a binary.
Architecture
MCP Client ←STDIO→ betterBinaryMCP ←STDIO→ Official HopperMCPServer ←XPC→ Hopper.app
- Wraps the official
HopperMCPServerbinary as a subprocess - Proxies all 31 official tools unchanged
- Adds 8 RE-specific tools built on top of official operations
Tools
31 Official Tools (proxied)
| Tool | Description |
|---|---|
address_name |
Get/set name (label) at an address |
comment / inline_comment |
Get/set comments |
current_address / current_procedure / current_document |
Cursor state |
goto_address / next_address / prev_address |
Navigation |
list_segments / list_procedures / list_strings / list_names / list_documents / list_bookmarks |
Listing |
search_procedures / search_strings |
Regex search |
procedure_pseudo_code / procedure_assembly |
Decompilation |
procedure_callees / procedure_callers |
Call relationships |
procedure_info / procedure_address |
Procedure metadata |
set_address_name / set_addresses_names |
Rename labels |
set_comment / set_inline_comment |
Write comments |
set_bookmark / unset_bookmark |
Bookmarks |
set_current_document |
Switch active document |
xrefs |
Cross-references |
8 RE-Specific Tools (added)
| Tool | Description |
|---|---|
binary_overview() |
Segment layout, procedure/string counts, document info |
swift_classes(pattern) |
Swift class hierarchy from mangled _TtC names |
get_objc_classes(pattern) |
Objective-C class names from labels |
get_objc_protocols() |
Objective-C protocol names from labels |
batch_decompile(addresses) |
Decompile up to 20 procedures at once |
get_call_graph(address, direction, depth) |
Recursive call graph traversal (forward/backward) |
analyze_swift_types() |
Categorize all Swift mangled names by module/type/method |
find_xrefs_to_name(name) |
Find references by name lookup |
Requirements
- Hopper Disassembler v6+ (ships the official MCP server)
- Python 3.10+
- Hopper open with a binary loaded and analyzed
Installation
pip install fastmcp
Usage
As an MCP Server (recommended)
Add to your MCP client configuration (Claude Desktop, Cursor, etc.):
{
"mcpServers": {
"betterBinaryMCP": {
"command": "python3",
"args": ["/path/to/betterBinaryMCP/server.py"]
}
}
}
Command Line
python3 server.py
Test Connection
python3 hopper_client.py
Testing
pip install pytest pytest-asyncio
python -m pytest tests/ -v
How It Works
- On startup, the server launches the official
HopperMCPServerbinary as a subprocess - Communicates via NDJSON (newline-delimited JSON) over STDIO — no HTTP, no Content-Length framing
- Proxied tools forward calls directly to the official server
- RE tools compose multiple official calls (e.g.,
swift_classescallslist_proceduresand parses_TtCmangled names)
Limitations
- Requires Hopper 6+ (the official MCP server binary must exist)
- The official server connects to Hopper via XPC — Hopper must be running with a document open
batch_decompileis limited to 20 procedures per callget_call_graphis limited to depth 5
License
MIT
Description
Reverse engineer anything with agents, from app behavior down to native binaries.
agent-skillsai-agentsbinary-analysisclaude-codeclicodexcordisctfdecompilerdeveloper-toolsdisassemblerdshdsh-pluginghidrahopperllmmcpmodel-context-protocolreverse-engineeringstatic-analysis
Readme
MIT
68 MiB
Languages
TypeScript
82.9%
JavaScript
9.8%
HTML
2.9%
Java
1.6%
Python
1.6%
Other
1.1%