Model or dataset
zhizhuodemao/js-reverse-mcp avatar
zhizhuodemao/js-reverse-mcp

js-reverse-mcp: an MCP server that turns Chrome debugging into agent primitives

AI Agent-first JS 逆向 MCP Server:有头 Chrome 调试、断点、网络/WebSocket 分析、Patchright 反检测,可选 CloakBrowser。

2,755 stars362 forksTypeScriptApache-2.0

At a glance

What is it?
js-reverse-mcp is a TypeScript MCP server that exposes script, breakpoint, network and WebSocket analysis to AI coding assistants through a headed Chrome session. Its main claim is workflow continuity for an agent, not undetectability.
Who is it for?
Adopt js-reverse-mcp if you already drive an MCP-capable assistant and want its reasoning loop to include breakpoints, call-frame evaluation and exported network bodies instead of pasted DevTools screenshots. Skip it if you need a headless crawler at scale, a stable public API, or a guarantee against fingerprinting; the README explicitly refuses that last promise.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 12 days ago.
What is it written in?
Mainly TypeScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

The gap between a browser and an agent that has to keep reasoning

Chrome DevTools is built for a human with eyes on a panel. An AI coding assistant driving the same session has no panel, no scrollback, and a context window that fills up fast if you dump a minified bundle into it. js-reverse-mcp targets exactly that mismatch. The README frames the goal as letting an assistant "持续调试、定位、保存和复盘" web JavaScript behaviour, and the tool list is organised around that: list scripts, search code, get or save source, set breakpoints, evaluate inside a paused call frame, export raw request bodies to disk. The intended user is someone doing authorised reverse engineering or security research who already works through an MCP client such as Claude Code, Codex, Cursor or VS Code Copilot. It is not aimed at someone who wants a scraping library with a Python import.

Tools as agent primitives, not a DevTools menu in JSON

The design note in the README is the most useful part of the documentation. It states the project does not map DevTools menus one-to-one; instead each tool is meant to be a primitive an agent can chain. Three concrete examples are given. list_network_requests can enumerate indices, fetch details by reqid, or write precise material to disk via outputFile. evaluate_script runs either in the page or inside a breakpoint call frame, and can also take a localFilePath as input. save_script_source writes a loaded script out for later reading. The stated output policy matters more than the tool count: list outputs stay short and scannable, detail outputs are bounded, long results prompt an export, and pending requests explicitly tell the agent to resume execution first. That last one is a real failure mode in agent loops, where a model sits waiting on a response that will never arrive because the debugger is still paused. The README also describes a replay-oriented workflow: the default profile keeps cookies and localStorage across sessions, --isolated gives a one-shot clean environment, and clear_site_data wipes only the current site's cookies, cache, storage and sessionStorage so cookie generation or risk-control initialisation can be reproduced repeatedly.

The two anti-detection layers and where the wrapper stays out

Anti-detection is presented as supporting infrastructure for the debugging loop, not as the product. The README is explicit that the MCP wrapper itself performs zero JS injection and no Object.defineProperty hacks, on the grounds that such patches are themselves detectable. Work is split across two non-overlapping layers. At the protocol layer, the default mode uses a fork published as @zhizhuodemao/patchright: it avoids calling Runtime.enable and Console.enable, evaluates inside an isolated world, removes automation launch flags, and is rebuilt as upstream shared implementation traits are identified. At the source layer, the default mode does nothing and runs your installed Google Chrome; the optional --cloak mode swaps in a CloakBrowser binary with platform-specific fingerprint patches covering navigator.webdriver, canvas, WebGL, audio, GPU, fonts, screen, WebRTC and TLS, and uses a separate profile directory at ~/.cache/chrome-devtools-mcp/cloak-profile. Both modes also apply navigation-level measures: CDP silent navigation, meaning Network.enable and Debugger.enable are not activated during page load and collection goes through Playwright listeners until a tool explicitly needs CDP; a default referer of https://www.google.com/ for new_page; and real viewport dimensions instead of Playwright's 1280x720 default. The README's own boundary statement is worth quoting in spirit: the fork aims to reduce confirmed shared implementation traits, not to promise that browser automation is undetectable. Treat any stronger reading as unsupported.

