Skip to main content
Glama
camoufox-reverse-mcp

camoufox-reverse-mcp

rdp_debugger

Firefox 原生 RDP 调试器:断点、单步、调用栈、作用域、暂停中求值。

Instructions

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 下断点(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) 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,内联脚本/导航后都能挂上)。 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)。

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "action": "<action>"
    },
    "name": "rdp_debugger"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoabout:blank
lineNo
pathNo
portNo
actionYes
columnNo
methodNoANY
removeNo
sourceNo
on_nextNo
conditionNo
directionNoover
max_charsNo
max_itemsNo
save_pathNo
wait_pageNo
executableNo
expressionNo
remove_allNo
source_urlNo
timeout_msNo
url_substrNo
frame_actorNo
socket_pathNo
target_typeNoframe
unix_socketNo
require_frameNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.11.1

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does well: it discloses that the port is unauthenticated, that connecting means arbitrary code execution in the browser main process as the current OS user, that other local users can reach 127.0.0.1, and that launch is destructive to existing sessions. Reload re-applies prior breakpoints and enable detaches the old target. Return formats are only partially described (frames mentions {"error": ...}) which keeps it from a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose then the security warning, followed by a scannable action list and an args list in the same order an agent would consult them. It is long, but for a 27-parameter stateful debugger nearly every line carries a constraint. Minor redundancy appears where remove is explained both as a flag and as method='remove'.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a highly stateful tool with no annotations and no output schema, the definition covers lifecycle (launch/attach/enable/close), session-rebuilding behavior, error behavior (url_substr mismatch lists available tabs), and timeouts. The main gap is that most action return payloads are not sketched, so an agent must discover result shapes by calling.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and all 27 parameters are documented with operational meaning, not just repetition: column is explicitly 1-based and snaps to the nearest breakable position, line uses the coordinate system reported by breakable_lines, max_chars counts UTF-16 code units, method='remove' is treated as removal, on_next sends the string 'onNext'. This is exactly the compensation a 0%-coverage schema needs.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening line names the specific resource and capability set ('Firefox 原生 RDP 调试器:断点、单步、调用栈、作用域、暂停中求值') and follows with the reason it exists (Playwright goes through Juggler, which has no CDP). The 19-action enumeration makes the tool's scope unambiguous and separates it from generic JS-evaluation siblings like evaluate_js.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Per-action guidance is explicit: attach requires port or unix_socket, set_breakpoint chooses sourceUrl vs sourceId based on whether inline/eval scripts must be hooked, wait_paused only accepts paused events arriving after resume/step/interrupt. What is missing is routing guidance to sibling tools (e.g. when to prefer evaluate_js over this tool's evaluate), so it stays below a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.