re-kaitai
Click on "Deploy 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., "@re-kaitai Decode this firmware blob"
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.
re-kaitai
MCP server exposing Kaitai Struct for custom binary format reverse engineering.
Tools
Tool | What it does |
| Confirm kaitai-struct-compiler is installed |
| List bundled .ksy formats |
| Download a .ksy from the kaitai-formats gallery |
| Compile .ksy → Python at runtime |
| Parse a binary with a compiled or precompiled format |
| Same as parse_with_format, named for the intent |
| Parse two files and return a structural diff |
Related MCP server: mcp-pwntools
Install
# System dependency
brew install kaitai-struct-compiler # macOS
scoop install kaitai-struct-compiler # Windows
# Linux: download prebuilt from https://github.com/kaitai-io/kaitai_struct_compiler/releases
# Python
pip install kaitaistruct
pip install -e ./servers/re-kaitaiUsage pattern (in 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-parsesThe Kaitai workflow is iterative: compile → parse → fix the schema → re-compile → parse again.
Available Tools
8 toolscheck_compilerA
Return kaitai-struct-compiler version.
Inputs: no named parameters.
compile_formatC
Compile a .ksy file to a Python module.
Inputs: ksy_path (required), target.
diff_parsesC
Parse two files with the same format and return a structural diff.
Inputs: path_a (required), path_b (required), format_module, ksy_path.
download_formatC
Download a .ksy spec from the kaitai-formats gallery.
Inputs: name (required), target_dir.
list_known_formatsA
Return the list of bundled .ksy formats.
Inputs: no named parameters. Returns: result
parse_unityfsA
Parse a UnityFS / Addressables bundle, LZ4/LZMA-decompress the first block, and re-parse the directory from the decompressed stream.
The on-disk KSY parse covers the file header + bundle header
per-block size records; the directory actually lives inside the decompressed first block (the on-disk format stores compressed block payloads after the per-block size records, and the directory + asset bodies are in those compressed bytes). This helper LZ4 / LZMA-decompresses the requested block and re-parses the
Directorysub-type from the decompressed stream.
Args:
path: file to parse.
ksy_path: optional path to a .ksy to compile on the
fly. Defaults to the bundled
data/ksy/unity_addressables.ksy (the v0.3
corrected layout). Pass
data/ksy/unityfs.ksy for the older
bundle_header-wrappered variant.
decompress_block: index of the block to re-parse the
directory from (default 0, the canonical directory
block). Pass -1 to skip the directory re-parse.
Returns:
A dict with file_header, bundle_header,
decompressed_blocks[] (each with
uncompressed_size / compressed_size /
decompressed_size / data_b64), and
directory (or None if
decompress_block=-1).
Inputs: path (required), ksy_path, decompress_block.
parse_with_formatA
Parse a binary using either a precompiled module or a fresh .ksy.
Args: path: file to parse format_module: precompiled module (e.g. "kaitaistruct.gif") ksy_path: path to a .ksy file (will be compiled on the fly)
Inputs: path (required), format_module, ksy_path.
visualizeB
Return a tree-shaped dict suitable for visualization.
Same as parse_with_format but explicitly named for the "show me the structure of this file" intent.
Inputs: path (required), format_module, ksy_path.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Most tools have distinct purposes, but visualize is explicitly described as identical to parse_with_format, causing confusion. One overlapping pair reduces clarity.
Mix of verb_noun and verb patterns; 'visualize' is a single verb unlike others, and 'parse_with_format' uses 'with' breaking the convention. Inconsistent but still readable.
8 tools is well-scoped for a Kaitai Struct parsing server, covering compilation, parsing, downloading, listing, diffing, and a specialized format. No unnecessary tools.
Covers core workflows (compile, parse, diff, download, list), but lacks tools for format creation or conversion. Minor gaps, e.g., no way to inspect precompiled modules.
Related MCP Connectors
Repository knowledge graph MCP server for codebase understanding and debugging.
MCP server for the Vulners.com API
MCP server for progressive tool usage at any scale (see https://klavis.ai)
Related MCP Servers
- AlicenseCqualityBmaintenanceMCP Server for automated reverse engineering with IDA Pro.431,815 PyPI13,539MIT
- AlicenseNot gradedqualityDmaintenanceMCP server exposing pwntools 4.15.0 functionality for binary exploitation tasks.47 PyPI2MIT
- AlicenseNot gradedqualityDmaintenanceProduction-grade MCP server for universal reverse engineering automation.88GPL 3.0
- AlicenseAqualityCmaintenanceMCP server exposing LIEF for cross-format binary analysis, enabling parsing, section listing, imports/exports, disassembly, and string extraction for PE, ELF, MachO, DEX, ART, and OAT files.17MIT