BinAssistMCP
Built as a Python-based MCP server that bridges Binary Ninja's API with LLMs, requiring Python 3.8+ and various Python packages including Pydantic for data validation
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@BinAssistMCPdecompile the main function and explain what it does"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
BinAssistMCP
Comprehensive Model Context Protocol (MCP) server for Binary Ninja with AI-powered reverse engineering capabilities
Summary
BinAssistMCP is a powerful bridge between Binary Ninja and Large Language Models (LLMs) like Claude, providing comprehensive reverse engineering tools through the Model Context Protocol (MCP). It enables AI-assisted binary analysis by exposing Binary Ninja's advanced capabilities through Server-Sent Events (SSE) and Streamable HTTP transports.
Key Features
MCP 2025-11-25 Compliant: Full support for tool annotations, resources, and prompts
Dual Transport Support: SSE (Server-Sent Events) and Streamable HTTP transports
45 Consolidated Tools: Streamlined Binary Ninja API wrapper with unified tool design
8 MCP Resources: Browsable, cacheable binary metadata
7 Guided Prompts: Pre-built workflows for common reverse engineering tasks
Multi-Binary Sessions: Concurrent analysis of multiple binaries with intelligent context management
Context-Rich Code Output: Function signatures and Binary Ninja comments are embedded in code results
Analysis-Safe Queries: Code retrieval uses already-loaded IL and never forces global reanalysis
Session-Independent Discovery: Direct tool calls discover open Binary Ninja views without requiring a prior listing call
Nonblocking Binary Opens: Large binaries and
.bndbdatabases open asynchronously with pollable operation statusThread-Safe: RLock-based synchronization for concurrent access
Auto-Integration: Seamless Binary Ninja plugin with automatic startup capabilities
Use Cases
AI-Assisted Reverse Engineering: Leverage LLMs for intelligent code analysis and documentation
Protocol Analysis: Trace network data flows and reconstruct protocol structures
Vulnerability Research: Systematic security audits with guided workflows
Automated Binary Analysis: Script complex analysis workflows with natural language
Code Understanding: Generate comprehensive documentation and explanations
Related MCP server: X64Dbg MCP Server
Architecture
src/binassist_mcp/
├── server.py # FastMCP server - SSE/Streamable HTTP transport, tool registration
├── tools.py # Binary Ninja API wrapper - 45 MCP tools
├── plugin.py # Binary Ninja plugin integration
├── context.py # Thread-safe multi-binary session management
├── config.py # Pydantic configuration with Binary Ninja settings
├── prompts.py # 7 guided workflow prompts
├── resources.py # 8 MCP resource definitions
├── cache.py # Cache primitives (not currently connected to MCP tools)
├── tasks.py # Task lifecycle support (tool dispatch is not yet implemented)
├── logging.py # Binary Ninja logging integration
└── utils.py # Utility functions
__init__.py # Plugin entry point (root level)Tools (45 Total)
BinAssistMCP provides 45 tools organized into functional categories. Tools include MCP annotations (readOnlyHint, idempotentHint) to help clients make informed decisions.
Binary Management
Tool | Description |
| Synchronize with Binary Ninja and list all loaded binary files |
| Check analysis status and metadata |
| Poll a queued open by operation ID, path, or name and report analysis progress |
| Queue a nonblocking binary or |
| Force analysis update and wait for completion |
| Export the patched binary or Binary Ninja database to disk |
By default, open_binary validates its paths, schedules the Binary Ninja open, and immediately returns an operation_id with status="opening". Poll get_binary_status(operation_id) until it reports ready or failed. When ready, its name field is the final context name to pass to analysis tools. Concurrent requests for the same path reuse the active operation. Set wait_for_analysis=true only when legacy blocking behavior is explicitly required.
Code Analysis (Consolidated)
Tool | Description |
| Read analysis-safe code with signatures and comments; supports |
| Get Low-Level IL for a function |
| Generate the native masked byte signature for a function |
| Comprehensive function analysis with control flow and complexity metrics |
| Get basic block information for control flow analysis |
| Get stack frame layout with variable offsets |
get_code behavior
get_code is a read-only query. It does not clear analysis_skipped, request IL generation, or run global analysis. For format="decompile", it returns already-loaded HLIL when available, then falls back through MLIL and LLIL to instruction-aligned disassembly. Use update_analysis_and_wait explicitly when fresh analysis is desired.
The code string starts with the current function signature and includes function-level and instruction-level Binary Ninja comments. The response contains:
functionandaddress: resolved function identityformat: requested formatactual_format: representation actually returned, ornullwhen an explicitly requested IL is unavailablefallback_used: whetherdecompileused a lower-level representationcode: rendered code, signature, and commentsnote: present when a fallback explains why and what was returned
Cross-References (Consolidated)
Tool | Description |
| Unified cross-references with |
Comments (Consolidated)
Tool | Description |
| Unified comment management - actions: |
Variables (Consolidated)
Tool | Description |
| Unified variable management - actions: |
Types (Consolidated)
Tool | Description |
| Unified type management - actions: |
| List all classes and structures |
Function Discovery
Tool | Description |
| List all functions with metadata |
| Find functions by name pattern |
| Advanced filtering by size, complexity, parameters |
| Multi-target search (name, comments, calls, variables) |
| Comprehensive statistics for all functions |
Symbol Management
Tool | Description |
| Rename functions and data variables |
| Rename multiple symbols in one operation |
| List namespaces and symbol organization |
Binary Information
Tool | Description |
| Import table grouped by module |
| Export table with symbol information |
| Paginated string extraction |
| Search strings by pattern |
| Memory segment layout |
| Binary section information |
| List all binary entry points |
Data Analysis
Tool | Description |
| Define data variables at addresses |
| List all defined data variables |
| Read and analyze raw data |
| Search for byte patterns in binary |
Patching
Tool | Description |
| Patch raw bytes in the binary at an address |
| Assemble instruction text at an address and optionally patch it |
Navigation & Bookmarks
Tool | Description |
| Get current cursor position with context |
| Identify function at current address |
| Unified bookmark management - actions: |
Task Management (Experimental)
Tool | Description |
| Create a placeholder background task record; |
| Check status of async operations |
| List all pending/running tasks |
| Cancel a running task |
These APIs currently exercise task lifecycle management only. They do not execute the named MCP tool in the background.
MCP Resources (8 Total)
Resources provide browsable, cacheable data that clients can access without tool calls.
URI Pattern | Description |
| Complete binary overview |
| All functions with metadata |
| Import table |
| Export table |
| String table |
| Binary metadata (arch, platform, entry point) |
| Memory segments with permissions |
| Binary sections |
MCP Prompts (7 Total)
Pre-built prompts guide LLMs through structured analysis workflows.
Prompt | Arguments | Description |
|
| Comprehensive function analysis workflow |
|
| Security audit checklist (memory safety, input validation, crypto) |
|
| Generate Doxygen-style documentation |
|
| Track data dependencies and taint propagation |
|
| Diff two functions for similarity analysis |
|
| Recover structure definitions from usage patterns |
|
| Trace POSIX/Winsock send/recv for protocol analysis |
Example: Network Protocol Analysis
The trace_network_data prompt guides analysis of network communication:
Identify Network Functions: Finds POSIX (
send/recv/sendto/recvfrom) and Winsock (WSASend/WSARecv) callsTrace Call Stacks: Maps application handlers down to network I/O
Analyze Buffers: Identifies protocol structures (headers, length fields, TLV encoding)
Reconstruct Protocols: Generates C struct definitions for message formats
Security Assessment: Checks for buffer overflows, integer issues, information disclosure
Installation
Prerequisites
Binary Ninja: Version 5000 or higher
Python: 3.10+ (typically bundled with Binary Ninja and required by the pinned MCP SDK)
Platform: Windows, macOS, or Linux
NOTE: Windows users should start with: BinAssistMCP on Windows
Option 1: Binary Ninja Plugin Manager (Recommended)
Open Binary Ninja
Navigate to Tools → Manage Plugins
Search for "BinAssistMCP"
Click Install
Restart Binary Ninja
Option 2: Manual Installation
# Clone the repository
git clone https://github.com/symgraph/BinAssistMCP.git
cd BinAssistMCP
# Install dependencies
pip install -r requirements.txtCopy to your Binary Ninja plugins directory:
Platform | Path |
Windows |
|
macOS |
|
Linux |
|
Configuration
Binary Ninja Settings
Open Edit → Preferences → binassistmcp:
Setting | Default | Description |
|
| Server bind address |
|
| Server port |
|
| Transport: |
|
| Maximum concurrent binaries |
|
| Auto-start server on file load |
Environment Variables
export BINASSISTMCP_SERVER__HOST=localhost
export BINASSISTMCP_SERVER__PORT=8000
export BINASSISTMCP_SERVER__TRANSPORT=streamablehttp
export BINASSISTMCP_BINARY__MAX_BINARIES=10Usage
Starting the Server
Via Binary Ninja Menu:
Tools → BinAssistMCP → Start Server
Check log panel for:
BinAssistMCP server started on http://localhost:8000
Auto-Startup: Server starts automatically when Binary Ninja loads a file (configurable).
Connecting MCP Clients
Streamable HTTP (Default):
http://localhost:8000/mcpServer-Sent Events:
http://localhost:8000/sseClaude Desktop Configuration
Add to your Claude Desktop MCP configuration (claude_desktop_config.json):
{
"mcpServers": {
"binassist": {
"url": "http://localhost:8000/mcp"
}
}
}Integration Examples
Most binary-specific tools require the context name in filename. list_binaries returns these names, but it is not an initialization requirement: direct filename-based calls refresh the context from Binary Ninja automatically when necessary.
Basic Function Analysis
User: "Analyze the main function and explain what it does"
Claude uses:
1. list_binaries() - obtain the context filename
2. get_functions(filename='sample.bndb') - find main
3. get_code(filename='sample.bndb', function_name_or_address='main', format='decompile')
4. xrefs(filename='sample.bndb', address_or_name='main', direction='from')
5. analyze_function(filename='sample.bndb', function_name_or_address='main')Vulnerability Research
User: "Find buffer overflow vulnerabilities in input handling functions"
Claude uses:
1. search_functions_advanced(filename='sample.bndb', search_term='strcpy', search_in='calls')
2. get_code(filename='sample.bndb', function_name_or_address='handler', format='decompile')
3. variables(filename='sample.bndb', action='list', function_name_or_address='handler')
4. comments(filename='sample.bndb', action='set', address='0x401000', text='Unchecked copy')Protocol Reverse Engineering
User: "Analyze the network protocol used by this binary"
Claude uses the trace_network_data prompt:
1. Identifies send/recv call sites
2. Traces data flow from handlers to network I/O
3. Reconstructs message structures
4. Checks for network vulnerabilitiesTroubleshooting
Server Issues
Problem | Solution |
Server won't start | Check port 8000 availability, verify dependencies |
Connection refused | Ensure server is running, check firewall settings |
A requested IL is unavailable | Run |
Binary name is rejected | Call |
Performance
Memory usage: Reduce
max_binariessettingCode retrieval:
get_codereturns loaded analysis immediately and falls back rather than triggering analysis
Logs
Check Binary Ninja's Log panel for detailed error messages.
Contributing
Fork the repository
Create a feature branch
Follow existing code patterns (Pydantic models, type hints, docstrings)
Test with multiple binary types
Submit a pull request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Code intelligence platform for AI agents. 20 tools for architecture, security & impact analysis.
Hunt zero-days by talking to binaries. 40+ tools. Hosted, OAuth + SSO, invite: hi@byteray.ai
- mcpOAuthcom.vibgrate
Query your team's drift, vulnerability, and upgrade data from any AI assistant. OAuth 2.1, 51 tools.
AI-powered codebase analysis — call graphs, security, dead code, complexity. 150+ tools.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA server that enables seamless integration of Binary Ninja's reverse engineering capabilities with LLM assistance, allowing AI tools like Claude to interact with binary analysis features in real-time.427GPL 3.0
- FlicenseNot gradedqualityDmaintenanceEnables AI-assisted reverse engineering and debugging through x64dbg integration. Provides 40+ tools for breakpoint management, memory operations, register manipulation, code analysis, process control, and advanced debugging features.22-
- AlicenseCqualityDmaintenanceEnables AI-assisted reverse engineering in IDA Pro by providing tools to analyze binaries, decompile functions, manage comments, search patterns, and interact with the IDA database through natural language.562MIT
- AlicenseNot gradedqualityCmaintenanceBridges Ghidra's reverse engineering capabilities with AI tools through 179 specialized tools for automated binary analysis and documentation. It supports full read/write access for function decompilation, renaming, and cross-binary documentation transfer in both GUI and headless modes.Apache 2.0
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/symgraph/BinAssistMCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server