Content
# Tool List
> Chrome browser JS reverse analysis MCP tool - specifically designed for dynamic analysis and reduction of login box encryption logic in CTF/Web security scenarios.
**Recommendations**: You can use the newly released Qoder to start, with 200 free calls per day to Qwen3.7-Max. Before running, you can let Qcoder automatically complete the project所需的 dependencies and modify the configuration file according to your local environment.
## I. Project Introduction
This project is a JS reverse analysis toolset based on the **MCP (Model Context Protocol)** protocol, which dynamically analyzes the JavaScript encryption logic in the target webpage through the Chrome DevTools Protocol (CDP), automatically identifies the encryption algorithm, extracts the key, and generates available encryption/decryption scripts.
**Core Capabilities:**
- Control Chrome browser based on Puppeteer, dynamically execute target page JS
- Intercept network requests, obtain script source code, and Hook function calls using CDP protocol
- Built-in encryption algorithm feature library, supporting AES/DES/RSA/MD5/SHA/SM2/SM4/Base64, etc.
- Automatically generate encryption/decryption scripts in Python and JavaScript
- Expose 31 standardized tool interfaces through MCP protocol, supporting integration with AI assistants
## II. Technology Stack
| Category | Technology | Description |
|------|------|------|
| Language | TypeScript 5.7 + Node.js ≥18 | Main development language |
| Protocol | @modelcontextprotocol/sdk v1.29 | MCP protocol SDK |
| Browser | puppeteer-core v23 | Chrome automation control |
| AST Analysis | acorn + acorn-walk | JS syntax tree parsing and traversal |
| Encryption Analysis | crypto-js + node-forge | Encryption algorithm verification and restoration |
| Code Beautification | js-beautify | Obfuscated JS code formatting |
| Template Engine | mustache | Script generation template |
| Data Verification | zod v3.23 | MCP message Schema verification |
## III. Project Structure
```
js-reverse-mcp/
├── src/ # Source code directory
│ ├── index.ts # Program entry - register all tool modules, start stdio transmission
│ ├── server.ts # MCP Server creation and configuration
│ │
│ ├── browser/
│ │ └── manager.ts # Browser singleton manager - Puppeteer lifecycle management
│ │
│ ├── tools/ # MCP tool modules (6 modules, 31 tools)
│ │ ├── navigation.ts # Browser navigation tool (5 tools)
│ │ ├── network.ts # Network interception tool (6 tools)
│ │ ├── source-analysis.ts # JS source code analysis tool (6 tools)
│ │ ├── runtime.ts # Runtime analysis tool (5 tools)
│ │ ├── crypto-detect.ts # Encryption detection tool (5 tools)
│ │ └── script-gen.ts # Script generation tool (4 tools)
│ │
│ ├── analysis/
│ │ └── crypto-patterns.ts # Encryption algorithm feature library - static pattern matching + ciphertext format recognition
│ │
│ ├── generators/
│ │ ├── python-template.ts # Python script template generator (AES/DES/RSA/MD5/custom)
│ │ └── javascript-template.ts # JavaScript script template generator
│ │
│ ├── storage/
│ │ └── request-store.ts # Request data storage - memory + file double-layer persistence
│ │
│ └── utils/
│ └── logger.ts # Log tool (all logs go to stderr, no MCP stdio destruction)
│
├── build/ # Compilation output directory (tsc generation)
├── output/ # Generated script output directory
├── mcp-config.json # MCP configuration file example
├── package.json # Project dependencies and scripts
└── tsconfig.json # TypeScript compilation configuration
```
## IV. Tool List
### 4.1 Browser Navigation Tool (navigation.ts) - 5
| Tool Name | Function | Key Parameters |
|--------|------|----------|
| `browser_launch` | Launch Chrome browser instance | `headless`, `chromePath`, `proxy`, `wsEndpoint` |
| `browser_close` | Close browser, release resources | None |
| `page_navigate` | Navigate to specified URL | `url`, `waitUntil` |
| `page_screenshot` | Capture page screenshot (base64 return) | `selector`, `fullPage` |
| `page_get_content` | Get page HTML or element content | `selector` |
### 4.2 Network Interception Tool (network.ts) - 6
| Tool Name | Function | Key Parameters |
|--------|------|----------|
| `network_enable_intercept` | Enable network request interception | `urlPatterns` (URL filtering mode list) |
| `network_disable_intercept` | Disable network interception | None |
| `network_get_requests` | Get intercepted request list summary | `method`, `urlPattern`, `loginOnly` |
| `network_get_request_detail` | Get single request complete details | `requestId` |
| `network_find_login_request` | Intelligent positioning login request | `keywords` |
| `network_compare_requests` | Compare multiple request parameter differences | `requestIds` (at least 2) |
### 4.3 JS Source Code Analysis Tool (source-analysis.ts) - 6
| Tool Name | Function | Key Parameters |
|--------|------|----------|
| `js_get_all_scripts` | Get all JS script lists on the page | None |
| `js_get_script_source` | Get script source code (automatic beautification) | `scriptId`, `beautify`, `maxLength` |
| `js_search_in_scripts` | Search for keywords/regular expressions in scripts | `keyword`, `isRegex`, `contextLines` |
| `js_get_function_body` | Extract the complete implementation of the specified function | `functionName`, `scriptId` |
| `js_trace_call_chain` | Track function call chain | `functionName`, `depth` |
| `js_get_encryption_context` | Get encryption function and its dependency context | `functionName` |
### 4.4 Runtime Analysis Tool (runtime.ts) - 5
| Tool Name | Function | Key Parameters |
|--------|------|----------|
| `runtime_evaluate` | Execute JS code in the page | `expression`, `awaitPromise` |
| `runtime_call_function` | Call page global function | `functionName`, `args` |
| `runtime_get_global_vars` | Get encryption-related global variables | `pattern` (regular filtering) |
| `runtime_hook_function` | Hook function, record call parameters and return values | `functionName` (support chaining like `CryptoJS.AES.encrypt`) |
| `runtime_get_hook_logs` | Get Hook call logs | `functionName`, `clear` |
### 4.5 Encryption Detection Tool (crypto-detect.ts) - 5
| Tool Name | Function | Key Parameters |
|--------|------|----------|
| `crypto_auto_detect` | Automatically scan and detect encryption algorithms | None |
| `crypto_analyze_param` | Analyze parameter encryption method | `paramName`, `sampleValues` |
| `crypto_identify_library` | Identify the encryption library used on the page | None |
| `crypto_extract_key` | Extract key/IV/salt value | `algorithm` |
| `crypto_verify_algorithm` | Local verification of encryption algorithm correctness | `algorithm`, `plaintext`, `expected`, `key`, `iv` |
### 4.6 Script Generation Tool (script-gen.ts) - 4
| Tool Name | Function | Key Parameters |
|--------|------|----------|
| `generate_decrypt_script` | Generate decryption script (Python/JS) | `language`, `algorithm`, `key`, `iv`, `publicKey`, etc. |
| `generate_encrypt_script` | Generate encryption script | Same as above |
| `generate_brute_script` | Generate brute-force cracking script | Same as above + `loginUrl`, `paramName` |
| `script_test_run` | Test and run JS script | `code`, `testInput` |
**Supported Algorithm Types:** AES-CBC, AES-ECB, DES, 3DES, RSA, MD5, SHA256, Base64, Custom
## V. Environment Requirements and Installation
### 5.1 Environment Requirements
- **Node.js** ≥ 18.0.0
- **Google Chrome** browser (need to be installed on the local machine)
### 5.2 Installation Steps
```bash
# 1. Clone the project
git clone <repo-url>
cd js-reverse-mcp
# 2. Install dependencies
npm install
# 3. Compile TypeScript
npm run build (Note: Check if the required dependencies are complete before starting the project)
```
### 5.3 Environment Variables
| Variable Name | Description | Default Value |
|--------|------|--------|
| `CHROME_PATH` | Chrome executable file path | `C:\Users\fangz\AppData\Local\Google\Chrome\Application\chrome.exe` |
| `OUTPUT_DIR` | Script output directory | `./output` |
| `DEBUG` | Set to any value to enable debug logs | Not set (closed) |
## VI. Usage Method
### 6.1 Startup Command
```bash
# Formal operation (need to build first)
npm start
# Equivalent to: node build/index.js
# Development and debugging (directly run TS source code, no need to build)
npm run dev
# Build the project
npm run build
# Use MCP Inspector for debugging
npm run inspector
```
### 6.2 Configure MCP Client
Add the following to the MCP configuration file of the AI client (such as Cursor, Claude Desktop, etc.):
```json
{
"mcpServers": {
"js-reverse": {
"command": "node",
"args": ["e:\\Qwen\\build\\index.js"],
"env": {
"CHROME_PATH": "C:\\Users\\fangz\\AppData\\Local\\Google\\Chrome\\Application\\chrome.exe",
"OUTPUT_DIR": "e:\\Qwen\\output"
}
}
}
}
```
After configuring, the AI assistant can call all 31 reverse tools through natural language.
## VII. Actual Reverse Process
The following is the complete process of using this tool to perform JS reverse on a typical login page:
### Step 1: Launch Browser and Navigate
> "Help me launch Chrome and navigate to the target login page"
Call `browser_launch` → `page_navigate` → `page_screenshot`
### Step 2: Enable Network Interception
> "Enable network interception and capture all requests"
Call `network_enable_intercept`, then manually perform a login operation on the page.
### Step 3: Locate Login Request
> "Help me find the encrypted login request"
Call `network_find_login_request`, automatically identify the POST request containing password/encryption parameters.
### Step 4: Automatically Detect Encryption Algorithm
> "Help me detect what encryption the page uses"
Call `crypto_auto_detect`, scan all JS code for encryption feature patterns.
### Step 5: Search for Encryption Code
> "Search for encrypt|CryptoJS|password in JS"
Call `js_search_in_scripts`, locate the specific code location of the encryption function.
### Step 6: Extract Key and Parameters
> "Help me extract the AES key and iv"
Call `crypto_extract_key`, extract hard-coded keys from source code and Runtime.
### Step 7: Verify Encryption Algorithm
> "Use AES-ECB mode, key as xxx, verify encryption result"
Call `crypto_verify_algorithm`, locally calculate and compare whether the ciphertext matches.
### Step 8: Generate Script
> "Generate Python AES-ECB decryption script"
Call `generate_decrypt_script`, automatically save to `output/` directory.
## VIII. Actual Case
The following is the reverse analysis result of `https://XXXXXXX.edu.cn/admin/#/login`:
### Packet Capture Result
```
POST /api/venue_book/login/AdminLogin
{"user":"testuser","password":"y8d/dgERxCaiTGAod1+RiQ=="}
```
### Reverse Located Encryption Code (app.js)
```javascript
// Hard-coded key
const M = CryptoJS.enc.Utf8.parse("0123456789ABCDEF");
// Encryption function
function j(e) {
var t = CryptoJS.enc.Utf8.parse(JSON.stringify(e));
var n = CryptoJS.AES.encrypt(t, M, {
mode: CryptoJS.mode.ECB,
padding: CryptoJS.pad.Pkcs7
});
return n.toString();
}
// Login call: c = j(password)
```
### Analysis Conclusion
| Project | Value |
|------|------|
| Algorithm | AES-128-ECB |
| Key | `0123456789ABCDEF` (hard-coded 16 bytes) |
| Padding | PKCS7 |
| Encoding | Base64 |
| Security Weakness | ECB mode no IV, hard-coded key in front-end |
## IX. Core Module Description
### 9.1 Browser Manager (browser/manager.ts)
Singleton mode manages Puppeteer browser lifecycle:
- Supports launching new instances or connecting to existing Chrome (through `wsEndpoint`)
- Automatically create CDP (Chrome DevTools Protocol) session
- Default disable sandbox and cross-domain restrictions, convenient for reverse debugging
### 9.2 Request Storage (storage/request-store.ts)
Memory + file double-layer persistence:
- Automatically detect login requests (based on URL keywords + request body keywords)
- Automatically identify encryption parameters (Base64/Hex feature detection)
- Request record persistence to `output/.session/requests.json`
### 9.3 Encryption Feature Library (analysis/crypto-patterns.ts)
Built-in 20+ encryption mode matching rules:
- **Symmetric encryption:** AES (CBC/ECB/PKCS7/Zero/NoPadding), DES, 3DES
- **Asymmetric encryption:** JSEncrypt RSA, RSAKey, node-forge RSA
- **Hash algorithm:** MD5, SHA1, SHA256, HMAC-SHA256
- **Encoding format:** Base64, Hex
- **National encryption algorithm:** SM2, SM3, SM4
- **Ciphertext format recognizer:** Infer possible algorithm based on length and encoding format
- **Key length inference:** 8→DES, 16→AES-128/SM4, 24→AES-192/3DES, 32→AES-256
### 9.4 Script Generator (generators/)
Support generating three types of scripts:
- **Encryption/decryption script:** Python (pycryptodome) and JavaScript (crypto-js)
- **Brute-force cracking script:** Contains encryption function + automated login request
- Support AES, DES, 3DES, RSA, MD5, custom algorithm
### 9.5 Log Tool (utils/logger.ts)
All logs output to **stderr** (`console.error`), never use `console.log`, avoid destroying MCP stdio protocol communication.
## X. Complete Dependency List
### 10.1 Direct Dependencies
| Package Name | Version | Description |
|--------------|---------|-------------|
| `@modelcontextprotocol/sdk` | 1.29.0 | MCP Protocol SDK (including Hono/Express server support) |
| `zod` | 3.25.76 | TypeScript-first Schema declaration and validation library |
| `puppeteer-core` | 23.11.1 | Chrome browser automation control (high-priority CDP API) |
| `js-beautify` | 1.15.4 | JS/HTML/CSS code beautification and formatting |
| `acorn` | 8.16.0 | ECMAScript syntax parser |
| `acorn-walk` | 8.3.5 | ECMAScript AST traverser |
| `crypto-js` | 4.2.0 | Cryptographic algorithm library (AES/DES/MD5/SHA/RSA etc.) |
| `node-forge` | 1.4.0 | JS cryptographic implementation (TLS/X.509/RSA/AES etc.) |
| `mustache` | 4.2.0 | Logic-less Mustache template engine |
### 10.2 Development Dependencies
| Package Name | Version | Description |
|--------------|---------|-------------|
| `typescript` | 5.9.3 | TypeScript compiler |
| `tsx` | 4.22.4 | TypeScript direct execution tool (based on esbuild) |
| `@types/node` | 22.19.20 | Node.js type definitions |
| `@types/crypto-js` | 4.2.2 | crypto-js type definitions |
| `@types/js-beautify` | 1.14.3 | js-beautify type definitions |
| `@types/node-forge` | 1.3.14 | node-forge type definitions |
| `@types/mustache` | 4.2.6 | mustache type definitions |
| `@types/yauzl` | 2.10.3 | yauzl type definitions |
### 10.3 Indirect Dependencies
#### MCP / Network Communication Related
| Package Name | Version | Description |
|--------------|---------|-------------|
| `express` | 5.2.1 | HTTP web framework (used internally by MCP SDK) |
| `hono` | 4.12.25 | Lightweight web framework (optional transport for MCP SDK) |
| `@hono/node-server` | 1.19.14 | Hono Node.js adapter |
| `ws` | 8.21.0 | WebSocket client/server |
| `eventsource` | 2.0.2 | SSE (Server-Sent Events) client |
| `eventsource-parser` | 3.0.2 | SSE protocol parser |
| `zod-to-json-schema` | 3.25.2 | Zod Schema to JSON Schema |
| `jose` | 6.2.3 | JWT/JWS/JWE implementation (OAuth support) |
| `pkce-challenge` | 5.0.1 | PKCE challenge generation/verification |
| `cors` | 2.8.5 | HTTP CORS middleware |
| `body-parser` | 2.2.2 | HTTP request body parsing middleware |
| `router` | 2.2.0 | Simple middleware router |
| `express-rate-limit` | 8.2.1 | Express request rate limiter |
#### Puppeteer / Browser Automation Related
| Package Name | Version | Description |
|--------------|---------|-------------|
| `chromium-bidi` | 0.11.0 | WebDriver BiDi protocol implementation (used internally by Puppeteer) |
| `@puppeteer/browsers` | 2.6.1 | Browser download and launch tool |
| `devtools-protocol` | 0.0.1452057 | Chrome DevTools Protocol type definitions |
| `basic-ftp` | 5.3.1 | FTP client (browser download) |
| `extract-zip` | 2.0.1 | ZIP extraction tool |
| `yauzl` | 2.10.0 | ZIP file parsing library |
| `progress` | 2.0.3 | Download progress bar |
| `mitt` | 3.0.1 | Lightweight event emitter |
| `typed-query-selector` | 2.12.2 | Typed querySelector |
#### Proxy / Network Related
| Package Name | Version | Description |
|--------------|---------|-------------|
| `proxy-agent` | 6.5.0 | Proxy protocol mapping agent |
| `http-proxy-agent` | 7.0.2 | HTTP proxy agent |
| `https-proxy-agent` | 7.0.6 | HTTPS proxy agent |
| `socks-proxy-agent` | 8.0.5 | SOCKS proxy agent |
| `socks` | 2.8.9 | SOCKS v4/v4a/v5 client |
| `pac-proxy-agent` | 7.2.0 | PAC file proxy agent |
| `pac-resolver` | 7.0.1 | PAC file resolver |
| `proxy-from-env` | 1.1.0 | Get proxy configuration from environment variables |
| `netmask` | 2.1.1 | IP network segment parser |
| `ip-address` | 10.2.0 | IPv4/IPv6 address parser |
| `smart-buffer` | 4.2.0 | Smart buffer wrapper |
| `agent-base` | 7.1.4 | HTTP agent base class |
| `data-uri-to-buffer` | 6.0.2 | Data URI to buffer |
| `get-uri` | 6.0.5 | URI to readable stream |
#### Build Tools
| Package Name | Version | Description |
|--------------|---------|-------------|
| `esbuild` | 0.28.0 | Fast JS bundler (used internally by tsx) |
| `@esbuild/win32-x64` | 0.28.0 | esbuild Windows 64-bit binary |
#### Utility Functions / General Libraries
| Package Name | Version | Description |
|--------------|---------|-------------|
| `debug` | 4.4.1 | Debugging log tool |
| `ms` | 2.1.3 | Millisecond conversion tool |
| `semver` | 7.8.4 | Semantic versioning parser |
| `glob` | 10.4.5 | Glob pattern matcher |
| `minimatch` | 9.0.9 | Glob matcher |
| `minipass` | 7.1.3 | Minimal PassThrough stream implementation |
| `lru-cache` | 10.4.3 | LRU cache |
| `signal-exit` | 4.1.0 | Process exit signal handling |
| `once` | 1.4.0 | Function execution once |
| `pump` | 3.0.4 | Pipe stream connection |
| `wrappy` | 1.0.2 | Callback wrapper |
| `which` | 2.0.2 | Executable file lookup (like Unix which) |
| `path-key` | 3.1.1 | Cross-platform PATH key retrieval |
| `cross-spawn` | 7.0.6 | Cross-platform spawn |
| `shebang-command` | 2.0.0 | Shebang command extraction |
| `shebang-regex` | 3.0.0 | Shebang regular expression |
| `isexe` | 2.0.0 | Executable file detection |
| `foreground-child` | 3.3.1 | Foreground child process management |
| `package-json-from-dist` | 1.0.1 | Load package.json from dist |
| `path-scurry` | 1.11.1 | Efficient path traversal |
| `jackspeak` | 3.4.3 | Strict parameter parser |
| `require-from-string` | 2.0.2 | Load module from string |
| `require-directory` | 2.1.1 | Recursively load directory modules |
#### HTTP / Web Fundamentals
| Package Name | Version | Description |
|--------------|---------|-------------|
| `accepts` | 2.0.0 | HTTP content negotiation |
| `negotiator` | 1.0.0 | HTTP content negotiation underlying |
| `content-type` | 1.0.5 | Content-Type parser |
| `content-disposition` | 1.1.0 | Content-Disposition parser |
| `type-is` | 2.1.0 | Request type inference |
| `media-typer` | 1.1.0 | RFC 6838 media type parser |
| `mime-types` | 3.0.2 | MIME type tool |
| `mime-db` | 1.54.0 | MIME type database |
| `cookie` | 0.7.2 | Cookie parser and serializer |
| `cookie-signature` | 1.2.2 | Cookie signature |
| `etag` | 1.8.1 | ETag generation |
| `fresh` | 2.0.0 | HTTP cache freshness check |
| `vary` | 1.1.2 | Vary header manipulation |
| `send` | 1.2.1 | Static file sending |
| `serve-static` | 2.2.1 | Static file serving |
| `range-parser` | 1.2.1 | Range header parser |
| `parseurl` | 1.3.3 | URL parser (with cache) |
| `encodeurl` | 2.0.0 | URL encoding |
| `escape-html` | 1.0.3 | HTML escaping |
| `on-finished` | 2.4.1 | Request completion callback |
| `ee-first` | 1.1.1 | Event prioritization |
| `unpipe` | 1.0.0 | Stream pipeline disconnection |
| `raw-body` | 3.0.2 | Raw request body retrieval |
| `bytes` | 3.1.2 | Byte string conversion |
| `statuses` | 2.0.2 | HTTP status code tool |
| `http-errors` | 2.0.1 | HTTP error object |
| `toidentifier` | 1.0.1 | String to JS identifier |
| `depd` | 2.0.0 | Deprecation warning tool |
| `proxy-addr` | 2.0.7 | Proxy address determination |
| `forwarded` | 0.2.0 | Forwarded header parsing |
| `ipaddr.js` | 1.9.1 | IPv4/IPv6 operation library |
| `merge-descriptors` | 2.0.0 | Property descriptor merging |
| `object-inspect` | 1.13.4 | Object string representation |
| `path-to-regexp` | 8.4.2 | Express-style path to regular expression |
| `qs` | 6.15.2 | Query string parsing (supports nesting) |
| `iconv-lite` | 0.7.2 | Character encoding conversion |
| `safer-buffer` | 2.1.2 | Safe Buffer polyfill |
#### JS Parsing / AST Related
| Package Name | Version | Description |
|--------------|---------|-------------|
| `esprima` | 4.0.1 | ECMAScript parser |
| `escodegen` | 2.1.0 | ECMAScript code generation |
| `estraverse` | 5.3.0 | ECMAScript AST traversal |
| `esutils` | 2.0.3 | ECMAScript utility functions |
| `ast-types` | 0.13.4 | Mozilla JS Parser API implementation |
| `source-map` | 0.6.1 | Source map generation and consumption |
#### Cryptography / Encoding Related
| Package Name | Version | Description |
|--------------|---------|-------------|
| `base64-js` | 1.5.1 | Pure JS Base64 encoding/decoding |
| `ieee754` | 1.2.1 | IEEE754 floating-point number reading/writing |
| `buffer` | 5.7.1 | Browser Buffer API |
| `buffer-crc32` | 0.2.13 | CRC32 algorithm |
#### Data Validation / Schema
| Package Name | Version | Description |
|--------------|---------|-------------|
| `ajv` | 8.20.0 | JSON Schema validator |
| `ajv-formats` | 3.0.1 | Ajv format validation extension |
| `json-schema-traverse` | 1.0.0 | JSON Schema traversal |
| `json-schema-typed` | 8.0.2 | JSON Schema TS definition |
| `fast-deep-equal` | 3.1.3 | Deep equality comparison |
| `fast-uri` | 3.1.0 | Fast URI parsing |
#### Stream Processing / Unzipping
| Package Name | Version | Description |
|--------------|---------|-------------|
| `streamx` | 2.27.0 | Improved Node.js stream implementation |
| `tar-stream` | 3.2.0 | Stream-based tar parsing/generation |
| `tar-fs` | 3.1.2 | Tar file system binding |
| `teex` | 1.0.1 | Readable stream multiplexing |
| `text-decoder` | 1.2.7 | Stream-based text decoder |
| `b4a` | 1.8.1 | Buffer/TypedArray bridging |
| `unbzip2-stream` | 1.4.3 | bzip2 stream decompression |
| `end-of-stream` | 1.4.5 | Stream end detection |
| `get-stream` | 5.2.0 | Stream conversion to string/buffer |
| `bare-stream` | 2.13.1 | Bare runtime stream implementation |
| `through` | 2.3.8 | Simple stream construction |
| `fast-fifo` | 1.3.2 | Fast FIFO queue |
#### Terminal / CLI Related
| Package Name | Version | Description |
|--------------|---------|-------------|
| `yargs` | 17.7.2 | Command-line argument parsing |
| `yargs-parser` | 21.1.1 | yargs argument parser |
| `y18n` | 5.0.8 | Internationalization library (used by yargs) |
| `cliui` | 8.0.1 | CLI multi-column output |
| `wrap-ansi` | 7.0.0 / 8.1.0 | ANSI terminal text wrapping |
| `ansi-regex` | 6.2.2 | ANSI escape code regular expression |
| `ansi-styles` | 6.2.3 | ANSI terminal styles |
| `color-convert` | 2.0.1 | Color format conversion |
| `color-name` | 1.1.4 | Color name mapping |
| `string-width` | 4.2.3 / 5.1.2 | String display width |
| `strip-ansi` | 6.0.1 / 7.2.0 | ANSI escape code removal |
| `is-fullwidth-code-point` | 3.0.0 | Full-width character detection |
| `eastasianwidth` | 0.2.0 | East Asian character width |
| `emoji-regex` | 10.4.0 | Emoji regular expression |
#### Configuration / INI / EditorConfig
| Package Name | Version | Description |
|--------------|---------|-------------|
| `commander` | 10.0.1 | Node.js CLI command framework |
| `editorconfig` | 1.0.4 | EditorConfig parsing |
| `@one-ini/wasm` | 0.1.1 | INI file WASM parsing |
| `ini` | 1.3.8 | INI encoding/decoding |
| `config-chain` | 1.1.13 | Configuration chain management |
| `proto-list` | 1.2.4 | Prototype chain tool |
| `nopt` | 7.2.1 | Node option parsing |
| `abbrev` | 2.0.0 | String abbreviation generation |
#### Object / Function Tools
| Package Name | Version | Description |
|--------------|---------|-------------|
| `has-symbols` | 1.1.0 | Symbol support detection |
| `hasown` | 2.0.4 | Safe hasOwnProperty |
| `gopd` | 1.2.0 | getOwnPropertyDescriptor |
| `call-bind-apply-helpers` | 1.0.2 | call/apply helpers |
| `call-bound` | 1.0.4 | Safe call binding |
| `es-define-property` | 1.0.1 | Object.defineProperty safe version |
| `es-errors` | 1.3.0 | ES error types |
| `es-object-atoms` | 1.1.1 | ES object atom operations |
| `math-intrinsics` | 1.1.0 | Math internal functions |
| `side-channel` | 1.1.1 | Side channel storage (WeakMap) |
| `side-channel-map` | 1.0.1 | Side channel map implementation |
| `side-channel-list` | 1.0.1 | Side channel list implementation |
| `side-channel-weakmap` | 1.0.2 | Side channel WeakMap implementation |
| `dunder-proto` | 1.0.1 | \_\_proto\_\_ safe access |
| `get-intrinsic` | 1.3.0 | JS intrinsic object retrieval |
| `get-proto` | 1.0.1 | Prototype retrieval |
| `object-assign` | 4.1.1 | Object.assign polyfill |
| `setprototypeof` | 1.2.0 | setPrototypeOf polyfill |
| `inherits` | 2.0.4 | Inheritance tool |
| `function-bind` | 1.1.2 | Function.prototype.bind |
#### Bare Runtime (Optional dependency for Puppeteer)
| Package Name | Version | Description |
|--------------|---------|-------------|
| `bare-events` | 2.9.1 | Bare event emitter |
| `bare-fs` | 4.7.2 | Bare file system operations |
| `bare-os` | 3.9.1 | Bare operating system tools |
| `bare-path` | 3.0.1 | Bare path operations |
| `bare-url` | 2.4.5 | Bare URL implementation |
| `events-universal` | 1.0.1 | Universal events module |
| Package Name | Version | Description |
|------|------|------|
| `balanced-match` | 1.0.2 | Balanced bracket matching |
| `brace-expansion` | 2.1.1 | Brace expansion (sh/bash style) |
| `tslib` | 2.8.1 | TypeScript runtime helper library |
| `undici-types`6.21.0 | type definitions |
| `js-cookie` | 3.0.8 | Lightweight Cookie handling library |
| `@tootallnate/quickjs-emscripten` | 0.0 | QuickJS W |
| `@isaacs/cliui` | 8.0.2 | CLI multi-column output (isaacs version) |
| `@pkgjs/parseargs` | 0.11.0 | util.parsefill |
---
## XI. Configuration File Description
### mcp-config.json
```json
{
"mcpServers": {
"js-reverse": {
"command": "node",
"args": ["e:\\Qwen\\build\\index.js"],
"env": {
"CHROME_PATH": "C:\\Users\\fangz\\AppData\\Local\\Google\\Chrome\\Application\\chrome.exe",
"OUTPUT_DIR": "e:\\Qwen\\output"
}
}
}
}
```
### tsconfig.json
```json
{
"compilerOptions": {
"target": "ES2022",
"module": "Node16",
"module "Node16",
"": "./build",
Dir": "./src",
"strict": true,
"esop": true,
"de true,
"sourceMap
}
}
```
---
## XII. Precautions
1. Use Requires `browser_launch`**: All tools requiring browser operations depend browser instance, which must be launched first.
2. **Chrome Path Ensure the `CHROME_PATH` environment variable points to the correct Chrome.
3. **Network Interception Order**: Call `network_enable_intercept` first, then perform operations on.
4. **Script Source**: `js_get_all_scripts` establishes a script cache, which subsequent on.
5. ** to stderr**: All debug output via `console.error` not interfere with MCP stdio communication. **Output Directory**: and session data are saved in specified by `OUTPUT_DIR`.
---
## XIII. License
This project learning and security research purposes only comply with relevant laws and regulations.
## XIII. Test Cases width="692" height="368" alt="image" src="https://github.com/user-attachments/assets/e5ad6f-b14e-4dc8aac-2e863a165dc7" />
<img692" height="368"image" src="https://github.com/user-attachments/assets/2cc5a853-bced-45923e-5e0559b067" />
<img width="692" height="356" alt="image" src="https://github.com/user-attachments/assets/005879-ad79-415bd6-3013ba5ed28d" />
<img width="692" height="325" alt="image" src="https://github.com/user-attachments/assets/be2d9f-b3d7-4db3-86b2-9e3408d754 />
<img width="1031" height="788" alt="image="https://github.com/user-attachments/assets/83551c-6837-4704-81d1-75a265e6782a" />
<img width="1920" height="1020" alt="image" src="https://github-attachments/assets/a699627e-0af9-4773-9648-05073f129390" />
MCP Config
Below is the configuration for this MCP Server. You can copy it directly to Cursor or other MCP clients.
mcp.json
Connection Info
You Might Also Like
No recommendations available