camoufox-reverse-mcp
This MCP server controls an anti-detection Camoufox/Firefox browser and provides JavaScript reverse-engineering tools for browser automation, network/script/runtime analysis, JSVMP instrumentation, and Firefox RDP debugging.
Launch/attach to Camoufox, navigate, reload, screenshot, snapshot pages, click, type, wait, inspect frames, and reset browser state.
Execute arbitrary JS in isolated or page main worlds and frames, write large results to files, and record replayable Playwright trace sessions.
List/read/save loaded scripts, search script code, and extract scripts delivered via fetch plus eval from captured responses.
Hook or trace functions, inject built-in hook presets, collect console logs and trace data, and remove installed hooks.
Capture and filter network requests, inspect full request/response details and initiator stacks, intercept/modify/mock/block requests, compare requests, export captures, and save response bodies.
Manage cookies, localStorage/sessionStorage, and import/export complete browser state.
Investigate JSVMP with runtime probes, source-level AST/regex instrumentation, per-state deep captures, environment comparison, and offline signer verification.
Use Gecko-native property access tracing with a custom browser build and query historical trace files.
Use Firefox native RDP for real breakpoints, stepping, call stacks, scopes, paused-frame evaluation, and request breakpoints.
Check environment, dependencies, and browser state.
Enables bypassing Cloudflare's anti-bot detection systems to perform web scraping and JavaScript reverse engineering on protected sites.
Utilizes the Firefox-based Camoufox browser to provide engine-level fingerprint spoofing and stealthy automation capabilities.
Provides a comprehensive suite of tools for JavaScript reverse engineering, including script source analysis, function hooking, dynamic debugging, and execution.
Supports blocking WebRTC to prevent IP leaks and enhance anonymity during automated browser operations.
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., "@camoufox-reverse-mcp intercept fetch requests on example.com and analyze the encryption parameters"
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.
camoufox-reverse-mcp
An MCP Server based on an anti-fingerprinting browser, specifically designed for JavaScript reverse engineering.
An MCP (Model Context Protocol) server that allows AI coding assistants (Claude Code, Cursor, Cline, etc.) to perform reverse engineering operations via the Camoufox anti-fingerprinting browser, including: API parameter analysis, static JS file analysis, dynamic breakpoint debugging, function hook tracing, network traffic interception, JSVMP bytecode analysis, and Cookie/storage management.
Why choose Camoufox?
Feature | chrome-devtools-mcp | camoufox-reverse-mcp |
Browser Engine | Chrome (Puppeteer) | Firefox (Camoufox) |
Anti-detection | None | C++ Engine-level fingerprinting |
Debugging | Limited (no breakpoints) | Playwright + JS Hook |
JSVMP Analysis | None | Interpreter instrumentation + Source-level rewriting |
Hook Persistence | Not supported | Context-level persistence, auto-re-injection after navigation |
Core Advantages:
Camoufox modifies fingerprint information at the C++ level, not via JS-layer patching, making it undetectable at the root.
Juggler protocol sandbox isolation makes Playwright completely undetectable by page JS.
BrowserForge generates fingerprints based on real-world traffic statistical distributions, not random combinations.
Works normally on various strong anti-scraping sites like RS, AK, JY, CF, etc.
Hooks use
Object.definePropertyfor anti-overwrite protection, preventing page scripts from restoring original methods.
Related MCP server: JS Reverse MCP
Quick Start
Method 1: Direct Installation via AI Chat (Recommended)
In the chat box of your AI coding tool (Cursor / Claude Code / Codex, etc.), enter:
帮我安装下这个mcp工具:camoufox-reverse-mcp
项目地址:https://github.com/WhiteNightShadow/camoufox-reverse-mcpThe AI will automatically complete the entire process of cloning, installing dependencies, and configuring the MCP Server.
Method 2: Manual Installation
git clone https://github.com/WhiteNightShadow/camoufox-reverse-mcp.git
cd camoufox-reverse-mcp
pip install -e .Client Configuration
{
"mcpServers": {
"camoufox-reverse": {
"command": "python",
"args": ["-m", "camoufox_reverse_mcp"]
}
}
}{
"mcpServers": {
"camoufox-reverse": {
"command": "python",
"args": ["-m", "camoufox_reverse_mcp", "--headless"]
}
}
}{
"mcpServers": {
"camoufox-reverse": {
"command": "python",
"args": [
"-m", "camoufox_reverse_mcp",
"--proxy", "http://127.0.0.1:7890",
"--geoip",
"--humanize"
]
}
}
}Overview of Available Tools (35 total)
Browser Control
Tool | Description |
| Launch the Camoufox anti-fingerprinting browser |
| Close the browser and release resources |
| Navigate to a specified URL (supports pre_inject_hooks, redirect_chain tracking) |
| Refresh the page |
| Take a screenshot (supports full page, specific elements) |
| Get the page accessibility tree (token efficient) |
| Click an element / Type text |
| Wait for an element to appear or URL to match |
| Get current page URL, title, viewport size |
JS Execution & Debugging
Tool | Description |
| Execute arbitrary JS expressions in the page context (multi-strategy JSON parsing) |
Script Analysis
Tool | Description |
| Script management: |
| Search keywords (full search if |
Hook & Tracing
Tool | Description |
| Hook or trace functions: |
| One-click injection of preset hooks (xhr / fetch / crypto / websocket / debugger_bypass / cookie / runtime_probe) |
| Remove all hooks and restore original objects |
| Get page console output |
Network Analysis
Tool | Description |
| Network capture control: |
| List captured requests (supports filtering by URL / domain / method / type / status code) |
| Get full request details ( |
| Get the JS call stack that initiated the request |
| Intercept requests: log / block / modify / mock / stop |
JSVMP Reverse Analysis
Anti-scraping Type → Tool Path Reference Table
Anti-scraping Type
Representative
✅ Recommended Path
❌ Disable
Signature-based (Environment = Signature)
RS 5/6, AK sensor_data
instrumentation(action="install")
pre_inject_hooks,hook_jsvmp_interpreter(mode="proxy")Behavior-based (Parameter signature)
TK JSVMP, JY gt4
hook_jsvmp_interpreter(mode="proxy")—
Pure Obfuscation
Common JS obfuscators
Any combination
—
Tool | Description |
| JSVMP runtime probe ( |
| Source-level instrumentation: |
| Browser environment fingerprint collection, for comparison with Node.js/jsdom |
Cookie & Storage
Tool | Description |
| Cookie management: |
| Get localStorage / sessionStorage |
| Export / Import full browser state |
Verification & Environment
Tool | Description |
| Offline verification of signature functions: pass sample list, character-level comparison, locate first deviation point |
| One-stop self-check: MCP version, dependencies, browser status, camoufox-reverse custom version detection |
| Clean up residuals (hooks / capture / routes), without closing the browser |
Engine-level Property Tracing (New in v1.1.0)
Requires camoufox-reverse custom browser. Returns an error if not installed, does not affect other tools.
Tool | Description |
| C++ engine-level DOM property access tracing (JSVMP undetectable). Supports summary/timeline/sequence/search views. |
| List all local trace files (for post-analysis) |
| Query specified historical trace files, supports filtering by object/keyword |
Usage Scenarios
Scenario 1: Reverse Engineering Login Interface Signature Parameters
1. launch_browser()
2. inject_hook_preset("xhr")
3. inject_hook_preset("crypto")
4. navigate("https://example.com/login")
5. type_text("#username", "test") → click("#login-btn")
6. list_network_requests(method="POST")
7. get_request_initiator(request_id=3) ← 定位签名函数
8. search_code("sign") ← 搜索签名代码
9. hook_function("window.getSign", mode="trace")
10. reload() → get_console_logs() ← 收集追踪数据Scenario 2: General JSVMP Reverse Engineering (RS / AK / Self-developed VMP)
1. launch_browser()
2. network_capture(action="start")
3. navigate("https://target-site.com/")
4. list_network_requests(resource_type="script") ← 找到 VMP 脚本
5. instrumentation(action="install", url_pattern="**/vmp_target*.js", mode="ast")
6. inject_hook_preset("cookie", persistent=True)
7. instrumentation(action="reload") ← 让插桩生效
8. instrumentation(action="log", type_filter="tap_get") ← 看 VMP 读了什么环境
9. instrumentation(action="log", type_filter="tap_method") ← 看 VMP 调了什么 API
10. compare_env() ← 收集环境用于 Node.js 补齐Scenario 3: Verifying Protocol Code
1. launch_browser() → navigate("https://target.com")
2. network_capture(action="start")
3. # 触发目标操作,收集带签名的请求
4. reqs = list_network_requests(url_filter="api/search")
5. # 提取样本
6. verify_signer_offline(
signer_code="(s) => ({'X-Bogus': mySign(s.url)})",
samples=[{"id": "r1", "input": {...}, "expected": {"X-Bogus": "..."}}]
)👉 For complete anti-scraping type identification and workflows, see docs/JSVMP_PLAYBOOK.md
Scenario 4: Engine-level Tracing of JSVMP Environment Fingerprints (New in v1.1.0)
Requires camoufox-reverse custom browser
1. launch_browser(enable_trace=True) ← 启动带 C++ 追踪的浏览器
2. navigate("https://www.douyin.com/video/xxx") ← JSVMP 执行,事件自动记录
3. trace_property_access(duration=0, mode="summary", collect_values=True)
→ 返回 JSVMP 实际读取的 42 个 DOM 属性、访问频次、以及真实值
→ 小值内联返回,大值(Canvas/WebGL/Cookie 等)自动保存到
~/.cache/camoufox-reverse/values/ 目录
# 按时间线查看属性访问节奏
4. trace_property_access(duration=0, mode="timeline", bucket_ms=500)
# 按对象过滤
5. trace_property_access(duration=0, filter_object="webgl")
# 搜索特定属性
6. trace_property_access(duration=0, mode="search", search_query="cookie")Difference from compare_env:
trace_property_access: Traces properties actually read by JSVMP (precise, C++ level, undetectable)compare_env: Collects all environment properties of the browser (full, JS level)When using Path B for environment spoofing, use trace results to decide "which properties to patch" to avoid introducing new leaks by over-patching
Technical Architecture
┌─────────────────────────────────────────────────┐
│ AI 编码助手 (Cursor / Claude) │
│ ↕ MCP (stdio) │
├─────────────────────────────────────────────────┤
│ camoufox-reverse-mcp (35 tools) │
│ ┌──────────┬──────────┬──────────┬──────────┐ │
│ │Navigation│ Script │Debugging │ Hooking │ │
│ │ │ Analysis │ │ │ │
│ ├──────────┼──────────┼──────────┼──────────┤ │
│ │ Network │ JSVMP │ Cookie │ Verify │ │
│ │ Capture │ Analysis │ Storage │ Signer │ │
│ ├──────────┴──────────┴──────────┴──────────┤ │
│ │ ★ PropertyTracer (trace_property_access) │ │
│ │ C++ 引擎层 DOM 属性追踪(JSVMP 不可检测) │ │
│ └───────────────────────────────────────────┘ │
│ ↕ Playwright API │
├─────────────────────────────────────────────────┤
│ Camoufox (反指纹 Firefox, Juggler 协议) │
│ C++ 引擎级指纹伪造 · BrowserForge 真实指纹分布 │
└─────────────────────────────────────────────────┘Changelog
v1.1.0 (2026-04-22) — Engine-level Property Tracing
Added 3 tools,
launch_browseraddedenable_traceparameter.
New Tools
trace_property_access— C++ engine-level DOM property access tracing (JSVMP undetectable), supports summary/timeline/sequence/search viewslist_trace_files— List local trace filesquery_trace_file— Query historical trace files
Changes
launch_browseraddedenable_traceparameter; when enabled, it automatically injectsCAMOU_CONFIGandMOZ_DISABLE_CONTENT_SANDBOXcheck_environmentaddedcamoufox_reversefield to detect custom browser installation status
Dependencies
Requires camoufox-reverse custom browser (optional, not installing it does not affect the other 32 tools)
v1.0.0 (2026-04-18) — Tool Streamlining + Return to Pure JS Reverse Toolset
Major Version: 80 → 32 tools, schema tokens halved. Removed Session archive/assertion system, returned to pure JS reverse tool positioning.
Tool Merging (v0.9.0)
network_capture(action=start/stop/clear/status)← start/stop_network_capturescripts(action=list/get/save)← list_scripts / get_script_source / save_scriptsearch_code(keyword, script_url=None)← search_code / search_code_in_scripthook_function(path, mode=intercept/trace)← hook_function / trace_functioninstrumentation(action=install/log/stop/reload/status)← instrument_jsvmp_source / get_instrumentation_log / stop_instrumentation / reload_with_hooks / get_instrumentation_statuscookies(action=get/set/delete)← get_cookies / set_cookies / delete_cookies
Removed Tools
Session archive system (7): start/stop_reverse_session, list_sessions, get_session_snapshot, attach_domain_readonly, export/import_session
Assertion system (4): add/verify/list/remove_assertion
Cold tools (37): trace_property_access, freeze_prototype, find_dispatch_loops, get_page_content, bypass_debugger_trap, check_detection, get_fingerprint_info, dump_jsvmp_strings, evaluate_js_handle, add_init_script, set_breakpoint_via_hook, get_breakpoint_data, etc.
New
verify_signer_offline— Stateless signature function verification (replaces verify_against_session)
Bug Fixes (v0.8.1)
evaluate_js: Multi-strategy JSON parsing (control character cleaning, double-encoding unpacking)navigate: Cleans network cache by default to prevent cross-navigation request pollutionget_network_request:max_body_sizeparameter controls body truncation (default 5000)launch_browser: Returns residual state diagnosis when already_running
Removed Dependencies: tldextract (used only by Session)
Design Philosophy: MCP is a pure toolset (stateless) and does not perform workflow management. Memory/accumulation of analysis projects belongs to the skill layer and user workspace.
v0.6.0 — Practical Bug Fixes
hook_jsvmp_interpreter(mode="proxy"): Fixedtoo much recursioncaused by Proxy recursionremove_hooks: Truly restores Proxy objectsevaluate_js: BOM / lone surrogate / whitespace auto-cleaninginstrument_jsvmp_source: CSP pre-checknavigate: Graceful degradation on timeout
v0.5.0 — Signature-based Anti-scraping Compatibility
instrument_jsvmp_sourcedefault MCP-side AST rewritinghook_jsvmp_interpreteraddedmode="transparent"Anti-scraping type decision table + JSVMP Playbook
v0.4.0 — General JSVMP Adaptation
Source-level instrumentation, Cookie attribution, runtime probes
hook_jsvmp_interpreter multi-path coverage rewriting
v0.3.0 — Stability Fixes
v0.2.0 — Hook Persistence + JSVMP Analysis
v0.1.0 — Initial Version (44 tools)
Feedback / Communication
If you encounter bugs during use, want new Hook presets, or want to discuss JS reverse engineering ideas, feel free to add me on WeChat:
WeChat ID:
han8888v8888
Please add a note "camoufox-reverse" when adding me so I can accept your request quickly.
License
MIT
Available Tools
43 toolscheck_environmentA
One-stop self-check of MCP environment, dependencies, and browser state.
v1.0.0: session-related checks removed (session mechanism removed). Checks MCP version, critical dependencies (esprima, playwright), browser state (residuals, captures).
Returns: dict with sections: mcp, deps, browser, overall_ok, recommendations.
Inputs: no named parameters.
clickC
Click on a page element.
Inputs: selector (required).
close_browserA
Close the browser after serializing any native trace transition.
Inputs: no named parameters.
compare_envA
Collect the browser environment for comparison with Node.js/jsdom.
Values are read in the isolated world, i.e. what the browser provides without page-script patches.
Without output_path it returns a summary: navigator and screen basics,
canvas (toDataURL hash, measureText), WebGL (vendor/renderer, extension
count), audio (OfflineAudioContext fingerprint, sample rate), timing and
misc, plus properties evaluated as expressions.
With output_path it writes an environment bundle (JSON) and returns its path, size and a short summary: every Navigator/Screen getter with plugins and mimeTypes, window metrics and global names, getComputedStyle names and values, CSS declaration prototype names with enumerable flags and the for-in count, the full canvas toDataURL, WebGL parameters/extensions/ shader precisions, audio, storage keys with value lengths (never values, never cookie values), a hidden about:blank iframe compared with the top window (added and removed again; a MutationObserver sees it), timing and Intl. Apply it in Node/jsdom with the skill's env-bundle template.
Args: properties: Extra expressions to evaluate, e.g. ["navigator.oscpu"]. output_path: File for the full bundle; omit for the summary. sections: Limit the bundle to these sections (default all): navigator, screen, window, css, canvas, webgl, audio, storage, iframe, timing.
Returns: dict with categorized environment data, or the bundle's path/summary.
Inputs: sections, properties, output_path.
compare_network_requestsA
Compare 2..10 captured requests without issuing requests or launching a browser.
Args: request_ids: Distinct IDs from list_network_requests in this capture. include_headers: Compare available request headers; incompleteness warns. include_body: Compare exact request body text plus top-level JSON fields. max_value_chars: Preview characters per value (0..2000); digests always cover full values in canonical JSON. Each string also includes raw_utf8 byte length/SHA-256; use that for exact body byte checks. Results may contain credentials; keep them private. max_fields: Maximum changed rows and constant field names (1..200).
Returns: Changed fields, constant names and completeness limits. Query duplicates, value order and raw URL encoding are preserved. Missing differs from null. A varying field is evidence, not proof that it participates in signing.
Inputs: request_ids (required), max_fields, include_body, include_headers, +1 more.
cookiesA
Cookie management (v0.9.0 unified).
Replaces get_cookies / set_cookies / delete_cookies.
Args:
action:
"get" — return cookies (optionally filtered by url, domain, and/or name)
"header" — build a ready-to-use Cookie: header value (deduplicated by name)
"set" — set cookies (requires cookies_list: [{name, value, domain, ...}])
"delete" — delete cookies (filter by name and/or domain; no filter = clear all)
domain: Host or parent domain for get/header/delete (boundary match, includes subdomains).
With name, both filters must match. No filters on delete clears all cookies.
cookies_list: List of cookie dicts for "set".
name: Optional exact cookie name filter for get/header/delete.
url: Optional request URL for get/header so Playwright applies RFC 6265
domain, path, Secure, and expiry matching. When action="header" is called
without url or domain on an http(s) page, defaults to the active page URL.
output_file: For action="header", write the Cookie header to this file (mode 0600)
and omit the raw header string from the inline tool response.
overwrite: Allow replacing an existing output_file.
Returns: For "get": list of cookie dicts. For "header": {"action", "count", "names", "header", "domain", "url"} plus "output": {path, bytes, sha256, ...} (with "header": None) when output_file is used. For "set"/"delete": dict with status and count.
Inputs: action (required), url, name, domain, +3 more. Returns: result
evaluate_jsA
Execute an arbitrary JavaScript expression in the page context and return the result.
v1.0.1 fix: correctly handles undefined/null/void/Symbol return values without triggering JSON.parse crashes.
Default auto mode preserves legacy cleaning and smart JSON parsing; it may strip BOM/whitespace and replace lone surrogates. value_raw is not a code-unit-preserving transport. json_ascii returns explicit JSON text before transport/cleaning, preserving JSON string code units. Evaluation is never replayed after a failure.
Args:
expression: JavaScript expression. Must be a single expression, not
top-level var/let/const/function declarations (Playwright limitation).
Wrap in IIFE if needed: (() => { var x = 1; return x; })()
await_promise: If True, awaits Promise results (default True).
world: "isolated" preserves the existing Playwright execution context.
"main" prefers Camoufox's native mw: channel so page globals
created by site scripts are visible, with an explicit Firefox
window.wrappedJSObject.eval fallback for older/attached servers.
frame_url: Optional exact frame URL or shell-style wildcard.
frame_name: Optional exact frame name or shell-style wildcard.
frame_index: Optional zero-based index from get_page_info().frames.
output_file: Write the string result to this path instead of returning
it. Use it for page blobs (bytecode, device state, rendered
documents): multi-kilobyte values otherwise truncate or flood the
conversation. The response carries path/bytes/sha256 and a short
preview.
output_encoding: "utf8" writes the string as UTF-8; "base64" decodes
the string first, for binary payloads.
overwrite: Allow replacing an existing output_file.
result_format: "auto" (legacy cleanup) or "json_ascii" (ASCII JSON text
in value, not parsed/trimmed). json_ascii follows JSON.stringify:
tag non-finite numbers/-0/undefined explicitly if their distinction
matters; it is not a lossless arbitrary-object graph serializer.
Returns: dict with keys: value - cleaned value (parsed JSON if applicable; None when output_file is used) value_raw - raw string before cleaning (only when cleaning applied) type - "primitive" | "json" | "json_ascii" | "file" | "handle_fallback" | "error" output - (file only) {path, bytes, sha256, encoding} preview - (file only) bounded single-line preview of the string result world - selected execution world frame - selected frame's current snapshot metadata execution_backend - isolated, Camoufox native, or wrappedJSObject warnings - list of applied cleanups, if any hint - (error only) friendly fix suggestion or None
Inputs: expression (required), world, frame_url, overwrite, +6 more.
export_network_captureA
Export a versioned JSON snapshot of this manager's retained capture.
Args: save_path: New local JSON path; existing files are never overwritten. include_body: Include captured request/response bodies only together with include_sensitive=True. Does not fetch or replay requests. include_sensitive: Opt in to original headers, query values and bodies. Default masks all header/query values, removes URL credentials and fragments, and omits bodies. URL paths are retained: this is not full anonymization. Keep original captures out of public repositories. url_filter: Optional URL substring filter.
Returns: Path, count, redaction mode and capture status including pending/dropped work. For a settled snapshot call network_capture(stop, wait_timeout_ms).
Inputs: save_path (required), url_filter, include_body, include_sensitive.
export_stateA
Export the complete browser state (cookies + storage) to a JSON file.
Args: save_path: Local file path to save the state JSON.
Returns: dict with status and the save path.
Inputs: save_path (required).
extract_scriptA
Pull a script string out of a captured response and (optionally) save it.
Use this for SDK code that reaches the page through fetch + eval
instead of a <script src> tag: such code has no script resource, so
source search cannot see it and route rewriting cannot reach it. Extract it
here, patch it locally, then serve the patched file back with
intercept_request(action="mock", mock_response={"body_file": ...}).
Args:
request_id: Captured request to read response_body from. Requires the
body to have been captured (network_capture(capture_body=True)).
body: Raw response text to use instead of a captured request (mutually
exclusive with request_id).
json_path: Dotted/bracketed JSON path to the script string, e.g. data.data
or items[0].script. Pass an empty string when the body itself is
the script.
output_file: Write the extracted script here (UTF-8, regular file only).
overwrite: Allow replacing an existing output_file.
allow_partial: Allow extracting from a response body truncated by
network_capture(max_body_size=...) (default False).
preview_chars: Preview length in the response (never the whole script).
max_inline_chars: Refuse to inline a script larger than this; ask for
output_file instead.
Returns:
dict with chars, sha256, preview, partial, and, when written,
output = {path, bytes, sha256, encoding, chars}.
Inputs: body, json_path, overwrite, request_id, +4 more.
get_console_logsA
Get console output collected from the page.
Args: level: Filter by log level - "log", "warn", "error", or "info". keyword: Filter logs containing this keyword in the text. clear: If True, clear the log buffer after retrieval.
Returns: List of dicts with level, text, timestamp, and location.
Inputs: clear, level, keyword. Returns: result
get_network_requestA
Get full details of a specific captured network request.
Args: request_id: The ID of the request (from list_network_requests). include_body: Include response body (default False). include_headers: Include request/response headers (default True). max_body_size: Max chars of body when include_body=True. Pass -1 for unlimited.
Returns: dict with request and response details.
Inputs: request_id (required), include_body, max_body_size, include_headers.
get_page_infoB
Get page metadata plus a zero-based frame list for targeted tools.
Inputs: no named parameters.
get_request_initiatorA
Get the JS call stack that initiated a network request.
Returns a URL-matched hook stack as an investigation lead, not exact request attribution. Repeated/concurrent URLs can match a different invocation; corroborate with captured inputs. Requires inject_hook_preset("xhr"/"fetch") BEFORE navigating.
KNOWN LIMITATIONS (v0.8.1+):
For requests modified by an interceptor registered BEFORE MCP's hooks (e.g. SDKs loaded via sync ), the initiator will be the interceptor's call, not the original business code. Workaround: use instrumentation(action='reload').
For fetch on Firefox, Playwright-native initiator is often null. Requires inject_hook_preset('fetch', persistent=True).
Args: request_id: The ID of the request.
Returns: dict with url, initiator_stack, source, diagnostics and match_confidence. match_confidence is heuristic or unavailable; it never asserts exact identity.
Inputs: request_id (required).
get_storageA
Get the contents of localStorage or sessionStorage.
Args: storage_type: "local" for localStorage, "session" for sessionStorage.
Returns: dict with all key-value pairs in the storage.
Inputs: storage_type.
get_trace_dataC
Retrieve in-page traces and BrowserManager's cross-navigation cache.
The Python-side cache is the authoritative source after reload/navigation.
Every new trace entry includes frame metadata (URL, name, best-effort
index, and main-frame flag).
Trace IDs use installation/call counters, without page randomness. They are
local to a realm: frames/reloads may repeat IDs and even complete entries.
Merge the two sinks as multisets of full entries, removing only one cached
copy per matching live copy. Repetitions within either sink are preserved.
Inputs: clear, world, frame_url, frame_name, +3 more.
hook_functionA
Hook or trace a function (v0.9.0 unified).
Replaces hook_function + trace_function.
Args: function_path: Full path like "window.encrypt", "XMLHttpRequest.prototype.open", "JSON.stringify". mode: "intercept" — inject custom JS before/after/replace the function. Requires hook_code. (was: hook_function) "trace" — log synchronous returns/throws and optionally args and call stacks. (was: trace_function) hook_code: JS code for "intercept" mode. Context vars: - arguments: original args - __this: the 'this' context - __result: return value (only in position="after") position: For "intercept": "before", "after", or "replace". non_overridable: For "intercept": use Object.defineProperty to lock. persistent: If True, survives page navigation. log_args: For "trace": record arguments (default True). log_return: For "trace": record return values (default True). log_stack: For "trace": record call stacks (default False). max_captures: For "trace": max calls to record (default 50). world: "isolated" (compatible default) or Firefox page "main" world. wait_timeout_ms: How long to wait for a late-bound target. Defaults to 5000 for persistent hooks and 0 for non-persistent hooks. poll_interval_ms: Late-binding polling interval (10..1000ms). watch_assignments: Install a temporary setter on the first missing path segment so assignment-and-immediate-call in one JS task is captured. Defaults to True for persistent hooks and False otherwise. frame_url: Optional exact frame URL or shell-style wildcard. frame_name: Optional exact frame name or shell-style wildcard. frame_index: Optional zero-based index from get_page_info().frames. serialization: For "trace": "json" (default) retains JSON text fields, but executes getters/toJSON and may fall back to String conversion; this can have side effects. "preview" reads no properties of argument, return, or thrown objects and never coerces them: objects/functions are placeholders, symbols omit their description, and undefined, BigInt, NaN, infinities and -0 have string tags. Only the wrapper's own argument array is traversed. Text is truncated at 2000 characters in both modes and is not necessarily complete/parseable JSON.
Trace semantics: Ordinary synchronous calls keep the original receiver, argument values, return/throw identity and one original invocation. Entries retain traceId, callIndex, timestamp, world, frame, args/returnValue and optional stack; outcome is "return" or "throw", with thrownValue for synchronous throws. completion="sync" always: a returned Promise/thenable is only a synchronous return, never an observed settlement (no await or attached handlers). Logging failures do not replace the original result/exception. Calls made by logging/JSON serialization are not recursively traced; real nested calls are. Clearing logs does not reset max_captures or callIndex. Intrinsics are saved at the first trace installation in each realm, so later hooks cannot redirect the logger. Already modified third-party intrinsics cannot be recovered. Preview limits value inspection, not timing/stack/identity visibility of wrappers or page-controlled sinks; optional stack capture may run custom stack formatting. Constructor/new semantics are outside this ordinary-call trace contract.
Returns: dict with status, target, mode.
Inputs: function_path (required), mode, world, log_args, +14 more.
hook_jsvmp_interpreterA
Install a JSVMP runtime probe in the page main world.
The probe runs where page scripts run, so their property reads and calls
are recorded. Read the log with
evaluate_js("window.__mcp_jsvmp_log || []", world="main"); the default
isolated world cannot see it. remove_hooks() restores what the probe replaced.
Each event has a seq; window.__mcp_jsvmp_meta.dropped counts events lost to
max_entries. Same-origin frames (including about:blank iframes created and
removed by the page) log into the top frame's log with frame_url/frame_depth.
The result's coverage lists what this probe records and what it cannot
see: a missing entry means "not observed", not "not called".
mode="proxy" wraps Function.prototype.apply/call/bind, Reflect.*, Date.now, performance.now and Math.random, and puts Proxies on globals (navigator, screen, etc.). Page code can detect all of this, so RS/AK-style signature-based anti-bot will notice; use instrumentation(action='install') (source-level rewrite) for those. mode="transparent" only replaces getters on prototypes (Navigator, Screen, Document, ...). It changes less, but the getters are no longer the originals: Function.prototype.toString.call(getter) shows JS source.
IMPORTANT — timing for sync-loaded SDKs (e.g. webmssdk): JSVMP interpreters capture native references at startup via closures. If you install hooks AFTER the SDK has loaded, the SDK's closures already hold the original (un-hooked) references — your hooks will never fire. You MUST install hooks BEFORE navigate(): 1. launch_browser() 2. hook_jsvmp_interpreter(mode='transparent', persistent=True) 3. navigate("https://www.douyin.com/...") If already navigated, call instrumentation(action='reload') after installing hooks to force a page reload with hooks active.
Args: script_url: Target script URL substring for stack filtering. persistent: Survive navigation (default True). mode: "proxy" (full coverage, detectable) or "transparent" (replaces getters only). track_calls, track_props, track_reflect: Only for mode="proxy". proxy_objects: Objects to proxy (default: navigator, screen, etc.). max_entries: Log buffer cap (default 10000).
Returns: dict with status, mode, world, read_with and install details.
Inputs: mode, persistent, script_url, max_entries, +4 more.
import_stateA
Import browser state from a JSON file by creating a new context.
Args: state_path: Path to the state JSON file (exported by export_state).
Returns: dict with status and the new context name.
Inputs: state_path (required).
inject_hook_presetA
Inject a pre-built hook into the page main world.
Presets run where page scripts run (v1.10.0; before, they ran in the isolated world and recorded none of the page's own calls). Page code can detect the replaced functions; remove_hooks() restores them in the current document.
Available presets (log location in brackets, read it with
evaluate_js("window. || []", world="main")):
- "xhr": XMLHttpRequest requests [__mcp_xhr_log].
- "fetch": fetch requests [__mcp_fetch_log]; get_request_initiator
also reads its stacks.
- "crypto": btoa/atob/JSON.stringify inputs and outputs [__mcp_crypto_log].
- "websocket": WebSocket connections and messages [__mcp_ws_log].
- "debugger_bypass": strip debugger from Function(...) and timers.
- "cookie" (alias "cookie_hook"): document.cookie reads/writes [__mcp_cookie_log].
- "runtime_probe": XHR/fetch/canvas/WebGL/navigator/listener calls [__mcp_runtime_log].
Args: preset: One of the above preset names. persistent: True (default) also installs it in every new document, including same-origin iframes; False installs it in the current document only.
Returns: dict with status, preset, world, execution_backend and read_with.
Inputs: preset (required), persistent.
instrumentationA
JSVMP source-level instrumentation (v0.9.0 unified).
Replaces instrument_jsvmp_source / get_instrumentation_log /
stop_instrumentation / reload_with_hooks.
Args:
action:
"install" — register route + AST/regex rewrite on matched scripts.
Requires url_pattern. (was: instrument_jsvmp_source)
"log" — fetch accumulated tap events from instrumented code.
(was: get_instrumentation_log)
"stop" — unregister instrumentation route.
(was: stop_instrumentation)
"reload" — reload page so persistent hooks fire before page JS.
(was: reload_with_hooks)
"status" — show active instrumentations, their options and the
files passed through unchanged, with reasons.
(was: get_instrumentation_status)
"rewrite_source" — apply the same rewrite to local JS without a
browser: give `source` (text) or `source_path`, and
`output_path` for anything larger than ~100KB. The
output runs in Node/vm/jsdom too; events collect in
globalThis.__mcp_vmp_log. No size limit applies.
url_pattern: For "install"/"stop" — glob pattern matching VMP script URLs.
mode: For "install"/"rewrite_source" — "ast" (esprima then local
bundled Acorn) or "regex" (conservative whole-program subset;
unsupported input skipped).
tag: For "install"/"rewrite_source"/"log" — group identifier.
rewrite_member_access: tap obj[key] reads (default True). Start here.
rewrite_calls: tap fn(args) and obj.m(args) calls (default False since
v1.10.0). Turn it on only when call events are needed: call taps
add helper frames, so callee.caller reads null and the maximum
recursion depth drops, which fingerprinting code can notice.
tap_stage_calls: rewrite the flattened-VMP dispatcher shape
`return fn.apply(this, [<int>].concat(Array.prototype.slice
.call(arguments)))` into per-state `tap_stage` events (state id `p`,
argc, first args previews, return preview), pushed when the state
returns. Events recorded while a state runs carry it as `stage`.
This is a literal match, so it also works when the rest of the
file is not parseable (status then shows "(stage taps only)"), and
it is independent of `mode`/`filter_*`.
inject: source-level regex insertion, independent of `mode` and usable
together with `tap_stage_calls`/`filter_*`. A list of
`{"find": <regex>, "before": <js>, "after": <js>, "group": <name>}`:
every match of `find` (re.MULTILINE) gets `before` inserted at the
match start and/or `after` at the match end. `$1..$99`/`$0` in the
snippets expand to capture groups, `$$` is a literal `$`.
Four safety layers keep injected code from breaking syntax:
(1) each snippet is wrapped into a complete statement (`;` guard on
both ends, or `;
...
;when it contains newlines or//); (2) insertions landing inside string, template, comment or regex literals are skipped individually (skipped_insertions/ literal_skips); (3) a beforeinsert on aswitch case :/default: label is automatically shifted past that label's colon (label_shift), so it executes when jumping to that state and never lands before the first case; (4) when the original source parses (esprima or local bundled Acorn for modern ES2025/module syntax), the injected output is re-parsed and any group that would break syntax is rolled back individually (inject.skipped_groups, reason "would break syntax"). Note: single-line inserts add zero newlines (lines_added == 0), though mode="ast"prepends the instrumentation runtime header at the top of the file (onlymode="regex"with zero member rewrites keeps exact 1-based line numbers). Per-group inserted counts come back ininject.groups[].insertions (raw regex matches in.matches) and accumulate across newly rewritten scripts in status/logasinject_hits. The injected code runs in the page main world; read the globals it fills with evaluate_js(expression, world="main"). inject_validate: default True — run the parse validation and per-group fallback described above. False skips the AST re-parse check while keeping the ;statement wrapper, literal-region skip guard, and case/defaultlabel shift active. include_source_site: attach a stable site_id to tap events, plus an original-source range map in the log response. Default False. max_rewrites: hard cap on rewrites per file; status lists capped files. fallback_on_error: try conservative regex on AST failure only without property/object filters; otherwise pass through unchanged. ignore_csp: For "install" — skip CSP pre-flight check. clear_log: For "reload" — clear JSVMP logs before reload. wait_until: For "reload" — "load" / "domcontentloaded" / "networkidle". tag_filter: For "log" — filter by tag. type_filter: For "log" — "tap_get", "tap_call", "tap_method", "tap_call_err", "tap_stage", "tap_stage_break". key_filter: For "log" — substring match on property/method name. after_seq: For "log" — only events with seq > after_seq, oldest first; page with the returned next_after_seq. seq_window: For "log" — [start, end], events with start <= seq <= end. stage: For "log" — events recorded while dispatcher statestageran, plus that state's own tap_stage events. limit: For "log" — max entries: the most recent ones, or the first ones when after_seq/seq_window is set. clear: For "log" — clear log after retrieval in the selected main world. frame_url: For log; select a target frame by URL pattern. frame_name: For log; select a target frame by name. frame_index: For log; current frame snapshot index, not a persistent identity. Source scripts run in the main world; logs are always read there. Same-origin child frames log into the top frame's log with frame_url/frame_depth, so a removed iframe keeps its events. filter_property_names: For AST — only rewrite reads/methods of these property names (e.g. ['userAgent', 'platform', 'webdriver']). filter_object_names: For AST — only rewrite when the static base object path matches (e.g. ['navigator', 'this.bytecode']). Dynamic object identity is not inferred. Regex mode rejects nonempty filters. max_file_size: For "install" — files larger than this (bytes) trigger on_oversized behavior. Default 2,000,000. on_oversized: For "install" — "selective" (require filters), "skip", or "force" (full rewrite anyway). Default "selective". source: For "rewrite_source" — JS text to rewrite. source_path: For "rewrite_source" — local JS file to rewrite. output_path: For "rewrite_source" — where to write the rewritten JS (must differ from source_path); with include_source_site the site map goes to<output_path>.sites.json`.
Returns:
dict with action-specific results. "log" also returns seq, dropped
(events lost to the 20000-entry cap) and the options each install used.
IMPORTANT — timing for sync-loaded scripts (e.g. webmssdk):
Route interception only catches requests made AFTER the route is
registered. For scripts loaded via <script src> during page load,
you MUST call instrumentation(action='install') BEFORE navigate().
Pattern:
1. launch_browser()
2. instrumentation(action='install', url_pattern='**/webmssdk*')
3. navigate("https://www.douyin.com/...")
If called after navigate, use instrumentation(action='reload') to
re-trigger page load with routes active.
Inputs: action (required), tag, mode, clear, +29 more.
intercept_requestA
Intercept network requests matching a pattern.
Args:
url_pattern: URL glob pattern (e.g. "**/api/login*").
action: "log", "block", "modify", "mock", or "stop" (unroute).
modify_headers: Headers to add/override (action="modify").
modify_body: Request body replacement (action="modify").
mock_response: Dict for action="mock": "status", "headers", and at most
one body source —
"body" (inline text) or "body_file" (regular UTF-8 file up to 10 MiB;
relative paths resolve against the server working directory). Passing
both is an error. The file is re-read on every request in a worker
thread, so editing a patched script and reloading the page picks up
changes immediately; a missing or unreadable file returns a readable
error from the tool call (and aborts that request during serving).
When "headers" is omitted, body_file infers the content type from its
suffix (.js/.json/.html/.css/...).
Security note: fulfilled responses are readable by scripts in the
matching page/origin — only point body_file at intended mock or
instrumented assets, never at credentials or private local files.
Returns: dict with the interception status; for action="mock" with body_file it also reports the resolved absolute path and its current byte size.
Inputs: url_pattern (required), action, modify_body, mock_response, +1 more.
launch_browserA
Launch the Camoufox anti-detection browser, or attach to a running one.
Leave out any option you do not need to change. It then keeps the value the server was started with (for example --headless), or the default below if the server did not set one. An option passed here wins for this launch.
Args:
headless: Run in headless mode (default False).
os_type: OS fingerprint - "auto", "windows", "macos", or "linux"
(default "auto").
locale: Browser locale (e.g. "zh-CN"). "auto" detects system locale
(default "auto").
proxy: Proxy server URL (e.g. "http://127.0.0.1:7890").
humanize: Enable humanized mouse movement.
geoip: Auto-infer geolocation from proxy IP.
block_images: Block image loading.
block_webrtc: Block WebRTC to prevent IP leaks.
enable_trace: Enable engine-level property access tracing.
Requires camoufox-reverse custom browser build.
When enabled, use trace_property_access() to capture DOM access.
trace_objects: Optional exact native object-name allowlist (for example
["navigator", "screen", "webgl"]). Empty traces all native sites
declared by the selected reverse build.
trace_max_events: Per Firefox process/session event cap (1..200000).
browser_version: Select one already-installed Camoufox 0.5+ browser
without changing its persistent active version. Use a repo-qualified
selector such as "official/beta.30" or
"whitenightshadow/152.0.4-beta.30-reverse.5". Omit it to preserve the
active/default behavior, including Camoufox 0.4.x installations.
The selected browser must match the active browser's exact
version/build because Camoufox reads shared resources from active.
ws_endpoint: Attach to an already-running Camoufox server instead of
launching a new browser. Start the server with
python -m camoufox server, copy its "Websocket endpoint:
ws://127.0.0.1:/" line, and pass that full URL here.
When set, all other launch args (os_type/locale/proxy/...) are
ignored — fingerprint config is owned by the running server. Start the
server with an os fingerprint matching the host for font-metric parity
(attach mode cannot inject the host/os font-fallback shim that launch
mode does). close_browser() will only disconnect; the server keeps running.
Returns: dict with status, config, and page list.
Inputs: geoip, proxy, locale, os_type, +9 more.
list_network_requestsA
List captured network requests with optional filters.
Args: url_filter: Substring filter for request URLs. url_contains_domain: Host/subdomain boundary filter (e.g. "example.com"). method: HTTP method filter (e.g. "GET", "POST"). resource_type: Resource type filter (e.g. "xhr", "fetch", "script", "document"). status_code: HTTP status code filter. limit: Optional page size (1..2000); omitted preserves the full list. after_id: Return IDs greater than this cursor, in capture order. Check network_capture(status).dropped_requests for lost history.
Returns: List of request summaries. Legacy size is retained body characters; size_unit is characters and body_bytes is the retained decoded entity byte count when encoding is known. Not compressed wire bytes.
``url`` is a preview capped at URL_PREVIEW_CHARS (200). When it is cut,
the value ends with "…" and ``url_truncated`` is True while
``url_length`` reports the real length. Never read a query parameter,
signature or token out of a truncated preview: call
get_network_request(request_id=...) for the complete URL first.
Inputs: limit, method, after_id, url_filter, +3 more. Returns: result
list_trace_filesC
List all trace files on disk (for post-hoc analysis).
Returns: dict with traces_dir, total file count, and file details.
Inputs: limit.
network_captureA
Unified network capture control (v0.9.0).
Replaces start_network_capture / stop_network_capture.
Args: action: "start" — begin capturing network events "stop" — stop capturing (buffer retained) "clear" — clear the capture buffer "status" — return current capture state url_pattern: Glob pattern for "start" (default "**/*" captures all). capture_body: For "start" only; capture response bodies (more memory). max_body_size: For start; retained characters per response, 0..2000000. Playwright still reads the complete response before truncation. wait_timeout_ms: For stop; wait up to 30000ms for captured responses. New requests stop immediately; unfinished work is reported, not replayed. Clear cancels pending work; IDs remain monotonic until browser close.
Returns: dict with action result + current status snapshot.
Inputs: action (required), url_pattern, capture_body, max_body_size, +1 more.
query_trace_fileC
Query a specific historical trace file (post-hoc analysis).
Args: file_path: Path to the .jsonl trace file. mode: Same as trace_property_access (summary/timeline/sequence/search). filter_object: Filter by object name. search_query: Filter by search string. limit: Max events for sequence mode. bucket_ms: Bucket size for timeline mode.
Inputs: file_path (required), mode, limit, bucket_ms, +4 more.
rdp_debuggerA
Firefox 原生 RDP 调试器:断点、单步、调用栈、作用域、暂停中求值。
camoufox 是 Firefox,Playwright 走 Juggler 没有 CDP;这个工具直接开 RDP
(-start-debugger-server)把调试能力补齐。启动的浏览器继承服务端配置
(指纹 / 代理 / headless / os / locale / browser_version),只额外加调试端口与 RDP pref。
安全:端口没有认证,开端口必须先打开 devtools.chrome.enabled,也就是连上端口
就能用当前系统用户身份在浏览器主进程执行任意代码;同机其他用户也能连
127.0.0.1。默认端口是随机的空闲端口,只监听 loopback。
action: launch 启动带调试端口的浏览器(随机端口;已有会话会先关掉;继承服务端配置) attach 连到已在运行的调试端口(需要 port 或 unix_socket) enable listTabs → getTarget → threadActor,attach 线程并 detach 旧 target sources 列出脚本(url_substr 过滤;含 sourceStartLine/sourceLength) source 取脚本全文(longString 分片按 UTF-16 码元推进;超长显式截断) breakable_lines 某个脚本的可断行号 breakable_positions 某脚本/某一行的可停位置(columns_0based / columns_1based) set_breakpoint 下断点(url_pattern + find 正则定位,或 source_url 走 sourceUrl、 source 走 sourceId;列号 1-based 自动吸附) remove_breakpoint 删行断点(按当初下发的 location 精确删除;remove_all 清空) wait_paused 等下一次命中(只接受 resume/step/interrupt 之后新到的 paused) frames 当前暂停的完整调用栈(出错时返回 {"error": ...}) scopes 某帧的递归作用域链与 bindings(需要 frame_actor) evaluate 求值:给了 frame_actor 就在该暂停帧内求值(能读局部变量) step 单步 over / into / out resume 继续运行 interrupt 不等断点直接暂停(on_next=true 暂停在下一个语句) reload 刷新并重建会话 + 重下此前全部断点(先 detach 旧 target; url_pattern+find 的断点会重新 sources() → 重算偏移 → 重下) xhr_breakpoint 在请求发出前暂停(path / method;remove=true 移除) status 会话状态 close 结束会话并关闭本次启动的浏览器
Args:
action: 见上。
port: RDP 端口。0(默认)= launch 时随机选空闲端口;attach 必须给具体端口。
url: launch 时打开的页面。
executable: 自定义 Firefox/camoufox 路径;默认用 camoufox 激活版本(与 launch_browser 一致)。
wait_page: launch 后等页面开始加载的秒数上限;reload 时是新会话的最长等待。
url_substr: 选标签页 / 过滤脚本的 URL 子串。enable 时匹配不到会报错并列出可用标签页。
target_type: enable 的 watcher 兜底目标类型(frame/process/worker)。
line: 断点行号,1-based;坐标就是 breakable_lines/breakable_positions 报出来的那套。
column: 断点列号,1-based(Error.stack / DevTools 界面习惯),会吸附到最近可停列。
condition: 断点条件表达式,如 i === 3。
frame_actor: 栈帧 actor(scopes/evaluate/step/resume 用)。
expression: evaluate 的 JS 表达式。
direction: step 方向 over / into / out(写错会报错,不会 KeyError)。
timeout_ms: wait_paused / interrupt / evaluate 的超时毫秒。
path: xhr_breakpoint 的 URL 子串,空表示任意请求。
method: xhr_breakpoint 的 HTTP 方法,"ANY" 表示全部;"remove" 视为移除。
on_next: interrupt 是否暂停在下一个语句(发送字符串 "onNext")。
require_frame: wait_paused 是否要求带 frame(interrupt 空闲暂停时 frame 可能为 null)。
save_path: source 落盘路径。
max_chars: source/evaluate 最多取多少字符(UTF-16 码元计,超过会显式提示)。
max_items: sources / breakable_lines 返回条数上限。
source: source actor(set_breakpoint 用它走 sourceId,可断 eval / new Function)。
source_url: 精确 URL(set_breakpoint 用它走 sourceUrl,内联脚本/导航后都能挂上)。
url_pattern: URL glob(如 **/vm-bundle*.js*),替代 source / source_url。
适合 URL 带随机查询参数(每次请求都变)的目标;sources / source /
breakable_* / set_breakpoint / remove_breakpoint 都接受它。
find: 正则,配合 url_pattern:在脚本里定位第 occurrence 个匹配,内部把字符偏移
换算成 line/column(单行 270KB 压缩脚本 = 1 行 + 一个大列号)。断点记录里
同时保存 url_pattern/find/occurrence,reload / 导航重建 thread 后自动
重新 sources() → 重算 → 重下;新脚本里正则不再命中时进
reapply_failed({"pattern":..., "reason": "regex not found"})。
occurrence: find 的第几个匹配,默认 1。
remove_all: remove_breakpoint / xhr_breakpoint 里清空所有已记录断点。
remove: xhr_breakpoint 用它移除(比 method="remove" 更明确)。
unix_socket: macOS/Linux 用 0700 临时目录里的 Unix socket 代替 TCP 端口。
socket_path: attach 时连已有的 Unix socket 路径(取自 launch 返回的 unix_socket)。
Inputs: action (required), url, find, line, +26 more.
reloadA
Reload the current page, preserving any init scripts.
Inputs: wait_until.
remove_hooksA
Remove installed hooks and restore original objects in-place.
Args: keep_persistent: If True, keep persistent init_scripts registered.
Returns: dict with status, restored_objects, cleared counts.
Inputs: keep_persistent.
reset_browser_stateC
Reset browser residual state after serializing trace transitions.
Inputs: clear_cookies, clear_storage, stop_engine_trace, clear_active_routes, +2 more.
save_response_bodyA
Save captured response bytes (JS/WASM/JSON/binary) without refetch/replay.
Args: request_id: A captured ID with a completed body (capture_body=True). save_path: New file path. Never overwrites existing files. allow_partial: Explicitly permit a truncated body; default rejects it.
Returns: Path, saved byte length, SHA-256 and partial flag. Bytes are Playwright's decoded HTTP response body (not original compression/wire bytes). If the body was missing or truncated, increase the capture limit and collect a new sample intentionally; this tool never triggers a new request.
Inputs: save_path (required), request_id (required), allow_partial.
scriptsA
Script inspection (v0.9.0 unified).
Replaces list_scripts / get_script_source / save_script.
Args: action: "list" — list all loaded scripts (src, type, inline preview) "get" — get full source of one script (requires url; use "inline:" for inline scripts) "save" — save script source to local file (requires url + save_path) url: Script URL or "inline:" (required for "get" and "save"). save_path: Local file path (required for "save").
Returns: For "list": list of script info dicts. For "get": dict with source string. For "save": dict with status, path, size.
Inputs: action (required), url, save_path. Returns: result
search_codeA
Search keyword in loaded scripts (v0.9.0 unified).
Replaces search_code (all scripts) + search_code_in_script (single script).
Args: keyword: The keyword to search for (case-sensitive substring match). script_url: If None, search across ALL loaded scripts. If given, search within that one script only (supports "inline:" for inline scripts). Single-script mode auto-detects minified files and uses character-based context. context_chars: Context window in char mode (default 200 = +/-200 chars). Used when searching single minified scripts. context_lines: Context window in line mode (default 3). max_results: Maximum matches to return (default 200).
Returns: dict with matches, total_matches, mode ("line" | "char"), etc.
Inputs: keyword (required), script_url, max_results, context_chars, +1 more.
stage_breakA
Per-state deep capture for instrumentation(tap_stage_calls=True).
A stage tap only previews the first arguments. When one state has to be
inspected properly, arm a break for that state id: every hit then records a
bounded deep snapshot of the arguments (and optionally the return value and
a filtered call stack) as a tap_stage_break event.
Armed states stay armed for this MCP session until "clear": the live page is
updated at once, and every instrumented script served afterwards carries the
armed set, so states that run while a page loads are captured after a reload.
The limit counts hits per page load. Snapshots read own data properties
only and report getters as {"__t": "accessor"} without calling them; a Proxy
argument still sees its ownKeys/getOwnPropertyDescriptor traps.
Args:
action: "set" arm one state, "clear" disarm (all when p is omitted),
"list" show armed states and their hit counters.
p: Dispatcher state id (the integer from tap_stage events).
capture: "args_only" | "args_ret" (default) | "args_ret_stack".
limit: Maximum recorded hits, 0 means unlimited (default 0).
depth: Snapshot depth for nested objects/arrays (1-5, default 2).
max_items: Maximum keys/elements kept per object/array (1-500, default 50).
Returns:
dict with the states armed for later loads (session_armed), the live
page's armed set and hit counters, and whether the instrumentation
runtime is present on the page.
Inputs: p, depth, limit, action, +5 more.
take_screenshotC
Take a screenshot of the current page or a specific element.
Args: full_page: Capture the entire scrollable page. selector: CSS selector of a specific element to capture.
Inputs: selector, full_page.
take_snapshotA
Get a bounded accessibility tree, or a labelled DOM fallback.
Args: timeout_ms: Maximum wait for snapshot collection (1..30000). A hung error-page accessibility query returns an error without restarting the browser or replaying navigation. max_nodes: Maximum retained tree containers (1..5000). Depth is capped at 16 and individual strings at 2000 characters; truncation is explicit.
Inputs: max_nodes, timeout_ms.
trace_property_accessB
Control/query the current Gecko native PropertyTracer run.
action supports capture, start, stop, query, clear, and status. Results can use summary, timeline, sequence, or search views and optional object, kind, site, and keyword filters. collect_values is a safe post-trace snapshot, not an event-time value capture.
Inputs: mode, limit, action, duration, +6 more.
trace_sessionA
Record a Playwright trace of the current browser context.
Firefox has no CDP, so there is no pause/step debugger here. A trace is the
supported way to get a replayable record: DOM snapshots, network activity,
console output and source locations, packaged as a .zip for
trace.playwright.dev or playwright show-trace.
Args:
action: "start" begin recording, "stop" write the archive, "status"
report whether a recording is active.
screenshots: Include screenshots in the trace (default True).
snapshots: Include DOM snapshots (default True).
sources: Include source files (default True).
path: Destination .zip for action="stop"; defaults to a temp file.
Returns: dict with the recording state, and on stop the archive path and size.
Inputs: path, action, sources, snapshots, +1 more.
type_textC
Type text into an input field with realistic keystroke delays.
Inputs: text (required), selector (required), delay.
verify_signer_offlineA
Verify a signer against explicit expected values without sending requests.
Args: signer_code: JS expression evaluating to a function receiving sample.input and returning an object. Async functions are supported. Only run code you intend to execute locally; Node vm is not a security boundary. samples: Non-empty list (up to 1000) of {id?, input: object, expected: object}. Each expected object must contain at least one comparison key. compare_params: Optional non-empty list of expected keys. Missing keys are invalid input; missing computed keys fail even if expected is null. runtime: "browser" preserves the current-page default. "node" runs an independent process without launching a browser, supports require of crypto/node:crypto, and needs Node.js on PATH. No runtime fallback. timeout_ms: Node process deadline (1..120000); also the maximum wait for the browser evaluation. A browser timeout does not undo/stop effects.
Returns: total_samples, passed, failed, pass_rate, first_divergence and details. Invalid input returns error before any signer code is executed.
Inputs: samples (required), signer_code (required), runtime, timeout_ms, +1 more.
wait_forA
Wait for an element, a captured network request, or a navigation.
Args:
selector: CSS selector to wait for.
url_pattern: URL substring (or shell-style glob when it contains
*) used by request/navigation modes.
timeout: Max wait in milliseconds.
mode: Which condition url_pattern means.
"auto" (default) matches a captured request when network capture is
already running, otherwise falls back to navigation.
"request" only matches captured requests and reports a clear hint
when nothing arrives, so "the request never fired" is not confused
with "the page did not navigate".
"navigation" keeps the previous behaviour (page.wait_for_url).
after_id: Optional request id; only requests with a larger id match, so
an already-captured request cannot satisfy a later wait.
poll_interval_ms: Polling interval for request mode.
Returns:
dict with status plus mode; request mode also returns the
matched request summary (id/url/method/status/ms).
Inputs: mode, timeout, after_id, selector, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 43 tools
Most tools have clearly distinct roles, but the set contains several overlapping hooking/instrumentation tools: hook_function, inject_hook_preset, hook_jsvmp_interpreter, and instrumentation all manipulate page code in different ways, and an agent must read carefully to pick the right one. Trace-related tools (trace_property_access, trace_session, get_trace_data, query_trace_file) also share a name space but are differentiated by their descriptions. Overall mostly distinct with a few confusable clusters.
All names are snake_case, but the convention mixes verb_noun names (get_network_request, search_code, take_screenshot) with bare noun or action-unified names (cookies, scripts, instrumentation, network_capture, trace_session). This is readable and intentional, but not a single predictable verb_noun pattern throughout.
43 tools is heavy for a single MCP server, well above the 16–25 borderline range and into the 'too many' category. The domain is complex and each tool is specialized, but the surface is large enough to burden selection and discovery.
The server covers browser lifecycle, navigation, network capture/interception, script analysis, hooking, storage, state export/import, screenshots, tracing, and an RDP debugger, which is a deep lifecycle surface for reverse-engineering work. Minor UI interaction gaps (e.g. explicit key press, hover, select option) exist but do not block the core workflows.
Maintenance
Related MCP Connectors
Live browser debugging for AI assistants — DOM, console, network via MCP.
Official Browserless MCP server: browser automation, scraping, screenshots and PDFs for AI agents.
Web scraping MCP server — scrape, extract structured data, screenshot any site with anti-bot bypass.
Browser automation MCP for whole web tasks in a cloud browser: saved logins, bot checks, replays.
Related MCP Servers
- AlicenseBqualityDmaintenanceAn MCP server for anti-detection browser automation that uses Camoufox to bypass bot detection and spoof digital fingerprints. It enables AI agents to perform human-like web interactions, including realistic cursor movements, humanized click delays, and automatic cookie popup dismissal.3684 npm7MIT
- AlicenseCqualityDmaintenanceAn MCP server for JavaScript reverse engineering that enables AI to perform browser debugging, script analysis, and automated hook injection. It streamlines complex workflows like deobfuscation, network tracing, and risk assessment through direct browser integration.3527 npm1,060Apache 2.0
- AlicenseNot gradedqualityDmaintenanceA Chrome DevTools Protocol-based MCP server that enables AI coding assistants to control browsers for JavaScript debugging, reverse engineering, web scraping, and API debugging.1Apache 2.0
- AlicenseNot gradedqualityDmaintenanceA powerful MCP server for browser debugging and reverse engineering, providing AI coding assistants with comprehensive browser automation, JavaScript debugging, and network analysis capabilities.48 npm13Apache 2.0