Go to file
morluto d8a2b70565 Add in-process Python bridge for Hopper API 2026-07-12 03:25:18 +08:00
bridge Add in-process Python bridge for Hopper API 2026-07-12 03:25:18 +08:00
src Add Hopper transport: protocol, bridge launcher, client 2026-07-12 03:25:15 +08:00
.gitignore Add Node.js project tooling and config 2026-07-12 03:25:06 +08:00
.prettierignore Add Node.js project tooling and config 2026-07-12 03:25:06 +08:00
LICENSE Initial commit: betterBinaryMCP - Enhanced MCP server for Hopper Disassembler 2026-04-14 08:51:30 +08:00
README.md Initial commit: betterBinaryMCP - Enhanced MCP server for Hopper Disassembler 2026-04-14 08:51:30 +08:00
eslint.config.js Add Node.js project tooling and config 2026-07-12 03:25:06 +08:00
package-lock.json Add Node.js project tooling and config 2026-07-12 03:25:06 +08:00
package.json Add Node.js project tooling and config 2026-07-12 03:25:06 +08:00
tsconfig.build.json Add Node.js project tooling and config 2026-07-12 03:25:06 +08:00
tsconfig.json Add Node.js project tooling and config 2026-07-12 03:25:06 +08:00
vitest.config.ts Add Node.js project tooling and config 2026-07-12 03:25:06 +08:00

README.md

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 HopperMCPServer binary 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

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

  1. On startup, the server launches the official HopperMCPServer binary as a subprocess
  2. Communicates via NDJSON (newline-delimited JSON) over STDIO — no HTTP, no Content-Length framing
  3. Proxied tools forward calls directly to the official server
  4. RE tools compose multiple official calls (e.g., swift_classes calls list_procedures and parses _TtC mangled 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_decompile is limited to 20 procedures per call
  • get_call_graph is limited to depth 5

License

MIT