Getting it into an MCP client

Requirements are Node.js v20.19 or newer and stable Chrome. The npx path needs no install. For Claude Code the documented command is claude mcp add js-reverse npx js-reverse-mcp; for Codex it is codex mcp add js-reverse -- npx js-reverse-mcp; for VS Code Copilot it is code --add-mcp '{"name":"js-reverse","command":"npx","args":["js-reverse-mcp"]}'. Cursor is configured through Cursor Settings, then MCP, then New MCP Server, using the same JSON block the README shows for generic clients. A local build is also documented: git clone the repository, npm install, npm run build, then point the client at node with the absolute path to build/src/index.js. The one flag the README names is --cloak, which switches to the CloakBrowser binary and its isolated profile. A docs/cloak.md file is referenced for detail. Beyond that flag, the README does not publish a full configuration reference in the material available here, so anyone needing to tune ports, profile paths or timeouts should expect to read the source rather than the docs.

Where the design breaks down

The headed, persistent-profile default is the right call for reproducing a login flow and the wrong call for anything that has to run unattended on a server. There is no headless mode described in the README. The anti-detection story is also deliberately incomplete: the README says public documentation only explains design boundaries and does not disclose internal detection samples or implementation details. That is a reasonable position for a cat-and-mouse tool, but it means you cannot audit why a particular site is or is not passing. The Patchright fork is maintained in a separate repository and rebuilt as detection samples evolve, which makes the stealth layer a moving dependency rather than a fixed one. Finally, the project carries two sponsored placements in the README, one for a residential proxy service and one for a model API reseller, with a discount code and an affiliate link. That does not affect the code, but it tells you the maintenance model leans on sponsorship, and it means the README is partly a marketing surface. The 24-tool surface is also wide enough that context cost per session is real; an agent that lists every tool pays for it.

How it differs from driving Playwright or Puppeteer directly

The obvious alternative is writing your own Playwright or Puppeteer script, or using an existing MCP wrapper around a browser automation library. The difference is in what gets returned. A Playwright script returns whatever you coded it to return, and the human decides what to inspect next. js-reverse-mcp returns material shaped for a model to decide next: bounded detail views, export hints, pending-request warnings, call frames you can evaluate in, and a local file layer that keeps large scripts and binary bodies out of the chat context. If your task is a fixed, repeatable extraction you already understand, a plain Playwright script is cheaper, more predictable, and has no fork to track. If your task is open-ended, where you do not yet know which script sets the cookie or which WebSocket frame carries the token, the agent-facing primitives are the point. The trade is that you are now debugging through a model, and the model's mistakes become your debugging session.

Version cadence, licence and what to check before you commit

The repository is Apache-2.0, which permits commercial use and modification provided you preserve notices and state changes; the usual disclaimer of warranty applies, and this is not legal advice. Recent releases are tight: v4.0.2 and v4.0.3 both landed on 2026-08-20, and v4.0.5 on 2026-09-03, the same day as the last push. That cadence suggests active maintenance, and it also means pinning a version is wise if you depend on tool output shapes. The separate Patchright fork adds a second upgrade surface you do not control on the same schedule. Before adopting, confirm your Node version meets v20.19, confirm the breakpoint pause path returns a call frame your client can evaluate in, and decide whether --cloak is needed at all. Running the default profile against a site that does not fingerprint aggressively avoids the second Chromium profile entirely, and that is the configuration most debugging work actually needs.

Editorial conclusion

Adopt js-reverse-mcp if you already drive an MCP-capable assistant and want its reasoning loop to include breakpoints, call-frame evaluation and exported network bodies instead of pasted DevTools screenshots. Skip it if you need a headless crawler at scale, a stable public API, or a guarantee against fingerprinting; the README explicitly refuses that last promise. Before trusting it on a real target, verify three things yourself: that your Node is v20.19 or newer, that the breakpoint pause path returns a call frame you can evaluate in, and whether --cloak is actually required for your site or just adds a second Chromium profile to maintain.

Official sources

  1. Issues
  2. License: Apache-2.0
  3. README
  4. Releases
  5. zhizhuodemao/js-reverse-mcp on GitHub
Community notes

Community notes