js-reverse-mcp
Provides browser automation and debugging integration with Google Chrome, enabling page navigation, script inspection, breakpoints, network and WebSocket analysis, screenshots, and browser state management through CDP/Playwright/Patchright.
Provides JavaScript reverse-engineering capabilities for scripts loaded by web pages, including listing, searching, and saving sources; setting breakpoints; inspecting paused call frames and scopes; and evaluating code in page or breakpoint context.
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., "@js-reverse-mcp List all loaded scripts and save the largest one to disk"
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 | 中文
AI-first / AI-native 的 JavaScript 逆向工程 MCP Server,让你的 AI 编码助手(如 Claude、Cursor、Copilot)能够像分析师一样持续调试、定位、保存和复盘网页中的 JavaScript 行为。
它不是把 Chrome DevTools API 原样搬给模型,而是把脚本、断点、网络、WebSocket、浏览器状态和本地文件 I/O 重新组织成适合 AI Agent 连续推理和操作的工具。反检测是其中一部分能力:默认使用为本 MCP 重新编译发布、独立维护的 Patchright fork 提供协议层 stealth,对强反爬站点可选启用 CloakBrowser 源码层指纹模式。
☁️ 赞助 · Sponsored by IPWO
IPWO 住宅代理支持灵活的代理配置,开发者可以根据不同任务选择相应的网络环境,用于网页访问、请求测试、地区化内容分析及自动化工作流。
对于涉及 JS 逆向、浏览器调试和 Web 网络分析的项目,住宅代理也可以作为网络环境的一种补充选择,帮助开发者更灵活地满足不同地区的访问与测试需求。
👉 免费测试入口,9 折优惠码:0204
Related MCP server: Chrome DevTools MCP
☁️ 赞助 · Sponsored by Infistar.cc 无限星河
js-reverse-mcp × Infistar.cc 无限星河|全模型 API · 稳定驱动 AI 辅助调试
感谢 Infistar.cc 无限星河赞助并为 js-reverse-mcp 提供模型服务支持!
⚡ 稳定承载复杂调试任务:提供企业级高并发通道与多节点冗余,价格低至官方渠道 1 折,减少限流、429 和长任务断连问题。
🧠 一个 API Key 接入主流模型:支持 ChatGPT、Claude、Gemini、Kimi、GLM、DeepSeek 等模型,适配 Claude Code、Codex、Cursor 等 AI 编程工具。
🔎 助力授权调试与安全研究:适用于脚本检索、断点分析、网络请求追踪、调用栈检查和代码逻辑理解等多步骤任务。
📦 项目用户专属福利:通过 专属推广链接 注册并完成首次调用,即可领取 5 美元等值测试额度 / 首充专属优惠。
定位:Claude Code / Codex 模型 API 配置支持。
功能特点
AI-native 工具设计:工具粒度、输出边界和错误提示都围绕 Agent 决策设计,避免把模型推向无效下一步
可复盘工作流:脚本源码、网络原始数据、二进制结果都能导出到本地文件,再作为后续分析输入
断点上下文执行:暂停时可直接在 call frame 中求值,检查作用域变量,单步执行并返回源码上下文
脚本分析:列出所有加载的 JS,搜索代码,获取/保存源码,自动格式化大型压缩脚本
网络与 WebSocket 分析:请求调用栈、XHR 断点、Set-Cookie 识别、原始 body/header 导出、WebSocket 消息分组
浏览器状态重放:清理当前站点 cookies / cache / storage / sessionStorage,配合 reload 复现 cookie 和风控流程
默认有头 + 持久化登录态:看得到浏览器,cookies / localStorage 跨会话保留
专用 Patchright 内核:默认依赖本项目独立维护的 Patchright fork,持续修复上游已知的共享实现特征
可选反检测层:专用 Patchright 协议层 stealth 默认启用;强反爬站点可加
--cloak使用 CloakBrowser 二进制
专用 Patchright fork
js-reverse-mcp 不再直接依赖 Patchright 的大众发行包,而是使用专门为本 MCP 编译发布的 @zhizhuodemao/patchright。这个 fork 会在独立仓库持续维护,并随本 MCP 的实际检测样本演进。
不再直接依赖 Patchright 大众发行包
针对已确认的上游共享实现特征进行协议层调整并重新编译发布
反检测调整不依赖页面级 JS 注入
保留 evaluate、locator 和页面控制等原始能力
fork 在面向本 MCP 的专用仓库中持续维护
公开文档仅说明设计边界,不展开内部检测样本与实现细节。专用 fork 的目标是减少已确认的共享实现特征,而不是承诺浏览器自动化绝对不可检测。
系统要求
快速开始(npx)
无需安装,直接在 MCP 客户端配置中添加:
{
"mcpServers": {
"js-reverse": {
"command": "npx",
"args": ["js-reverse-mcp"]
}
}
}Claude Code
claude mcp add js-reverse npx js-reverse-mcp如果你还没有可用的模型 API,或者需要配置自定义 API 地址,可以参考:Claude Code / Codex 第三方模型 API 配置教程。
Codex
codex mcp add js-reverse -- npx js-reverse-mcp如果你还没有可用的模型 API,或者需要配置自定义 API 地址,可以参考:Claude Code / Codex 第三方模型 API 配置教程。
Cursor
进入 Cursor Settings -> MCP -> New MCP Server,使用上面的配置。
VS Code Copilot
code --add-mcp '{"name":"js-reverse","command":"npx","args":["js-reverse-mcp"]}'本地安装(可选)
git clone https://github.com/zhizhuodemao/js-reverse-mcp.git
cd js-reverse-mcp
npm install
npm run build然后在 MCP 配置中使用本地路径:
{
"mcpServers": {
"js-reverse": {
"command": "node",
"args": ["/你的路径/js-reverse-mcp/build/src/index.js"]
}
}
}AI-first 设计
这个项目的核心目标不是“能操作浏览器”,而是让 AI Agent 能稳定完成一轮真实 JS 逆向任务:打开页面、过风控、定位脚本、保存源码、设置断点、触发行为、检查运行时、导出网络材料、复现状态,然后继续推理。
几个设计取向贯穿在代码里:
工具是 Agent primitives,不是 DevTools 菜单映射:
list_network_requests既能列索引,也能按reqid查详情,还能用outputFile导出精确材料;evaluate_script既能在页面执行,也能在断点 call frame 执行,还能接收localFilePath输入。输出要能指导下一步:列表输出保持短而可扫描;详情输出有边界;长结果提示导出;pending 请求会明确提示先恢复执行,避免 Agent 等一个永远不会完成的 response。
本地文件是分析工作台:
save_script_source、list_network_requests(..., outputFile)、evaluate_script(..., localFilePath)让 Agent 能在浏览器、网络和本地文件之间往返,而不是把大段代码或二进制数据塞进聊天上下文。状态可清理、流程可重放:默认 profile 保留登录态;
--isolated提供一次性干净环境;clear_site_data只清当前站点相关状态,用来反复复现 cookie 生成、风控初始化和请求链路。反检测服务于调试链路:CDP 静默导航、真实视口、Google referer、专用 Patchright fork 和 CloakBrowser 的目标都是让 Agent 能进入目标页面继续分析,而不是把项目变成一个泛用爬虫框架。
反检测机制(支撑能力)
反检测是 js-reverse-mcp 的底层支撑能力之一。包装层(这个 MCP 自己)零 JS 注入、不做 Object.defineProperty hack(那本身就是检测信号)。所有反检测都在两个互不重叠的层:
层 | 默认模式 |
|
协议层(CDP) | 专用 Patchright fork:不调 | 同 |
源码层(C++ 二进制 patch) | 无 —— 直接用系统 Google Chrome | CloakBrowser 二进制(按平台提供源码层指纹 patch,覆盖 |
Profile 目录 |
|
|
实际浏览器 | 你装的 Google Chrome(带 Web Store、扩展、sync) | 定制 Chromium 编译版(无 Google 服务、无 Web Store) |
另外几个导航级措施(两种模式都生效):
CDP 静默导航 —— 页面加载时不激活
Network.enable/Debugger.enable,请求/控制台收集只走 Playwright 监听器,直到某个工具显式需要 CDP 才激活Google Referer ——
new_page默认带referer: https://www.google.com/真实视口 —— 关掉 Playwright 默认的 1280×720 假视口,浏览器展示真实屏幕尺寸
何时开 --cloak:只在以上还不够、被站点指纹拦截时才用。详见 docs/cloak.md。
工具列表(24 个)
页面与导航
工具 | 描述 |
| 列出打开的页面,或按索引选择调试上下文 |
| 创建新页面并导航到 URL |
| 导航、后退、前进或刷新页面 |
| 列出所有 frame(iframe),或选择执行上下文 |
| 严格匹配并点击当前 frame 中的单个可见元素 |
| 截取页面截图 |
脚本分析
工具 | 描述 |
| 列出页面中所有加载的 JavaScript 脚本 |
| 获取脚本源码片段,支持行范围或字符偏移 |
| 保存完整脚本源码到本地文件(适用于大型/压缩/WASM文件) |
| 在所有脚本中搜索字符串或正则表达式 |
断点与执行控制
工具 | 描述 |
| 通过搜索代码文本自动设置断点(适用于压缩代码) |
| 按 URL 模式设置 XHR/Fetch 断点 |
| 用显式 action 按 ID、URL 或全部移除断点 |
| 列出所有活动断点 |
| 获取暂停状态、调用栈和作用域变量 |
| 用显式 action 暂停或恢复执行 |
| 单步调试(over/into/out),返回位置和源码上下文 |
网络与 WebSocket
工具 | 描述 |
| 列出网络请求、查看详情,或导出 header/body/query 等原始材料 |
| 显式确认后清空当前页面已收集的请求和 body cache |
| 获取网络请求的 JavaScript 调用栈 |
| 列出 WebSocket 连接、分析消息模式或获取消息详情 |
浏览器状态
工具 | 描述 |
| 清理当前站点相关 cookies、origin storage 和 sessionStorage;可显式选择清理全局 HTTP cache |
检查工具
工具 | 描述 |
| 在页面或断点上下文执行 JavaScript,支持主世界、保存结果和读取一个本地输入文件 |
| 列出控制台消息,或按 msgid 获取单条详情 |
使用示例
JS 逆向基本流程
打开目标页面
打开 https://example.com 并列出所有加载的 JS 脚本查找目标函数
在所有脚本中搜索包含 "encrypt" 的代码设置断点
在加密函数入口处设置断点触发并分析
在页面上触发操作,断点命中后检查参数、调用栈和作用域变量WebSocket 协议分析
列出 WebSocket 连接,分析消息模式,查看特定类型的消息内容Agent 推荐的完整捕获流程
因为导航阶段会刻意保持 CDP 静默,首次进入目标页时不会立即打开 Network / Debugger 域。推荐流程是先过风控,再刷新捕获:
1. new_page 打开目标页
2. 调用 list_network_requests 激活 collectors
3. navigate_page(type="reload") 刷新页面
4. 再次 list_network_requests 查看完整请求
5. 对关键 reqid 使用 outputFile 导出原始材料Cookie / 风控重放流程
1. clear_site_data(confirm=true) 清理当前站点状态
2. navigate_page(type="reload") 重新触发初始化
3. list_network_requests 找到设置 cookie 或提交 sensor 的请求
4. 导出 requestBody / responseHeaders / responseBody
5. 用 evaluate_script + localFilePath 在页面上下文中复算或验证配置选项
CLI 保持精简,所有 flag 都是可选项。99% 场景默认即可。涉及本地文件时,建议用 --allowedRoots 限定 Agent 可读写的目录。
选项 | 描述 | 默认值 |
| 切换到 CloakBrowser 隐身二进制(取代系统 Chrome)。启用按平台提供的 C++ 源码层指纹 patch。首次启动自动下载 ~200MB 二进制;指纹身份按 profile 持久化。详见 docs/cloak.md。 |
|
| 使用临时 user-data-dir(cookies/localStorage 不保留,关闭时自动清理) |
|
| 连接到已运行的 Chrome 实例(CDP HTTP 端点,如 | – |
| 写入 | – |
| 可重复指定 Agent 允许读写的本地目录;解析真实路径并拒绝符号链接越界。启用时禁用 | – |
示例配置
默认 —— 系统 Chrome + 持久化登录态(绝大多数调试场景推荐):
{
"mcpServers": {
"js-reverse": {
"command": "npx",
"args": ["js-reverse-mcp"]
}
}
}--cloak —— 强反爬站点(Cloudflare Turnstile / DataDome / FingerprintJS 防护):
强烈推荐:先把二进制预下载好(一次性,~30–60 秒)。不做这一步的话,首次启动带
--cloak的 MCP 会静默下载 ~200MB,看起来像 MCP 卡住了:npx cloakbrowser install(
cloakbrowser包已经通过optionalDependencies一起装好,这条命令只是触发它自带的二进制下载逻辑,有进度条)
{
"mcpServers": {
"js-reverse-cloak": {
"command": "npx",
"args": ["js-reverse-mcp", "--cloak"]
}
}
}两套并行 —— 两个 MCP 实例 profile 物理隔离,根据目标站点切换:
{
"mcpServers": {
"js-reverse": {
"command": "npx",
"args": ["js-reverse-mcp"]
},
"js-reverse-cloak": {
"command": "npx",
"args": ["js-reverse-mcp", "--cloak"]
}
}
}--isolated —— 每次全新 profile(不保留 cookies/localStorage):
{
"mcpServers": {
"js-reverse": {
"command": "npx",
"args": ["js-reverse-mcp", "--isolated"]
}
}
}连接到已运行的 Chrome / 第三方指纹浏览器
--browserUrl 只接受 CDP endpoint(能响应 /json/version 的 HTTP 端点),不接受厂商私有 Local API。本地 Chrome、AdsPower、BitBrowser 等场景下怎么拿到 CDP 端口,详见专门的文档:
📖 docs/cdp-endpoint.md —— 如何拿到 CDP 调试端口
最短路径(本地 Chrome):
# 先关掉所有 Chrome 窗口,然后
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome \
--remote-debugging-port=9222 --user-data-dir=/tmp/chrome-debug{
"mcpServers": {
"js-reverse": {
"command": "npx",
"args": ["js-reverse-mcp", "--browserUrl", "http://127.0.0.1:9222"]
}
}
}指纹浏览器(AdsPower、BitBrowser 等)的 CDP 端口是每次启动随机变化的,必须通过厂商 Local API 启动浏览器后再提取,操作步骤和示例脚本都在上面那篇文档里。
故障排除
被反爬系统拦截
如果访问某些站点被拦截(如知乎返回 40362、Cloudflare 挑战死循环):
先试
--isolated—— 用全新 profile 排除残留状态污染:"args": ["js-reverse-mcp", "--isolated"]还不行就开
--cloak—— 启用按平台提供的源码层指纹 patch:"args": ["js-reverse-mcp", "--cloak"]最后再考虑手动清持久化 profile(会丢登录态):
rm -rf ~/.cache/chrome-devtools-mcp/chrome-profile
什么时候该开 --cloak、什么时候不该开,详见 docs/cloak.md。
Agent 路由评测(维护者)
npm run eval:routing:validate 会离线校验实际 MCP tools/list、server instructions 与 evals/tool-routing.json 的 30 条工具选择契约;该命令不会访问模型端点,并已纳入 presubmit。
真实模型评测是显式 opt-in,会逐条调用 OpenAI-compatible Chat Completions 端点并可能产生费用:
MCP_ROUTING_EVAL_ENDPOINT=https://api.example.com/v1/chat/completions \
MCP_ROUTING_EVAL_MODEL=model-name \
MCP_ROUTING_EVAL_API_KEY=secret \
npm run eval:routingMCP_ROUTING_EVAL_API_KEY 对无需认证的本地端点可省略;带凭据的远程端点必须使用 HTTPS,HTTP 仅允许 loopback。可用 MCP_ROUTING_EVAL_TIMEOUT_MS 调整单条请求超时。默认要求 100% 通过,跨模型对比时可用 MCP_ROUTING_EVAL_MIN_PASS_RATE 设置 (0, 1] 阈值。评测不会输出 API key、endpoint 或端点错误响应正文。
安全提示
此工具会将浏览器内容暴露给 MCP 客户端,允许检查、调试和修改浏览器中的任何数据。请勿在包含敏感信息的页面上使用。
evaluate_script.localFilePath、各类 outputFile/filePath 会让 MCP 进程读取或写入宿主机文件。生产或共享环境应使用一个或多个 --allowedRoots 收窄到专用工作目录;未配置时访问范围不受限制。启用 --allowedRoots 后,file:、view-source:file: 和 filesystem:file: 浏览器页面也会被拒绝,避免通过浏览器导航绕过目录边界;需要调试本地页面时,只能在明确接受本地文件暴露风险的会话中不配置该选项。
许可证
Apache-2.0
Available Tools
24 toolsbreak_on_xhrA
Sets a URL-substring breakpoint for a future XHR/Fetch when runtime request arguments, local variables, or payload construction must be inspected. For an already captured request, call get_request_initiator first because it is non-pausing; use this only when that evidence is insufficient. Set it before reproducing the user action—it does not inspect past traffic—then call get_paused_info/evaluate_script and finally step or resume. The URL pattern identifies this breakpoint for list_breakpoints and remove_breakpoint(action="remove_xhr").
Inputs: url (required). Returns: ok, data, tool, error, +1 more
clear_network_requestsADestructiveIdempotent
Discard captured HTTP(S) evidence for the currently selected page after confirm=true. Use this immediately before reproducing an action when a clean network capture window is needed; do not use it to reset login, cookies, cache, or other browser state. It irreversibly clears the in-memory request queue, cached response bodies, and initiator maps only. Browser cookies, HTTP cache, origin storage, console messages, and WebSocket connections/messages are unchanged; use clear_site_data for cookie and storage reset. New captures continue above the previous reqid high-water mark because reqids are never reused.
Inputs: confirm. Returns: ok, data, tool, error, +1 more
clear_site_dataADestructiveIdempotent
Irreversibly clear browser state after confirm=true to create a clean replay environment for the selected page. Use this before replaying login, session creation, storage initialization, or other state-dependent flows; do not use it to inspect cookies or determine which response set one. For cookie provenance, including HttpOnly, Secure, and SameSite attributes, use list_network_requests with cookieName first. Cleanup covers cookies affecting the selected page's HTTP(S) frames—including HttpOnly and Secure cookies through the browser context—persistent storage for those frame origins, and each HTTP(S) frame's sessionStorage. It does not reload the page. The browser HTTP cache is global and is preserved by default; set clearBrowserCache=true only when that wider cross-page effect is explicitly intended.
Inputs: confirm, clearBrowserCache. Returns: ok, data, tool, error, +1 more
click_elementADestructive
Performs one verified, auditable click in the currently selected frame. Use it when the task requires activating a known button, link, or control after selecting the correct page/frame and identifying a CSS selector; it is the preferred minimal interaction primitive over arbitrary evaluate_script code. It does not discover elements, type text, or silently guess among matches: the selector must resolve to exactly one element unless index is explicit, and the chosen element must be visible. A click can submit data, navigate, or trigger external effects, so confirm=true is required and the result reports the exact resolved element.
Inputs: selector (required), index, button, confirm, +2 more. Returns: ok, data, tool, error, +1 more
evaluate_scriptADestructive
Evaluates one focused JavaScript function for DOM/page state, web storage, page-defined globals, a paused-frame expression, or browser-side processing of one local file. Use it when those runtime values are the goal and no narrower evidence tool applies. Do not use document.cookie or page evaluation to investigate HttpOnly/Secure cookies, Set-Cookie provenance, or captured HTTP evidence; use list_network_requests with cookieName/reqid, and use search_in_sources/get_script_source for source discovery. While running, evaluation uses the selected frame's isolated world by default or its page main world with mainWorld=true; while paused, it always uses the chosen call frame and ignores mainWorld. Call get_paused_info before paused evaluation, then step or resume when finished. Arbitrary code can change page/external state and requires confirm=true; inline results are bounded, so use outputFile for exact large or binary results.
Inputs: function (required), confirm, mainWorld, frameIndex, +3 more. Returns: ok, data, tool, error, +1 more
get_paused_infoARead-only
Inspects the current call stack, source locations, and selected call-frame scopes after a code/XHR breakpoint or explicit pause has stopped execution. It neither creates a pause nor resumes one. Returned frameIndex values and callFrameIds belong only to the current pause and expire after any step or resume; use evaluate_script with frameIndex for a focused expression, then step or pause_or_resume(action="resume").
Inputs: frameIndex, includeScopes, maxScopeDepth. Returns: ok, data, tool, error, +1 more
get_request_initiatorARead-only
Non-pausing first action for tracing which JavaScript initiated a retained HTTP request when CDP initiator evidence was active. Pass the reqid from list_network_requests; because initiator capture starts lazily and is not retroactive, an older request may have no stack—in that case reproduce the action and inspect the new reqid, or set break_on_xhr before reproduction when runtime values are required. If the captured stack identifies the code, inspect its URL/location with get_script_source. If arguments, locals, or a dynamically built payload are still needed, use break_on_xhr, reproduce, then call get_paused_info or evaluate_script before stepping or resuming. This tool only reads retained evidence and does not pause or reproduce the request.
Inputs: requestId (required). Returns: ok, data, tool, error, +1 more
get_script_sourceARead-only
Reads a small source region around a search match, paused location, or known statement without executing or pausing the page. Select by URL when available because URL-backed scripts can be resolved again after navigation; use the debugger-context-scoped scriptId only for current inline/eval scripts. Use line ranges for normal source and offset/length for minified single-line bundles. For a whole, minified, or WASM source, use save_script_source; to observe runtime values next, call set_breakpoint_on_text against the original loaded source.
Inputs: url, length, offset, endLine, +2 more. Returns: ok, data, tool, error, +1 more
get_websocket_messagesARead-only
Inspect captured bidirectional WebSocket connections and frame payloads for the selected page. Use this for WebSocket, socket, live-update, push, streaming, or realtime message flows; use list_network_requests for ordinary HTTP/XHR/fetch traffic and WebSocket upgrade request headers. WebSocket capture starts lazily on this tool's first use and is not retroactive: if the relevant socket already connected or exchanged frames, call this tool once to initialize capture, then reload or reproduce the flow. Without wsid it lists connections so you can choose one. With wsid it lists paginated sent/received frames; add show_content=true for payload previews. With wsid and analyze=true it groups frames by payload pattern and returns group IDs and sample frame indices; then use groupId to inspect one pattern. With wsid and frameIndex it returns one retained frame's detailed payload using the stable index shown in frame tables or analysis samples.
Inputs: wsid, analyze, groupId, pageIdx, +6 more. Returns: ok, data, tool, error, +1 more
list_breakpointsARead-only
Inspects code and XHR/Fetch breakpoints managed by this MCP session before reproducing an action or cleaning up debugger state. Returns current code breakpointIds and the exact XHR URL patterns needed by remove_breakpoint; URL-backed definitions are restored after navigation when possible, but a rebuilt debugger session may assign new IDs. This does not show why or where execution is currently paused—use get_paused_info for the active call stack.
Inputs: pageIdx, pageSize. Returns: ok, data, tool, error, +1 more
list_console_messagesARead-only
Inspects console messages and uncaught page errors captured for the selected page. Use it to diagnose runtime failures, warnings, application logs, or values already emitted by page code; use search_in_sources for source text and list_network_requests for HTTP evidence instead. Without msgid it lists messages 20 per page by default, optionally filtered by type or retained navigation history. With msgid it returns one message by its stable ID for focused inspection. Capture begins when this MCP attaches and is not retroactive, so reload or reproduce code that logged before attachment.
Inputs: msgid, types, pageIdx, pageSize, +1 more. Returns: ok, data, tool, error, +1 more
list_network_requestsA
Inspect captured HTTP(S) traffic for the currently selected page. Use this for API calls, request or response headers and bodies, redirects, authentication/session flows, replay or signing inputs, and determining which response created, refreshed, rotated, overwritten, or deleted a cookie. Without reqid it lists and filters requests; with cookieName it traces exact response Set-Cookie updates oldest-first, including cookies with HttpOnly, Secure, or SameSite attributes that page JavaScript cannot fully inspect; with reqid it returns bounded request details; with reqid plus outputFile it exports exact data. To inspect complete Set-Cookie values and attributes, export outputPart="responseHeaders" for a reqid returned by cookieName mode. cookieName never searches outbound Cookie request headers. Use get_websocket_messages for WebSocket frame payloads; this tool only represents the HTTP upgrade request. Capture begins when this MCP attaches and is not retroactive, so reload or reproduce traffic that occurred earlier. Captures then survive navigation in a 5000-request FIFO queue. List and cookie-flow modes default to 20 items per page; filters combine with AND and multiple values inside one filter combine with OR.
Inputs: reqid, methods, pageIdx, pageSize, +6 more. Returns: ok, data, tool, error, +1 more
list_scriptsARead-only
Discovers JavaScript currently loaded in the selected debugger context—the main frame by default, or the frame chosen with select_frame. Use select_frame first for iframe-specific source/debugger work. Includes external, inline, and eval scripts in that context; if you already know a function name, endpoint, or code literal, use search_in_sources instead. Each result includes a context-scoped scriptId that expires on reload, navigation, or debugger target change and, for external scripts, a URL that is the preferred selector for get_script_source or save_script_source.
Inputs: filter, pageIdx, pageSize. Returns: ok, data, tool, error, +1 more
new_pageA
Opens a separate browser page for a URL, reusing an existing about:blank startup tab when available. Use this when the task needs another tab or should preserve the currently selected page; use navigate_page to change the URL in the existing selected page instead. It waits for DOMContentLoaded, not every background resource, and then makes the opened page the target for later tools. It preserves cookies, storage, cache, and other browser state; use clear_site_data separately when a clean replay is required.
Inputs: url (required), timeout. Returns: ok, data, tool, error, +1 more
pause_or_resumeA
Explicitly requests an immediate pause or resumes an existing paused execution; it never toggles implicitly. Use a code breakpoint or break_on_xhr instead when a specific statement/request should stop, and use get_paused_info before resuming if evidence must be collected. Resuming invalidates current callFrameIds and frame indices.
Inputs: action (required). Returns: ok, data, tool, error, +1 more
remove_breakpointADestructiveIdempotent
Removes a known code breakpoint, XHR/Fetch breakpoint, or every MCP-managed breakpoint after explicit confirmation. Use breakpointId from set_breakpoint_on_text/list_breakpoints for remove_code, or reuse the exact URL pattern from break_on_xhr/list_breakpoints for remove_xhr. Removal does not resume an already paused page; call pause_or_resume(action="resume") separately after inspection.
Inputs: action (required), url, confirm, breakpointId. Returns: ok, data, tool, error, +1 more
save_script_sourceA
Saves one complete JavaScript or WASM source for local inspection when an inline snippet is insufficient, especially for large or minified bundles. Prefer get_script_source for a small known region and search_in_sources to locate text across loaded scripts first. With format=true, destinations using a supported JavaScript/TypeScript extension are formatted by default; other extensions preserve raw source, and formatted line numbers may differ from the live page. Use distinctive text plus the original URL with set_breakpoint_on_text for runtime debugging. The returned filename is the resolved local path, while scriptId remains scoped to the current debugger context.
Inputs: filePath (required), url, format, scriptId, +1 more. Returns: ok, data, tool, error, +1 more
search_in_sourcesARead-only
Finds a known function name, endpoint, string literal, token, or code pattern in JavaScript loaded by the selected debugger context—the main frame by default, or the frame chosen with select_frame. It searches external, inline/eval, and minified sources in that context without executing or pausing the page, returning 1-based lines plus context-scoped scriptIds; URLs are the preferred selectors for URL-backed matches. Use select_frame first for iframe-specific source work, get_script_source for nearby context, save_script_source for a whole bundle, or set_breakpoint_on_text when runtime values are needed. For a known captured request, prefer get_request_initiator before a broad source search.
Inputs: query (required), isRegex, urlFilter, maxResults, +3 more. Returns: ok, data, tool, error, +1 more
select_frameA
Lists or selects frames, including iframes, within the current page. Use it when the target element, page-defined global, script, or execution context may live in an iframe: first list frames, then pass frameIdx before click_element or evaluate_script. Omitting frameIdx lists 20 frames per page without changing context; passing frameIdx changes the shared frame target, with 0 restoring the main frame. It does not switch browser tabs or navigate—use select_page or navigate_page for those actions—and listPageIdx only paginates this listing.
Inputs: frameIdx, pageSize, listPageIdx. Returns: ok, data, tool, error, +1 more
select_pageA
Lists or selects open browser pages. Use it without pageIdx to identify the active page or choose the correct tab before inspecting network traffic, scripts, frames, or console output; pass pageIdx to make one listed page the shared target for later tools. It does not navigate or create pages: use navigate_page to change the selected page's URL and new_page when a separate tab is required. listPageIdx only paginates the page listing and never changes selection.
Inputs: pageIdx, pageSize, listPageIdx. Returns: ok, data, tool, error, +1 more
set_breakpoint_on_textA
Sets a restorable URL-backed breakpoint when distinctive code text is known and its runtime values must be observed. Call it directly when the user already supplies precise text plus any URL/occurrence disambiguation; use search_in_sources/get_script_source first only when the location is unknown or ambiguous. For an API with no known code location, start with list_network_requests and get_request_initiator or use break_on_xhr. On a hit, call get_paused_info, optionally evaluate_script, then step or resume. Returns the current breakpointId for remove_breakpoint; list breakpoints again after a rebuilt debugger session, and note that unnamed inline/eval scripts cannot use this URL breakpoint.
Inputs: text (required), condition, urlFilter, occurrence. Returns: ok, data, tool, error, +1 more
stepA
Advances JavaScript execution by one debugger operation from an existing pause and returns the next stopped call frame with concise source context. Use after get_paused_info or evaluate_script when control flow still needs tracing; it cannot start from running execution. Each advance invalidates prior callFrameIds, so inspect the new pause again as needed, then use pause_or_resume(action="resume") to finish.
Inputs: direction (required). Returns: ok, data, tool, error, +1 more
take_screenshotA
Captures the visual state of the currently selected page. Use it to verify page layout, visible UI state, selector targets, in-page dialogs/modals, or the effect of a navigation/click; it is not a substitute for DOM values, network evidence, or script inspection. By default it returns the visible viewport, while fullPage=true captures the whole document; oversized captures may be saved as a temporary artifact instead of attached. Pass filePath for a reusable local artifact; existing files require confirmOverwrite=true and remain subject to --allowedRoots.
Inputs: format, quality, filePath, fullPage, +1 more. Returns: ok, data, tool, error, +1 more
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 24 tools
Each tool targets a distinct resource+action: network, console, websocket, sources (list/search/get/save), breakpoints (set/list/remove/break_on_xhr), pause control, frame/page selection, and interaction. Descriptions actively route between near-neighbors (e.g. get_script_source vs save_script_source vs search_in_sources, get_request_initiator vs break_on_xhr), so an agent can reliably pick the right one.
Consistent snake_case with a dominant verb_noun pattern (list_network_requests, get_script_source, remove_breakpoint, clear_site_data, select_frame). A few deviations — new_page (no verb), break_on_xhr (verb_prep_noun), step and pause_or_resume (bare/compound verbs) — but all remain readable and semantic.
24 tools is on the heavy side, but the domain (CDP-level browser reverse engineering) genuinely spans network, debugger, source, frame, page, and interaction surfaces, and each tool maps to a real capability with no filler. Slightly over a lean set but reasonable for the scope.
Coverage of the reverse-engineering core is strong: HTTP and WebSocket evidence, console, source discovery/inspection, code and XHR breakpoints, pause/step, and site/network reset. Gaps exist on the interaction side (no text input/keypress/hover/scroll or wait-for-selector), and breakpoints are text- or URL-based only (no line/column breakpoint), which agents must work around via evaluate_script or click_element.
Related MCP Connectors
Live browser debugging for AI assistants — DOM, console, network via MCP.
Control a real browser from AI agents: navigate, click, type, screenshot, read the page.
Cloud browser, web extraction, screenshots, and remote CDP tools for AI agents.
Web data extraction and browser workflows for AI assistants.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to debug frontend applications by providing direct access to browser DevTools, React state, DOM inspection, and runtime debugging capabilities. Bridges the gap between AI and complex web applications for autonomous debugging and issue resolution.1MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI coding assistants to control and inspect a live Chrome browser through Chrome DevTools. Provides browser automation, performance analysis, debugging capabilities, and network request monitoring.1,859,617 npm55,025Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables AI coding assistants to control and inspect a live Chrome browser for automation, debugging, performance analysis, network monitoring, and DOM interaction through Chrome DevTools Protocol.1,859,617 npmApache 2.0
- AlicenseAqualityBmaintenanceEnables AI coding assistants to debug and analyze JavaScript code in web pages through breakpoint debugging, function hooking, network analysis, and runtime inspection of scripts including minified code.241,240 npm3,049Apache 2.0