capstone-mcp-server
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., "@capstone-mcp-serverdisassemble hex bytes 554889e5 for x86_64"
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.
Capstone MCP Server
中文 | English
基于 Capstone 反汇编引擎的 MCP (Model Context Protocol) 服务器,为大语言模型提供二进制分析能力。
功能特性
多架构支持: x86 (16/32/64)、ARM/ARM64、MIPS (32/64)、PowerPC (32/64)
多格式解析: PE、ELF、Mach-O 二进制文件自动识别与解析
反汇编工具: 支持 hex 字节串、文件区段、虚拟地址、文件偏移等多种输入方式
控制流分析: 基本块识别、跳转/调用/返回分析
指令搜索: 按助记符或指令类别过滤搜索
架构自动检测: 从 PE/ELF/Mach-O 文件头自动推断 CPU 架构
ROP Gadget 搜索: 查找以 ret 结尾的指令片段,用于 ROP 链构造
安全特性检测: 类似 checksec,检测 NX/PIE/RELRO/Canary/ASLR 等
PLT/GOT & IAT 分析: ELF 动态链接表与 PE 导入表分析
字符串提取: 支持 ASCII 和 UTF-16LE 编码的可读字符串扫描
XOR 编解码: 单字节暴力破解与多字节密钥 XOR 运算
缓冲区溢出辅助: De Bruijn 序列生成与偏移计算(pattern_create/offset)
加密常量识别: 检测 AES S-Box、SHA、MD5、TEA、CRC32、Base64 等常量
Shellcode 分析: NOP sled、syscall、jmp/call esp 等模式检测
Syscall 查找: Linux x86/x64/ARM/ARM64 系统调用表查询
Hex Dump: 格式化的十六进制转储查看
交叉引用查询: 在代码中搜索对指定地址的所有引用(call/jump/立即数/内存访问)
Related MCP server: GhidraMCP
提供的 MCP 工具
基础反汇编工具
工具 | 说明 |
| 列出所有支持的 CPU 架构 |
| 反汇编十六进制字节串 |
| 反汇编二进制文件的指定区段 |
| 反汇编文件中指定虚拟地址处的代码 |
| 反汇编二进制文件入口点 |
| 反汇编文件偏移处的原始字节 |
| 获取二进制文件元信息(格式、架构、区段、导入/导出) |
| 在 hex 字节串中搜索指令模式 |
| 在二进制文件中搜索指令模式 |
| 对机器码进行控制流分析 |
| 在 hex 字节串中搜索对目标地址的交叉引用 |
| 在二进制文件中搜索对目标地址的交叉引用 |
CTF / 逆向扩展工具
工具 | 说明 | CTF 场景 |
| 在 hex 字节串中搜索 ROP gadgets | Pwn - ROP 链构造 |
| 在二进制文件中搜索 ROP gadgets | Pwn - ROP 链构造 |
| 提取可读字符串(类似 | RE / Misc / Forensics |
| 单字节 XOR 暴力破解 | Crypto / RE |
| 指定密钥 XOR 编解码 | Crypto / RE |
| 生成/查找缓冲区溢出 pattern(De Bruijn) | Pwn - 偏移计算 |
| 检测安全特性(类似 | Pwn - 漏洞利用前置 |
| 分析 ELF PLT/GOT 或 PE IAT 表 | Pwn - GOT overwrite |
| 十六进制转储查看文件内容 | RE / Forensics |
| 检测加密算法常量(AES/SHA/MD5/TEA 等) | Crypto / RE |
| Shellcode 综合分析(模式检测+统计) | Pwn / RE |
| Linux 系统调用查找(按编号或名称) | Pwn / RE |
| 列出平台全部系统调用表 | Pwn / RE |
安装
# 克隆项目
git clone <repo-url>
cd capstone-mcp-server
# 安装依赖
pip install -e .运行
直接运行
capstone-mcp通过 Python 模块运行
python -m capstone_mcp.server使用 MCP Inspector 调试
mcp dev src/capstone_mcp/server.py配置 MCP 客户端
Windsurf / Claude Desktop
在 MCP 配置文件中添加:
{
"mcpServers": {
"capstone-disasm": {
"command": "python",
"args": ["-m", "capstone_mcp.server"],
"cwd": "/path/to/capstone-mcp-server"
}
}
}或者使用 uv 运行:
{
"mcpServers": {
"capstone-disasm": {
"command": "uv",
"args": ["run", "--directory", "/path/to/capstone-mcp-server", "capstone-mcp"]
}
}
}使用示例
反汇编 hex 字节串
大模型可调用 disassemble_hex 工具:
输入: hex_code="554889e54883ec10c745fc00000000b8000000004883c4105dc3", arch="x86_64"输出:
Architecture: x86_64
Base Address: 0x0
Input Size: 25 bytes
────────────────────────────────────────────────────────────────
0x00000000: 55 push rbp
0x00000001: 4889e5 mov rbp, rsp
0x00000004: 4883ec10 sub rsp, 0x10
0x00000008: c745fc00000000 mov dword ptr [rbp - 4], 0
0x0000000f: b800000000 mov eax, 0
0x00000014: 4883c410 add rsp, 0x10
0x00000018: 5d pop rbp
0x00000019: c3 ret分析二进制文件
1. 调用 get_binary_info("C:/path/to/program.exe") → 获取文件概要
2. 调用 disassemble_entrypoint("C:/path/to/program.exe") → 查看入口点
3. 调用 search_instructions_in_file("C:/path/to/program.exe", group="call") → 查找所有调用依赖
许可证
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
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/Tokeii0/capstone-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server