Binary MCP Server
Enables AI assistants to analyze binaries, debug processes, and inspect kernel state using Ghidra, x64dbg, WinDbg, and ILSpyCmd.
README
Binary MCP Server
MCP server that gives AI assistants the ability to analyze binaries, debug processes, and inspect kernel state. Supports static analysis via Ghidra, user-mode debugging via x64dbg, kernel debugging via WinDbg, and .NET decompilation via ILSpyCmd.
Quick Start
Install
# Windows (as Administrator)
irm https://raw.githubusercontent.com/Sarks0/binary-mcp/main/install.ps1 | iex
# Linux / macOS
curl -sSL https://raw.githubusercontent.com/Sarks0/binary-mcp/main/install.py | python3 -
# Manual
git clone https://github.com/Sarks0/binary-mcp.git
cd binary-mcp && uv sync
Connect to Claude
claude mcp add binary-analysis -- uv --directory /path/to/binary-mcp run python -m src.server
Or add to your MCP config (Claude Code ~/.claude/settings.json or Claude Desktop config):
{
"mcpServers": {
"binary-analysis": {
"command": "uv",
"args": ["--directory", "/path/to/binary-mcp", "run", "python", "-m", "src.server"],
"env": {"GHIDRA_HOME": "/path/to/ghidra"}
}
}
}
What You Can Do
Static Analysis - Analyze any binary without running it.
Analyze the binary at /path/to/malware.exe
Decompile the function at 0x401000
Find all suspicious API calls and crypto constants
Live Debugging - Control x64dbg from Claude.
Connect to x64dbg and set breakpoints on BCryptEncrypt
Trace execution until EAX contains a decrypted pointer
Find the OEP of this packed binary
Kernel Debugging - Inspect drivers and crash dumps.
Connect to the kernel debugger on port 50000
Show the dispatch table for \\Driver\\MyDriver
Analyze the crash dump at C:\Windows\MEMORY.DMP
.NET Analysis - Decompile managed assemblies.
Decompile the type MyNamespace.MyClass to C#
Capabilities (245 tools)
Static Analysis (Ghidra) - 35 tools
Analysis, decompilation, cross-references, memory maps, byte pattern search, function renaming, call graphs, API pattern detection (100+ Windows APIs), crypto constant identification, IOC extraction, and binary compatibility checking.
Dynamic Analysis (x64dbg) - 159 tools
| Category | What It Does |
|---|---|
| Execution Control | Run, pause, step into/over/out, run to user code, instruction undo |
| Breakpoints | Software, hardware, memory, DLL load, exception, and conditional breakpoints with logging |
| Tracing | Conditional tracing (ticnd/tocnd), trace recording, OEP finder for packed binaries |
| Memory | Read, write, dump, allocate, protect, pattern scan, string search, memory watch with diff |
| Registers & Stack | Read/write registers, stack trace with raw fallback, expression evaluation |
| Analysis | Control flow analysis, cross-references, function boundaries, disassembly with capstone fallback |
| Type System | Define structs/unions, overlay on memory (VisitType), parse C headers, enumerate types |
| Search | Find assembly patterns, GUIDs, module calls, string references, reference ranges |
| Anti-Debug | Detect and bypass anti-debug techniques (PEB, NtGlobalFlag, heap flags) |
| Watch & Logging | Watch expressions with watchdog triggers, API call logging, breakpoint hit logging |
| Annotations | Comments, labels, bookmarks, function boundaries, variables |
| Thread Control | Switch, suspend, resume threads individually or all at once |
| Process | Attach/detach, minidump creation, module listing with exports |
| Navigation | Navigate disassembly/dump/graph views, generic command execution |
Kernel Debugging (WinDbg) - 20 tools
Connection (KDNET, local kernel, crash dumps), execution control, breakpoints, register and memory inspection, driver object analysis, IOCTL decoding, process listing, and raw WinDbg command execution.
.NET Analysis (ILSpyCmd) - 7 tools
Type listing, C# decompilation, IL disassembly, type search, and full assembly decompilation.
PE Structure (pefile) - 1 tool
Comprehensive PE header, section, import, export, resource, debug, TLS, and Rich header analysis in a single fast call (<500ms). Three detail levels (basic/standard/full) with decoded characteristic flags, compiler attribution, and malware indicators.
Other - 23 tools
- Triage (3) - Quick file type detection, packer identification, entropy analysis
- Malware Analysis (4) - Behavior detection, threat chain identification, IOC extraction
- Control Flow (4) - CFG generation, cyclomatic complexity, loop detection, dead code
- Function Hashing (4) - Cross-binary function matching and similarity scoring
- VirusTotal (4) - Hash lookups, file submission, detection reports
- Session Management - Persistent analysis tracking across conversations
- Reporting (2) - Generate structured analysis reports
- YARA (2) - Rule scanning (optional
yara-pythondependency)
Supported Formats
| Format | Engine |
|---|---|
| PE (.exe, .dll, .sys) | Ghidra + x64dbg |
| .NET Assembly | ILSpyCmd |
| ELF (Linux) | Ghidra |
| Mach-O (macOS) | Ghidra |
| Kernel Drivers (.sys) | Ghidra + WinDbg |
| Crash Dumps (.dmp) | WinDbg |
Architecture
MCP Client (Claude Desktop / Claude Code)
|
FastMCP Server (stdio)
/ | \ \
Static Analysis Dynamic Kernel .NET
/ \ Analysis Debugging Analysis
Ghidra Python x64dbg WinDbg/KD ILSpyCmd
(headless) bytecode (HTTP) (Pybag COM)
| |
C++ Plugin DbgEng COM
| |
User Process Kernel Target
Environment Variables
| Variable | Description | Default |
|---|---|---|
GHIDRA_HOME |
Ghidra installation path | Auto-detected |
GHIDRA_TIMEOUT |
Analysis timeout (seconds) | 600 |
X64DBG_PATH |
x64dbg installation path | Auto-detected |
WINDBG_PATH |
WinDbg/CDB installation path | Auto-detected |
WINDBG_MODE |
Operating mode: kernel, user, dump |
kernel |
Development
uv run pytest # Run tests
uv run pytest --cov=src # With coverage
uv run ruff check src/ # Lint
Resources
License
Apache 2.0 - See LICENSE for details.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。