Heretek-RE/re-kaitai

GitHub: Heretek-RE/re-kaitai

re-kaitai 是一个 MCP 服务器,将 Kaitai Struct 封装为可在 AI 编程助手中调用的工具链,用于自定义二进制格式的解析与逆向工程。

Stars: 0 | Forks: 0

# re-kaitai 提供 [Kaitai Struct](https://kaitai.io/) 的 MCP server,用于自定义二进制格式逆向工程。 ## 工具 | 工具 | 功能 | |---|---| | `check_compiler` | 确认已安装 kaitai-struct-compiler | | `list_known_formats` | 列出内置的 .ksy 格式 | | `download_format` | 从 kaitai-formats 画廊下载 .ksy 文件 | | `compile_format` | 在 runtime 将 .ksy 编译为 Python | | `parse_with_format` | 使用已编译或预编译的格式解析二进制文件 | | `visualize` | 与 parse_with_format 功能相同,名称体现了其意图 | | `diff_parses` | 解析两个文件并返回结构性 diff | ## 安装 ``` # 系统依赖 brew install kaitai-struct-compiler # macOS scoop install kaitai-struct-compiler # Windows # Linux: 从 https://github.com/kaitai-io/kaitai_struct_compiler/releases 下载预构建版本 # Python pip install kaitaistruct pip install -e ./servers/re-kaitai ``` ## 使用模式(在 Claude Code 中) ``` 1. "Decode this firmware blob" 2. Claude identifies the file magic (e.g. LZMA header) 3. Claude downloads the matching .ksy: download_format("lzma") 4. Claude compiles: compile_format("/path/lzma.ksy") 5. Claude parses: parse_with_format(path="/path/blob", ksy_path="/path/lzma.ksy") 6. Claude inspects the parse tree, iterates on the .ksy, re-parses ``` Kaitai 的工作流程是迭代的:编译 → 解析 → 修复 schema → 重新编译 → 再次解析。
标签:Kaitai Struct, MCP服务, SOC Prime, 二进制解析, 云资产清单, 开发工具, 逆向工具, 逆向工程