Skip to main content

A sandboxed MCP tool for reverse engineering with multiple tool integrations

Project description

mcp-reverse-engineering

A sandboxed MCP (Model Context Protocol) tool for reverse engineering that provides a unified interface to various reverse engineering tools with security restrictions.

PyPI Python Ruff

Purpose

This project provides a secure, sandboxed environment for executing reverse engineering tools via CLI or MCP protocol. It wraps common reverse engineering utilities (strings, objdump, readelf, binwalk, etc.) with safety features like filesystem isolation, timeouts, and argument validation.

Install

pip install mcp-reverse-engineering

Or for development:

pip install -e ".[dev]"

MCP Server Installation

To use as an MCP server with Claude Desktop:

mcp install src/mcp_reverse_engineering/server.py

Usage

CLI

# Extract strings from a binary
mcp-re --tool strings --file /path/to/binary

# Disassemble a binary
mcp-re --tool objdump --args "['-d']" --file /path/to/binary

# Analyze ELF headers
mcp-re --tool readelf --args "['-h', '-s']" --file /path/to/elf

# Run binwalk for firmware analysis
mcp-re --tool binwalk --file /path/to/firmware.bin

Python API

from mcp_reverse_engineering import ReverseEngineeringEngine

# Create engine with default config
engine = ReverseEngineeringEngine(
    workspace="./workspace",
    timeout=30,
)

# List available tools
print(engine.list_available_tools())

# Execute a tool
result = engine.execute_tool("strings", ["-n", "8"], "/path/to/binary")
print(result)

MCP Server

from mcp_reverse_engineering.server import mcp, strings, objdump, readelf, binwalk

# Run the server (stdio transport for Claude Desktop)
if __name__ == "__main__":
    mcp.run()

API

ReverseEngineeringEngine

Main class for executing reverse engineering tools.

engine = ReverseEngineeringEngine(
    workspace: str = "./workspace",  # Sandbox directory
    timeout: int = 30,               # Tool execution timeout
    config_path: str | Path | None = None,  # YAML config path
)

Methods:

  • execute_tool(tool_name: str, args: List[str], file_path: Optional[str] = None) -> str - Execute a tool
  • list_available_tools() -> List[str] - List enabled tools
  • get_tool_documentation(tool_name: str) -> Dict[str, Any] - Get tool docs
  • get_mcp_tools() -> List[Dict[str, Any]] - Get MCP tool schemas

Available Tools

Tool Category Description
file file_tools Determine file type
strings file_tools Extract printable strings
hexdump file_tools Hexadecimal dump
xxd file_tools Hexadecimal dump
objdump binary_tools Disassemble binary
readelf binary_tools Read ELF headers
binwalk firmware_tools Firmware analysis

Development

# Clone the repository
git clone https://github.com/daedalus/mcp_reverse_engineering.git
cd mcp_reverse_engineering

# Install dependencies
pip install -e ".[test]"

# Run tests
pytest

# Format code
ruff format src/ tests/

# Lint
ruff check src/ tests/

# Type check
mypy src/

# Install pre-commit hooks
pip install pre-commit
pre-commit install

MCP Server Configuration

mcp-name: "io.github.daedalus/mcp-reverse-engineering"

Requirements

  • Python 3.11+
  • External tools: binwalk, radare2, ghidra, etc. (must be installed separately)

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_reverse_engineering-0.1.1.tar.gz (14.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_reverse_engineering-0.1.1-py3-none-any.whl (20.7 kB view details)

Uploaded Python 3

File details

Details for the file mcp_reverse_engineering-0.1.1.tar.gz.

File metadata

  • Download URL: mcp_reverse_engineering-0.1.1.tar.gz
  • Upload date:
  • Size: 14.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mcp_reverse_engineering-0.1.1.tar.gz
Algorithm Hash digest
SHA256 4331fbc8449a5e907a4e8a5b08ad7eac96481f4ffb49e1c282752ea719b480d3
MD5 56da0cf7be0e6f30aa79f72f805c19be
BLAKE2b-256 307340a212e084a910c8876447f08fb547c43d5fb012d565a9a3bdfda540f00c

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_reverse_engineering-0.1.1.tar.gz:

Publisher: pypi-publish.yml on daedalus/mcp_reverse_engineering

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_reverse_engineering-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_reverse_engineering-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1474dfd390d20170f5c20e373dd3c44b87aa20cee55f29b27c336893c3c88f8f
MD5 a9f4c7f6f7c516a925abe052116f8a30
BLAKE2b-256 84895a8e724ee3e6916b767bd958975678f094d6e110461bd09ea01b6f6ae0d5

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_reverse_engineering-0.1.1-py3-none-any.whl:

Publisher: pypi-publish.yml on daedalus/mcp_reverse_engineering

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page