Get the FREE Ultimate OpenClaw Setup Guide →

BinaryAnalysis

MCP server for analyzing PE, ELF, and Mach-O binaries using LIEF

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio ap3x-binaryanalysis-mcp python server.py

How to use

BinaryAnalysis-MCP is an MCP server that uses the LIEF library to statically analyze binary files (PE, ELF, Mach-O, and COFF). Pass an absolute file path to one of its tools and the server will auto-detect the binary format to provide detailed information. Available tools include quick triage (get_binary_info), full header dumps (get_binary_headers), section listing (get_binary_sections), import/export data (get_binary_imports / get_binary_exports), dynamic libraries (get_binary_libraries), and security/signature assessments (get_binary_security, get_binary_signatures). This setup is designed for rapid binary analysis via MCP clients, enabling you to query file properties, dependencies, and security features in a consistent JSON format.

How to install

Prerequisites:

  • Python 3.10 or newer
  • Git

Steps:

  1. Clone the repository: git clone https://github.com/Ap3x/BinaryAnalysis-MCP.git
  2. Navigate to the project folder: cd BinaryAnalysis-MCP
  3. (Optional but recommended) Create and activate a virtual environment:

    macOS / Linux

    python -m venv .venv source .venv/bin/activate

    Windows

    python -m venv .venv\Scripts\activate
  4. Install required Python packages: pip install -r requirements.txt
  5. Run the MCP server: python server.py
  6. The server will communicate over stdio as defined by the MCP protocol. You can connect with an MCP client configured to launch this Python process and talk via stdio.

Additional notes

Tips and considerations:

  • Ensure the absolute path to the target binary is accessible by the server process.
  • The tools automatically detect the binary format (PE/ELF/Mach-O/COFF) and provide relevant data fields.
  • If running inside a virtual environment, point your client to the interpreter and server script within the venv.
  • The MCP server communicates over stdio; configure clients accordingly (transport: stdio or equivalent).
  • Check the test binaries under binary-samples/ for representative inputs during local testing.
  • If you modify dependencies, reinstall with pip install -r requirements.txt to ensure compatibility.

Related MCP Servers

Sponsor this space

Reach thousands of developers