crypto-reverse-mcp
A Model Context Protocol (MCP) server that detects cryptographic algorithms, identifies obfuscation, reconstructs standalone implementations, generates SDKs, and bypasses anti-debugging.
README
crypto-reverse-mcp
The missing "last mile" of JS reverse engineering. A Model Context Protocol (MCP) server that detects cryptographic algorithms, identifies obfuscation, reconstructs standalone implementations, generates SDKs, and bypasses anti-debugging — designed to complement browser-debugging MCP servers like js-reverse-mcp.
English | 中文
Why this exists
Existing JS-reverse MCP servers focus on browser debugging (breakpoints, network capture, script analysis). They help you find the encryption function. But they don't answer:
- What algorithm is this? (AES? SM2? custom?)
- Where does the key come from? (static? derived? from server?)
- How do I reproduce it in Python?
- How do I generate a complete SDK?
- How do I bypass the anti-debugging that blocks my breakpoints?
crypto-reverse-mcp fills these gaps. It's a complement, not a replacement — pair it with js-reverse-mcp for the full workflow:
js-reverse-mcp: open page → find script → set breakpoint → capture I/O
crypto-reverse-mcp: identify algorithm → extract key → reconstruct Python → generate SDK
Features
| Tool | What it does |
|---|---|
detect_crypto |
Identify AES/DES/RSA/SM2/SM3/SM4/HMAC/MD5/SHA + key/IV source + cipher mode |
identify_obfuscation |
Detect webpack/JSFuck/AAEncode/obfuscator.io/packer/control-flow-flattening |
extract_crypto_constants |
Find S-boxes, initial hash values, round constants, curve parameters |
reconstruct_algorithm |
Generate standalone Python/Node implementation from JS source + samples |
generate_sdk |
Produce complete Python/Node/Go SDK with signing, login, error handling |
bypass_anti_debug |
Generate injection scripts to neutralize debugger loops, devtools detection, timing checks |
Quick Start
Claude Desktop / Cursor / VS Code Copilot
{
"mcpServers": {
"crypto-reverse": {
"command": "npx",
"args": ["-y", "crypto-reverse-mcp@latest"]
}
}
}
Claude Code
claude mcp add crypto-reverse -- npx -y crypto-reverse-mcp@latest
Codex CLI
codex mcp add crypto-reverse -- npx -y crypto-reverse-mcp@latest
VS Code Copilot
code --add-mcp '{"name":"crypto-reverse","command":"npx","args":["-y","crypto-reverse-mcp@latest"]}'
Requirements
- Node.js 18+
Tool Details
detect_crypto
Input: JS source code (string)
Output: List of detected crypto usages with:
- Algorithm name (AES, RSA, SM2, SM3, SM4, MD5, SHA-1, SHA-256, HMAC, PBKDF2, etc.)
- Category (symmetric / asymmetric / hash / mac / kdf / encoding)
- Library (CryptoJS, JSEncrypt, sm-crypto, node-forge, jsrsasign, WebCrypto, Node crypto)
- Location (line:column) + code snippet
- Confidence score (0-100%)
- Key source (static string / variable / localStorage / cookie / app config)
- IV source (for symmetric ciphers)
- Cipher mode (CBC/ECB/GCM/CTR/CFB/OFB)
- Padding (Pkcs7/ZeroPadding/NoPadding)
Detection methods:
- Library API patterns (50+ regex patterns)
- Web Crypto API / Node crypto module calls
- Crypto constants (AES S-box, SHA-256 initial hash, SM3 IV, SM4 S-box, DES S-box, etc.)
- Function name heuristics
identify_obfuscation
Input: JS source code
Output: Obfuscation type + confidence + unpack strategy
Detects: webpack-bundle, obfuscator.io, JSFuck, AAEncode, JJEncode, dean-edwards-packer, eval-loader, control-flow-flattening, string-array, dead-code-injection, minified, terser-minified
Each detection includes:
- Confidence score
- Evidence (what pattern matched)
- Unpack hint (how to approach unpacking)
- Deobfuscation strategy (step-by-step)
- Recommended tools
extract_crypto_constants
Input: JS source code
Output: List of found crypto constants
Detects:
- AES S-box / Inverse S-box / Rcon
- SHA-256 initial hash values + round constants
- SHA-1 initial hash values
- MD5 initial values + T-constants
- SM3 IV + Tj constants
- SM4 S-box + FK + CK constants
- DES S-box + IP permutation
- SM2 / NIST P-256 curve parameters
- CRC32 polynomial
- Base64 alphabet
reconstruct_algorithm
Input: JS source code + optional input/output samples + target language
Output: Self-contained Python or Node implementation
How it works:
- Detects algorithm type from source patterns
- Extracts parameters (key, IV, mode, padding)
- Generates implementation using standard libraries (pycryptodome, gmssl)
- If samples provided, includes verification code
Supported algorithms: AES (CBC/ECB/GCM/CTR), DES, TripleDES, MD5, SHA-1, SHA-256, HMAC-SHA256, HMAC-MD5, RSA (PKCS1), SM2, SM3, SM4, Base64
generate_sdk
Input: API specification (URL, method, headers, sign spec, login spec) + target language
Output: Complete SDK file with:
- Request construction with auto-signing
- Crypto signature generation (HMAC/MD5/custom)
- Login flow (with password encryption hook)
- Error handling
- Usage example
Languages: Python (requests), Node.js (http/https), Go (net/http)
bypass_anti_debug
Input: JS source code (optional) + techniques to bypass + output format
Output: Bypass injection script
Techniques:
debugger_loop— Neutralizedebuggerstatements in loopssetInterval_debugger— BlocksetIntervalcallbacks containingdebuggerdevtools_window_size— FixouterWidth - innerWidthdetectiondevtools_console_access— Prevent console object inspectiontiming_check— CapDate.now()/performance.now()deltasconsole_getter_trap— UndoObject.defineProperty(console, ...)function_toString_check— MakeFunction.toString()return native code
Output formats: inject_script (Tampermonkey/snippet), fiddler_rule (Fiddler OnBeforeResponse), chrome_devtools_snippet (DevTools Snippets)
Typical Workflow
1. [js-reverse-mcp] new_page → navigate to target site
2. [js-reverse-mcp] search_in_sources for "encrypt" / "sign"
3. [crypto-reverse-mcp] detect_crypto on found script → identify AES-CBC
4. [crypto-reverse-mcp] extract_crypto_constants → confirm S-box present
5. [js-reverse-mcp] set_breakpoint_on_text → capture input/output
6. [crypto-reverse-mcp] reconstruct_algorithm with samples → get Python code
7. [crypto-reverse-mcp] generate_sdk → complete API SDK
8. [crypto-reverse-mcp] bypass_anti_debug → if blocked by debugger
Local Development
git clone https://github.com/crypto-reverse/crypto-reverse-mcp.git
cd crypto-reverse-mcp
npm install
npm run build
npm start
Debug with MCP Inspector
npx @modelcontextprotocol/inspector node build/src/index.js
Test stdio communication
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"test","version":"1.0.0"}}}' | node build/src/index.js
Configuration
No configuration required. All tools are stateless and work offline.
Comparison with other JS-reverse MCP servers
| Feature | js-reverse-mcp | js-reverse-pro-mcp | mcp-reverse-server | crypto-reverse-mcp |
|---|---|---|---|---|
| Browser debugging | ✅ | ✅ | ✅ | ❌ |
| Breakpoints | ✅ | ✅ | ✅ | ❌ |
| Network capture | ✅ | ✅ | ✅ | ❌ |
| Hook framework | ❌ | ✅ | ❌ | ❌ |
| Deobfuscation | ❌ | ✅ (Babel) | ✅ (AST) | ⚠️ (identify only) |
| JSVMP analysis | ❌ | ❌ | ✅ | ❌ |
| Crypto algorithm detection | ❌ | ⚠️ (keyword scan) | ⚠️ | ✅ (50+ patterns) |
| Crypto constants extraction | ❌ | ❌ | ❌ | ✅ (S-box, IV, curves) |
| Algorithm reconstruction | ❌ | ❌ | ❌ | ✅ (Python/Node) |
| SDK generation | ❌ | ❌ | ❌ | ✅ (Python/Node/Go) |
| Anti-debug bypass | ❌ | ❌ | ❌ | ✅ (7 techniques) |
| Obfuscation identification | ❌ | ❌ | ❌ | ✅ (11 types) |
Use together for maximum coverage. crypto-reverse-mcp is designed to be complementary.
Roadmap
- [ ] v0.2:
trace_crypto_chain— trace encryption from ciphertext back to plaintext - [ ] v0.2: Improved minified code analysis (variable flow tracking)
- [ ] v0.3: WASM crypto module detection
- [ ] v0.3: Custom algorithm identification via I/O analysis
- [ ] v0.4: Java SDK generation
- [ ] v0.4: RPC-style API SDK generation (gRPC, GraphQL)
License
MIT
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。