BinaryAnalysis
MCP server for analyzing PE, ELF, and Mach-O binaries using LIEF
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:
- Clone the repository: git clone https://github.com/Ap3x/BinaryAnalysis-MCP.git
- Navigate to the project folder: cd BinaryAnalysis-MCP
- (Optional but recommended) Create and activate a virtual environment:
macOS / Linux
python -m venv .venv source .venv/bin/activateWindows
python -m venv .venv\Scripts\activate - Install required Python packages: pip install -r requirements.txt
- Run the MCP server: python server.py
- 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
ida-pro
AI-powered reverse engineering assistant that bridges IDA Pro with language models through MCP.
code-pathfinder
AI-Native Static Code Analysis for modern security teams. Built for finding vulnerabilities, advanced structural search, derive insights and supports MCP
Reversecore_MCP
A security-first MCP server empowering AI agents to orchestrate Ghidra, Radare2, and YARA for automated reverse engineering.
processhacker
your ai debugger, vibe hacking tool
asterisk
Asterisk Model Context Protocol (MCP) server.
Mcpwn
mcp security tester