JS Reverse MCP
Allows using OpenAI's API to analyze and understand JavaScript code semantics through the understand_code and risk_panel tools.
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., "@JS Reverse MCPset a breakpoint on the encrypt function"
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.
JS Reverse MCP
English | 中文
Pro fork: Derived from zhizhuodemao/js-reverse-mcp (Patchright stealth core preserved) and selectively ports capabilities from NoOne-hub/JSReverser-MCP — hook framework, static deobfuscation, AI analysis, session snapshots, artifacts, case library. See
LICENSE(Apache-2.0) andLICENSE.JSReverser-MCP(MIT, NoOne-hub).
A JavaScript reverse engineering MCP server that enables AI coding assistants (Claude, Cursor, Codex) to debug and analyze JavaScript code in web pages.
Built on the Patchright anti-detection engine with multi-layered anti-bot bypass capabilities, allowing it to work on sites with bot detection such as Zhihu and Google.
Features
From upstream (preserved)
Anti-detection browser — Patchright (Playwright anti-detection fork), 60+ stealth launch arguments
Script analysis — list / search / get / save sources
Breakpoint debugging —
set_breakpoint_on_text,break_on_xhr,step,get_paused_infoFunction tracing —
trace_function(logpoint mode, doesn't pause)Network & WebSocket — request initiator stacks, WS message analysis
inject_before_load— CDPPage.addScriptToEvaluateOnNewDocument
Pro fork additions
Hook framework — 5 built-in templates (function/crypto/network/encoding/storage), CDP injection + Symbol-keyed sink + CDP
Runtime.evaluatedrain; survives navigationStatic deobfuscation —
deobfuscate_code(Babel fast: string-array inline, constant fold, dead branch,_0xabcdrename, bracket→dot; optional webcrack deep)Code collection —
collect_code(scans forsign/encrypt/hmacetc. + AST heuristic ranking)AI assist (default OFF) —
understand_code/risk_panel, OpenAI / Anthropic / Gemini, dynamic-importedSession snapshots —
save/restore/dump/load_session_state, AES-256-GCM round-tripArtifacts tasks —
start_reverse_task/record_evidence/export_replay_bundle/export_portable_bundle, shareable.jrmcp.jsonbundles plus single-file portable / replay JS extractionTwo-layer stealth —
--cloakopts into CloakBrowser source-level fingerprint patches (canvas / WebGL / audio / GPU);--legacyStealthis the explicit fork-default fallback that keeps the original stealth-args pathTool profile gating —
--toolProfile kernel|compact|full(defaultkernel); restart withcompactfor broader workflow controls,fullto expose every toolBrowser state reset —
clear_site_dataclears cookies, HTTP cache, persistent storage, and sessionStorage for the current page's HTTP(S) frame origins without reloadingNetwork export —
export_network_requestwrites captured request / response bytes, query params, or a metadata bundle to disk (and into the active task'sevidence/directory whentaskIdis set)Local-file input for
evaluate_script— pipe local files into in-page evaluation for replay and fixture-driven runs
Related MCP server: JS Reverse MCP
Requirements
Installation
This fork is not published to npm; build from source:
git clone https://github.com/a0yark/js-reverse-pro-mcp.git
cd js-reverse-pro-mcp
npm install
npm run buildClaude Code
claude mcp add -s user js-reverse-pro -- node /ABS/PATH/js-reverse-mcp/build/src/index.jsCodex
codex mcp add js-reverse-pro -- node /ABS/PATH/js-reverse-mcp/build/src/index.jsGeneric JSON config
{
"mcpServers": {
"js-reverse-pro": {
"command": "node",
"args": ["/ABS/PATH/js-reverse-mcp/build/src/index.js"]
}
}
}Anti-Detection
Two coexisting stealth layers, selectable per launch:
Legacy stealth-args path (fork default; also gated by
--legacyStealth): Patchright + 60+ stealth launch arguments. Matches behavior before--cloakexisted.Cloak path (
--cloak): CloakBrowser stealth-patched Chromium with source-level fingerprint patches (canvas / WebGL / audio / GPU). Binary auto-downloads (~200MB) on first use; identity is persisted per profile in<profile>/.cloak-seed. Conflicts with--browserUrl,--wsEndpoint,--executablePath,--channel.
Layer | Description |
Patchright Engine | C++ level patches, removes |
60+ Stealth Args | Removes automation signatures, bypasses headless detection, GPU/network/behavior fingerprint spoofing |
Harmful Args Removal | Excludes |
Silent CDP Navigation | Navigation tools don't activate CDP domains, captures requests only through Playwright-level listeners |
Google Referer Spoofing | All navigations automatically include |
Persistent Login State | Uses persistent user-data-dir by default, login state preserved across sessions |
Cloak source patches |
|
Hook framework stealth discipline (Pro fork)
The 18 new tools follow strict stealth rules:
Injection path: CDP
Page.addScriptToEvaluateOnNewDocument(same channel as upstreaminject_before_load); no PlaywrightaddInitScript/exposeBindingData sink:
globalThis[Symbol.for('__jr_sink')]array + CDPRuntime.evaluatedrain; no fixed string-named property onwindow, no console pollutionFunction.prototype.toStringself-cloaking: a stealth shim usesWeakMap<wrapped, orig>soFunction.prototype.toString.call(fetch)returnsfunction fetch() { [native code] }; the patched toString itself is registered, soFunction.prototype.toString.toString()is also nativestoragetemplatecookieoption default OFF:Object.defineProperty(document, 'cookie')leaves a non-native descriptor that advanced fingerprinters can detectAI default OFF: only loads when
--enableAIand the matching API key are both set; OpenAI / Anthropic / Gemini SDKs are dynamic-imported
See src/hooks/stealth-shim.ts header comment and the automated test tests/phase-b-smoke.mjs.
Tools (44)
From upstream (23)
Page & Navigation
Tool | Description |
| List/select pages as debugging context |
| Create new page and navigate |
| Navigate / back / forward / reload |
| List/select frame execution context |
| Page screenshot |
Script Analysis
Tool | Description |
| List all loaded JS scripts |
| Get source by line range or character offset |
| Save full source to local file |
| String/regex search across all scripts |
Breakpoint & Execution Control
Tool | Description |
| Set breakpoint by code text search |
| XHR/Fetch breakpoint by URL pattern |
| Remove by ID/URL or all |
| List active breakpoints |
| Paused state, call stack, scope |
| Toggle pause/resume |
| Step over/into/out |
Function Tracing & Injection
Tool | Description |
| Logpoint trace (doesn't pause) |
| Inject pre-load script (raw CDP) |
Network & WebSocket
Tool | Description |
| List/get-detail network requests |
| JS call stack for a request |
| WS connections / message analysis |
Inspection
Tool | Description |
| Run JS in page (paused / main world / file output / local file input supported) |
| Console messages list/detail |
Pro fork (21 new)
Browser state & network export (2)
Tool | Description |
| Clear cookies, HTTP cache, persistent storage, sessionStorage for current page's HTTP(S) frame origins (no reload) |
| Export captured request / response bytes, query params, or metadata bundle to disk (and to task evidence/ when |
Hook framework (5)
Tool | Description |
| Render hook from template, returns hookId (no inject) |
| Attach hook to current page + future navigations |
| Drain page-side sink, return per-hook events |
| List hooks + injection state + buffer |
| Remove CDP injection / purge buffer / delete hook record |
Built-in templates:
function— wrap any global by dottedpathcrypto— CryptoJS / WebCrypto / JSEncryptnetwork— XHR / fetch / WebSocket, withurlPatternfilter + call stackencoding— btoa / atob / TextEncoder / TextDecoder (JSON.* opt-in)storage— localStorage / sessionStorage (cookie opt-in)
Static analysis (4)
Tool | Description |
| Babel passes (fast, always) + optional webcrack (deep) |
| Scan functions matching |
| LLM explains code semantics (default disabled) |
| Aggregate hook + task signals into a risk report (default disabled) |
Session management (5)
Tool | Description |
| Capture cookies + multi-origin localStorage/sessionStorage to memory |
| Apply snapshot to current context |
| Persist to disk, optional AES-256-GCM encryption |
| Load from disk into memory (decrypts) |
| One-shot read of cookies/local/session/all |
Artifacts tasks (5)
Tool | Description |
| Create task dir |
| Append evidence (>64KB auto-files into evidence/) |
| Export |
| Collapse task evidence into single-file |
| List all tasks under artifacts root |
Configuration Options
Upstream flags
Option | Description | Default |
| Connect to running Chrome | - |
| WebSocket endpoint | - |
| Headless mode | false |
| Custom Chrome path | - |
| Temporary user-data-dir (fresh each time) | false |
| stable/canary/beta/dev | stable |
| Viewport size, e.g. | real size |
| Canvas fingerprint noise | false |
| Block WebRTC for IP leak | false |
| Disable WebGL | false |
| Disable stealth args (debug only) | false |
| Proxy config | - |
| Debug log path | - |
Pro fork flags
Option | Description | Default |
| Artifacts root |
|
| Session-dump default secret (also reads | - |
| Per-hook ring buffer capacity | 1000 |
| Enable understand_code / risk_panel | false |
| openai / anthropic / gemini | - |
| Use CloakBrowser stealth-patched Chromium with source-level fingerprint patches (auto-downloads ~200MB) | false |
| Explicitly select the legacy stealth-args path (conflicts with | false |
| Which MCP tools are exposed at startup: |
|
| Print the names of the tools selected by | false |
Example configurations
Full setup (AI + enhanced stealth):
OPENAI_API_KEY=sk-... node build/src/index.js \
--browserUrl=http://localhost:9222 \
--enableAI --llmProvider=openai \
--blockWebrtc \
--artifactsDir=./my-tasksIsolated (no persistent login, fresh each time):
{
"mcpServers": {
"js-reverse-pro": {
"command": "node",
"args": ["/ABS/PATH/build/src/index.js", "--isolated"]
}
}
}Connect to running Chrome
Launch Chrome (close all Chrome windows first):
Windows
"C:\Program Files\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222 --user-data-dir="%TEMP%\chrome-debug"macOS
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222 --user-data-dir=/tmp/chrome-debugThen connect with --browserUrl=http://127.0.0.1:9222.
Workflow Cases
See scripts/cases/ for end-to-end workflows:
JD H5 —
h5stparameter chain (URL sort + AES-CBC + timestamp watermark)TikTok web —
a_bogus(custom obfuscation VM + sha256/md5)Xiaohongshu web —
x-s/x-t/x-mns(Falcon, with toString reflection caveat)
General workflow:
1. start_reverse_task creates a task
2. new_page to target site → list_network_requests to find signed requests
3. get_request_initiator to inspect call stack
4. create_hook(network, urlPattern=...) + inject_hook
5. trigger requests → get_hook_data for context
6. create_hook(crypto) + inject_hook → see which algorithms run
7. get_script_source for the chunk → deobfuscate_code(level=deep)
8. collect_code on deobfuscated source to locate the sign function
9. understand_code (optional) lets the LLM explain it
10. record_evidence per finding
11. export_replay_bundle (shareable `.jrmcp.json`) or export_portable_bundle (single-file `run/portable.js` / `run/replay.js`)Troubleshooting
Blocked by anti-bot systems
If you are blocked when visiting certain sites (e.g. Zhihu returning error 40362):
Clear the contaminated profile: delete
~/.cache/chrome-devtools-mcp/chrome-profileUse isolated mode: add
--isolatedEnable Canvas noise: add
--hideCanvas
Hook captures no events
Confirm
inject_hookreturnedINJECTED(uselist_hooks)Confirm rendered hook source has no syntax errors (start with
--logFile)Re-injecting the same hook on a loaded page nests the wrap;
clear_hook(hookId)first or reload
deobfuscate_code level=deep complains about webcrack
webcrack is an optional dependency that itself requires @babel/core. This fork already promotes @babel/core to dependencies; if it still complains, run npm install to refresh.
Security Notice
This tool exposes browser content to MCP clients, allowing inspection, debugging, and modification of any data in the browser. Do not use it on pages containing sensitive information.
License
Apache-2.0, inherited from upstream zhizhuodemao/js-reverse-mcp.
Pro fork ports reference NoOne-hub/JSReverser-MCP (MIT, original license preserved at LICENSE.JSReverser-MCP).
This server cannot be installed
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/a0yark/js-reverse-pro-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server