browser-use
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseBrowser Use
浏览器使用
Control the user's existing real Chrome profile, especially for login-dependent work and live UI verification.
控制用户已有的真实Chrome配置文件,尤其适用于依赖登录的工作和实时UI验证场景。
Route
路由优先级
- Use the Codex or
Chromeplugin when it is callable in the active session. Installed on disk is not enough.Chrome [Internal] - Otherwise prefer the OpenClaw extension-backed mcporter route.
- Use legacy direct DevTools attachment only as the explicit last fallback.
For mcporter, the MCP call remains the agent-facing control interface. The
OpenClaw extension is the transport underneath it, not a separate tool. Set
on the canonical global Chrome server definition
to enforce relay-only routing. Keep the caller policy explicit as well:
chromeDevtoolsRelay: "require"bash
MCPORTER_CHROME_DEVTOOLS_RELAY_POLICY=require mcporter call chrome-devtools.<tool>Seeing an agent request the MCP tool is therefore expected.
A Chrome Allow remote debugging? prompt or a relay-policy error indicates
that the extension transport was not used. The shared daemon retains canonical
policy; a shell environment prefix alone cannot change that policy.
chrome-devtoolsNever use isolated Chrome, the Codex in-app browser, Playwright, Puppeteer,
AppleScript, , generic GUI scripting, or macOS as a browser-control
substitute unless the user explicitly asks for an isolated or new browser.
Peekaboo is allowed only for Chrome or extension setup and visible prompts.
Login-heavy sites often depend on the real profile's cookies, SSO, device trust,
and extensions.
osascriptopenFor a rendered-browser bug, prove behavior through this real profile. Treat
, source inspection, API checks, and isolated test browsers as supporting
evidence, not substitutes for live UI proof.
curl- 当活动会话中可调用Codex的或
Chrome插件时,优先使用该方式。仅在磁盘上安装是不够的。Chrome [Internal] - 否则优先使用基于OpenClaw扩展的mcporter路由。
- 仅在明确需要时,才将传统的直接DevTools连接作为最终后备方案。
对于mcporter而言,MCP调用仍是面向Agent的控制接口。OpenClaw扩展是其底层传输层,而非独立工具。在规范的全局Chrome服务器定义中设置,以强制仅使用中继路由。调用方策略也需明确设置:
chromeDevtoolsRelay: "require"bash
MCPORTER_CHROME_DEVTOOLS_RELAY_POLICY=require mcporter call chrome-devtools.<tool>因此,Agent请求 MCP工具是预期行为。如果出现Chrome的**是否允许远程调试?**提示或中继策略错误,则说明未使用扩展传输层。共享守护进程会保留规范策略;仅靠shell环境前缀无法更改该策略。
chrome-devtools严禁使用隔离Chrome、Codex内置浏览器、Playwright、Puppeteer、AppleScript、、通用GUI脚本或macOS的命令作为浏览器控制的替代方案,除非用户明确要求使用隔离或全新的浏览器。Peekaboo仅允许用于Chrome或扩展的设置以及可见提示的场景。重度依赖登录的网站通常依赖真实配置文件的Cookie、SSO、设备信任和扩展。
osascriptopen对于渲染层面的浏览器Bug,需通过该真实配置文件验证行为表现。将、源码检查、API校验和隔离测试浏览器视为辅助证据,而非实时UI验证的替代方案。
curlExtension Relay Model
扩展中继模型
OpenClaw creates a random per-host relay key in its mode- credentials
directory. The extension and same-host clients use nonce-bound mutual HMAC
proofs. The reusable key is never sent to an unverified loopback listener,
placed in a URL, or passed to the child MCP process. Keep credentials out of
configuration, command output, chat, logs, and screenshots.
0600On a same-host relay, mcporter authenticates and upgrades the
same retained socket to , then gives a protected
one-use local handoff. Agents still call the standard MCP tools; successful
relay routing is what removes direct DevTools attachment and Chrome's approval
prompt.
/json/version/cdpchrome-devtools-mcpNew pairings default to All tabs: every ordinary eligible tab is exposed
except tabs explicitly paused in the popup. Existing pairings keep their stored
mode. In Selected tabs mode, membership in the Chrome tab group titled
OpenClaw is the sharing boundary. Restricted/internal pages, incognito,
other profiles, and tabs without an eligible URL remain excluded in both modes.
OpenClaw会在其权限为的凭证目录中生成随机的按主机分配的中继密钥。扩展与同主机客户端使用绑定随机数的双向HMAC验证。可复用密钥绝不会发送给未经验证的回环监听器、放入URL中,或传递给MCP子进程。请勿将凭证暴露在配置、命令输出、聊天记录、日志和截图中。
0600在同主机中继场景下,mcporter会对进行身份验证,将同一个保持的套接字升级到,然后向提供受保护的一次性本地交接。Agent仍调用标准MCP工具;中继路由成功后,就无需直接DevTools连接,也不会弹出Chrome的授权提示。
/json/version/cdpchrome-devtools-mcp新配对默认采用全部标签页模式:除了在弹窗中明确暂停的标签页外,所有普通符合条件的标签页都会被暴露。现有配对会保留其存储的模式。在选定标签页模式下,名为OpenClaw的Chrome标签页组中的成员是共享边界。受限/内部页面、无痕模式、其他配置文件以及不符合URL要求的标签页在两种模式下都会被排除。
Topology Boundary
拓扑边界
Direct remote Gateway pairing over lets OpenClaw's Gateway-side
browser tool control local Chrome. It does not create a local relay for a local
mcporter process. Do not routinely copy remote secrets or build ad-hoc SSH
tunnels around this boundary.
wss://If local mcporter cannot authenticate to a local relay, the extension-backed
mcporter route is unavailable. Report that clearly or use the labeled legacy
fallback; never represent remote Gateway control or direct attachment as local
relay success.
通过进行的直接远程网关配对,允许OpenClaw的网关端浏览器工具控制本地Chrome。它不会为本地mcporter进程创建本地中继。请勿常规性地复制远程密钥或围绕该边界搭建临时SSH隧道。
wss://如果本地mcporter无法向本地中继验证身份,则基于扩展的mcporter路由不可用。需明确报告该情况,或使用标注明确的传统后备方案;绝不能将远程网关控制或直接连接冒充为本地中继成功。
Setup and Repair
设置与故障修复
- Run before Load unpacked. It copies the extension to the stable OpenClaw-owned path, pre-registers that path's deterministic Chrome ID, and prints the path to load. The first native call then pairs automatically for local or browser-node topology.
openclaw browser extension install - Use to verify the installed copy, exact origins, and native-host registrations. Status must report no issues and
openclaw browser extension status --json.manualSetupRequired: false - Confirm Settings reports automatic setup ready and the popup reports Connected. New installs should show All tabs unless the user changes the access mode; no copied pairing string or popup setup is part of the normal local flow.
- A previous native-host miss is cached for the Chrome process. If the extension attempted native messaging before installation, restart Chrome once after installing; repeated retries in the same process cannot repair that cache.
- After pairing or changing the relay route, stop the mcporter daemon before
re-running relay-only proof. A Gateway restart can leave the Chrome DevTools
child alive with a dead upstream socket; retires it before the next call creates a fresh connection.
mcporter daemon stop - Direct remote Gateway pairing remains an Advanced manual flow. It serves the Gateway browser path and does not create a local relay for local mcporter.
- 在加载已解压的扩展程序之前运行。该命令会将扩展复制到OpenClaw所有的稳定路径,预注册该路径对应的确定性Chrome ID,并输出需要加载的路径。之后首次原生调用会自动为本地或浏览器节点拓扑完成配对。
openclaw browser extension install - 使用验证已安装的副本、准确的源和原生主机注册情况。状态必须报告无问题,且
openclaw browser extension status --json。manualSetupRequired: false - 确认设置页面显示自动设置已就绪,且扩展弹窗显示已连接。新安装的扩展应显示全部标签页,除非用户更改访问模式;正常本地流程中无需复制配对字符串或在弹窗中进行设置。
- Chrome进程会缓存之前的原生主机未命中记录。如果扩展在安装前尝试过原生消息传递,安装后需重启一次Chrome;在同一进程中反复重试无法修复该缓存。
- 完成配对或更改中继路由后,需先停止mcporter守护进程,再重新运行仅中继的就绪验证。网关重启可能导致Chrome DevTools子进程仍在运行,但上游套接字已失效;会在下次调用创建新连接之前终止该子进程。
mcporter daemon stop - 直接远程网关配对仍属于高级手动流程。它用于网关浏览器路径,不会为本地mcporter创建本地中继。
Discovery Timeout and Daemon Configuration
发现超时与守护进程配置
MCPorter discovers the actual relay through
. Even packaged OpenClaw can take more
than five seconds to cold-start. In mcporter 0.13.10, discovery failure falls
back to port 18799; a timeout can therefore appear as at the
wrong endpoint, or as when a later discovery returns
the real endpoint. Do not interpret that sequence as proof that another Chrome
owner or credential rotation caused the failure.
openclaw browser extension cdp --jsonnetwork-errorbrowser_owner_conflictFor the shared Chrome owner, use the OS account's canonical
(or only when the JSON file is absent).
Merge these fields into its existing Chrome definition, preserving its command,
arguments and other settings:
~/.mcporter/mcporter.jsonmcporter.jsoncjson
{
"chromeDevtoolsRelay": "require",
"env": {
"MCPORTER_CHROME_DEVTOOLS_RELAY_TIMEOUT_MS": "20000"
}
}The relay timeout bounds each discovery or authentication step; it does not
extend the client's total operation deadline. Initial Chrome startup can run
several discovery checks before MCP initialization and the requested tool call.
On older installed clients, pair the canonical per-step setting with
an explicit on the initial call or schema listing. For example:
20000--timeout 300000bash
MCPORTER_CHROME_DEVTOOLS_RELAY_POLICY=require mcporter call chrome-devtools.list_pages --timeout 300000 --output textNewer Chrome-specific outer defaults require an upgraded invoking client.
Explicit , , and
still override those defaults; a smaller override can cut startup short.
--timeoutMCPORTER_CALL_TIMEOUTMCPORTER_LIST_TIMEOUTThe daemon intentionally strips inherited
and controls from the canonical Chrome environment. Shell exports
do not update an existing owner and are not a durable fix for a respawn. Put
literal values in the canonical definition's ; do not use placeholders
that depend on those stripped variables. If an explicit endpoint is necessary,
set there to the verified credential-free
HTTP loopback base URL, for example after verifying
that port. This override does not accept a WebSocket CDP URL such as
. Prefer discovery with a sufficient timeout over a
guessed or hardcoded port, especially when several OpenClaw installations coexist.
MCPORTER_CHROME_DEVTOOLS_RELAY_*OPENCLAW_*envMCPORTER_CHROME_DEVTOOLS_RELAY_URLhttp://127.0.0.1:28799ws://127.0.0.1:28799/cdpAfter changing canonical settings, let active calls drain and run
. If stop refuses because calls remain active, wait for
them to finish and retry stop; proceed only after it succeeds. The next call
starts a daemon with the saved settings, and subsequent respawns use the same
configuration. Verify the relay decision
with and repeat the readiness proof below.
Check the installed mcporter version before relying on newer timeout defaults
or explicit discovery-failure diagnostics; a source fix does not update an
already installed binary or running daemon.
mcporter daemon stopmcporter daemon status --jsonCurrent emits non-secret metadata by
default, but older versions and legacy-bearer options can expose credentials.
Prefer mcporter's redacted status for routine diagnostics, never request legacy
credentials, and do not dump process arguments. If credential exposure is
suspected, rotate the per-host secret and pair again.
openclaw browser extension cdp --jsonMCPorter通过发现实际的中继。即使是打包版的OpenClaw,冷启动也可能需要五秒以上的时间。在mcporter 0.13.10中,发现失败会回退到18799端口;因此,超时可能表现为错误端点的,或在后续发现返回真实端点时表现为。请勿将该序列误认为是其他Chrome所有者或凭证轮换导致故障的证据。
openclaw browser extension cdp --jsonnetwork-errorbrowser_owner_conflict对于共享Chrome所有者,请使用操作系统账户的规范配置文件(或仅在JSON文件不存在时使用)。将以下字段合并到现有的Chrome定义中,保留其命令、参数和其他设置:
~/.mcporter/mcporter.jsonmcporter.jsoncjson
{
"chromeDevtoolsRelay": "require",
"env": {
"MCPORTER_CHROME_DEVTOOLS_RELAY_TIMEOUT_MS": "20000"
}
}中继超时限制的是每个发现或身份验证步骤的时长;它不会延长客户端的总操作期限。Chrome初始启动时,在MCP初始化和请求的工具调用之前,可能会运行多次发现检查。对于已安装的旧版客户端,在规范的每步20000毫秒设置的基础上,需在初始调用或列出schema时显式添加。例如:
--timeout 300000bash
MCPORTER_CHROME_DEVTOOLS_RELAY_POLICY=require mcporter call chrome-devtools.list_pages --timeout 300000 --output text较新的Chrome特定外层默认值需要升级后的调用客户端才能支持。显式设置的、和仍会覆盖这些默认值;过小的覆盖值可能会导致启动中断。
--timeoutMCPORTER_CALL_TIMEOUTMCPORTER_LIST_TIMEOUT守护进程会主动从规范的Chrome环境中移除继承的和控制变量。Shell的export命令不会更新现有所有者的配置,也不是进程重启后的持久解决方案。请将字面量值放入规范定义的中;不要使用依赖于这些被移除变量的占位符。如果需要显式指定端点,请在其中将设置为经过验证的无凭证HTTP回环基地址,例如验证端口后设置为。该覆盖值不接受WebSocket CDP URL,例如。优先使用具有足够超时时间的发现机制,而非猜测或硬编码的端口,尤其是在多个OpenClaw安装共存的情况下。
MCPORTER_CHROME_DEVTOOLS_RELAY_*OPENCLAW_*envMCPORTER_CHROME_DEVTOOLS_RELAY_URLhttp://127.0.0.1:28799ws://127.0.0.1:28799/cdp更改规范设置后,需等待活跃调用全部完成,然后运行。如果由于仍有活跃调用导致停止失败,请等待它们完成后重试停止;仅在停止成功后再继续操作。下次调用会使用保存的设置启动守护进程,后续重启也会使用相同的配置。通过验证中继决策,并重复下面的就绪验证步骤。在依赖较新的超时默认值或显式发现失败诊断功能之前,请检查已安装的mcporter版本;源码修复不会更新已安装的二进制文件或正在运行的守护进程。
mcporter daemon stopmcporter daemon status --json当前版本的默认输出非涉密元数据,但旧版本和传统承载选项可能会暴露凭证。日常诊断优先使用mcporter的脱敏状态输出,切勿请求传统凭证,也不要转储进程参数。如果怀疑凭证已泄露,请轮换每主机密钥并重新配对。
openclaw browser extension cdp --jsonFail-Closed Readiness Proof
故障关闭型就绪验证
Require every condition below before calling the extension route ready:
- Extension status reports the stable copy and exact native registrations with no issues; Settings says automatic setup ready.
- The popup says Connected and the intended ordinary tab is not paused. In Selected tabs mode, it must also belong to the OpenClaw group.
- mcporter has been stopped after pairing, relay-route or canonical-config changes, and the next call has started a fresh daemon.
- The canonical Chrome definition uses , and a call with
chromeDevtoolsRelay: "require"succeeds. The canonical policy forbids direct DevTools fallback, so success is positive relay proof.MCPORTER_CHROME_DEVTOOLS_RELAY_POLICY=require - Selection and evaluation both succeed in a known eligible disposable tab.
bash
MCPORTER_CHROME_DEVTOOLS_RELAY_POLICY=require mcporter call chrome-devtools.list_pages --args '{}' --output text
MCPORTER_CHROME_DEVTOOLS_RELAY_POLICY=require mcporter call chrome-devtools.select_page --args '{"pageId":9}' --output text
MCPORTER_CHROME_DEVTOOLS_RELAY_POLICY=require mcporter call chrome-devtools.evaluate_script --args '{"function":"() => ({title: document.title, href: location.href})"}' --output jsonA relay-policy error means the extension transport is unavailable; report or
repair it instead of retrying without . A blocking Allow remote
debugging? prompt proves legacy attachment was attempted.
require在判定扩展路由就绪之前,必须满足以下所有条件:
- 扩展状态报告稳定副本和准确的原生注册均无问题;设置页面显示自动设置已就绪。
- 弹窗显示已连接,且目标普通标签页未被暂停。在选定标签页模式下,该标签页还必须属于OpenClaw组。
- 在配对、更改中继路由或规范配置后,已停止mcporter,且下次调用已启动全新的守护进程。
- 规范的Chrome定义使用,且使用
chromeDevtoolsRelay: "require"的调用成功。规范策略禁止直接DevTools后备,因此调用成功就是中继正常的明确证明。MCPORTER_CHROME_DEVTOOLS_RELAY_POLICY=require - 在已知符合条件的临时标签页中,选择和评估操作均成功。
bash
MCPORTER_CHROME_DEVTOOLS_RELAY_POLICY=require mcporter call chrome-devtools.list_pages --args '{}' --output text
MCPORTER_CHROME_DEVTOOLS_RELAY_POLICY=require mcporter call chrome-devtools.select_page --args '{"pageId":9}' --output text
MCPORTER_CHROME_DEVTOOLS_RELAY_POLICY=require mcporter call chrome-devtools.evaluate_script --args '{"function":"() => ({title: document.title, href: location.href})"}' --output json中继策略错误意味着扩展传输层不可用;应报告或修复该问题,而非去掉参数重试。如果出现阻塞式的**是否允许远程调试?**提示,则证明尝试了传统连接方式。
requireTypical Flow
典型流程
List pages, select only a shared target, snapshot before acting, and use fresh
snapshot UIDs. Prefer DOM snapshots over screenshots unless layout matters.
bash
MCPORTER_CHROME_DEVTOOLS_RELAY_POLICY=require mcporter call chrome-devtools.list_pages --args '{}' --output text
MCPORTER_CHROME_DEVTOOLS_RELAY_POLICY=require mcporter call chrome-devtools.select_page --args '{"pageId":9}' --output text
MCPORTER_CHROME_DEVTOOLS_RELAY_POLICY=require mcporter call chrome-devtools.take_snapshot --args '{}' --output text
MCPORTER_CHROME_DEVTOOLS_RELAY_POLICY=require mcporter call chrome-devtools.click --args '{"uid":"1_38","includeSnapshot":true}' --output text
MCPORTER_CHROME_DEVTOOLS_RELAY_POLICY=require mcporter call chrome-devtools.fill --args '{"uid":"1_13","value":"text","includeSnapshot":true}' --output text
MCPORTER_CHROME_DEVTOOLS_RELAY_POLICY=require mcporter call chrome-devtools.evaluate_script --args '{"function":"() => document.title"}' --output jsonFor live UI proof, capture the current page state before the action, perform
the requested interaction, then snapshot or evaluate the rendered result.
Keep secrets out of DOM, input, network, console, and screenshot output. For
credential checks, return only safe shape such as present/absent, length,
status code, or account/organization label.
If automation is unavailable, report the verification gap instead of silently switching to prohibited or isolated tooling.
列出页面,仅选择共享目标,操作前拍摄快照,并使用最新的快照UID。除非布局相关的验证需要,否则优先使用DOM快照而非截图。
bash
MCPORTER_CHROME_DEVTOOLS_RELAY_POLICY=require mcporter call chrome-devtools.list_pages --args '{}' --output text
MCPORTER_CHROME_DEVTOOLS_RELAY_POLICY=require mcporter call chrome-devtools.select_page --args '{"pageId":9}' --output text
MCPORTER_CHROME_DEVTOOLS_RELAY_POLICY=require mcporter call chrome-devtools.take_snapshot --args '{}' --output text
MCPORTER_CHROME_DEVTOOLS_RELAY_POLICY=require mcporter call chrome-devtools.click --args '{"uid":"1_38","includeSnapshot":true}' --output text
MCPORTER_CHROME_DEVTOOLS_RELAY_POLICY=require mcporter call chrome-devtools.fill --args '{"uid":"1_13","value":"text","includeSnapshot":true}' --output text
MCPORTER_CHROME_DEVTOOLS_RELAY_POLICY=require mcporter call chrome-devtools.evaluate_script --args '{"function":"() => document.title"}' --output json对于实时UI验证,需在操作前捕获当前页面状态,执行请求的交互,然后对渲染结果拍摄快照或进行评估。请勿将密钥暴露在DOM、输入、网络、控制台和截图输出中。对于凭证检查,仅返回安全的形态,例如存在/不存在、长度、状态码或账户/组织标签。
如果自动化不可用,需报告验证缺口,而非静默切换到被禁止的或隔离的工具。
Argument and Output Mechanics
参数与输出机制
--args@filebash
MCPORTER_CHROME_DEVTOOLS_RELAY_POLICY=require mcporter call chrome-devtools.navigate_page url=@/tmp/target-url.txt --output text
MCPORTER_CHROME_DEVTOOLS_RELAY_POLICY=require mcporter call chrome-devtools.evaluate_script function=@/tmp/probe.js --output jsonTreat this as a safety primitive, not just ergonomics. A sign-in URL, magic
link, or callback URL is credential-equivalent: write it to a mode-0600 file and
pass it by file reference so it never reaches shell history, process arguments,
or captured tool output. The same form carries a multi-line JavaScript function
without quoting or control-character errors.
Other call mechanics worth knowing before a login flow:
- Generic client defaults are 60 seconds for calls and 30 seconds for listings,
separate from the relay's per-step discovery/authentication timeout. Slow
initial Chrome startup on older clients needs as described above. Choose an explicit timeout for later interactive work when needed.
--timeout 300000 - with
take_screenshotis confined to the server's configured workspace roots and refuses arbitrary paths. OmitfilePath, read the base64 image fromfilePath, and decode it locally.--output json - can fail with a restricted/unavailable tab when the target is not shared. Navigate an already-shared tab instead of creating one.
new_page - prints the real function signatures. Use it rather than guessing parameter names.
mcporter list <server> --schema
--args@filebash
MCPORTER_CHROME_DEVTOOLS_RELAY_POLICY=require mcporter call chrome-devtools.navigate_page url=@/tmp/target-url.txt --output text
MCPORTER_CHROME_DEVTOOLS_RELAY_POLICY=require mcporter call chrome-devtools.evaluate_script function=@/tmp/probe.js --output json请将此视为一种安全原语,而非仅仅是易用性设计。登录URL、魔法链接或回调URL都属于凭证等价物:请将其写入权限为0600的文件中,通过文件引用传递,这样它们就不会出现在shell历史记录、进程参数或捕获的工具输出中。同样的形式还可以传递多行JavaScript函数,避免引号或控制字符错误。
在登录流程之前需要了解的其他调用机制:
- 通用客户端的默认调用超时为60秒,列表超时为30秒,与中继的每步发现/身份验证超时相互独立。旧版客户端上Chrome初始启动较慢,需要如上文所述设置。后续交互工作如有需要,请选择显式超时时间。
--timeout 300000 - 带有参数的
filePath仅限于服务器配置的工作区根目录,会拒绝任意路径。请省略take_screenshot,从filePath中读取base64格式的图片,然后在本地解码。--output json - 当目标未共享时,可能会失败,返回受限/不可用标签页错误。请导航到已共享的标签页,而非创建新标签页。
new_page - 会输出真实的函数签名。请使用该命令,而非猜测参数名称。
mcporter list <server> --schema
Clicks That Do Not Click
点击无效的情况
A by can return success and still do nothing: some pages bind
their handlers so that a synthetic click is ignored. Silence is not proof of
action, so verify state after every activation rather than assuming it worked.
clickuidWhen a click no-ops, drive the control from the keyboard with
(, , ) and confirm focus with a screenshot before
committing. Focus rings are the only reliable evidence of which control is
about to receive , and consent screens routinely put the safe-looking
prominent button next to a low-emphasis link that is the one you actually want.
Blind on such a page picks the wrong control.
press_keyTabShift+TabEnterEnterEnterSnapshot values are invalidated by any navigation or re-render. Re-run
and re-resolve the after every step; a stale
reports that the element no longer exists, which is a cue to re-snapshot rather
than to retry the same call.
uidtake_snapshotuiduid通过执行的可能返回成功,但实际没有任何效果:有些页面的事件处理器绑定方式会导致合成点击被忽略。无响应不代表操作已执行,因此每次激活后都要验证状态,而非假设操作成功。
uidclick当点击无效时,请使用(、、)通过键盘操作控件,并在确认前通过截图验证焦点位置。焦点环是判断哪个控件即将接收键的唯一可靠证据,而同意页面通常会将看起来安全的显眼按钮放在低强调的链接旁边,而后者才是你真正需要的。在这类页面上盲目按会选错控件。
press_keyTabShift+TabEnterEnterEnter任何导航或重新渲染都会导致快照失效。每一步操作后都要重新运行并重新解析;过期的会报告元素不存在,这是需要重新拍摄快照的提示,而非重试相同调用的理由。
uidtake_snapshotuiduidWhen the Relay Goes Empty Mid-Task
任务中途中继无标签页的情况
The relay can stop exposing tabs partway through a task because eligible tabs
were closed, the current tab became restricted or paused, Selected tabs mode
lost its group members, or the extension disconnected. The failure can be
quiet: may return an empty result and later calls time out.
list_pagesTreat an empty page list as "the relay has no eligible tabs", not "the browser
is gone". Confirm Chrome is running, check the popup connection and current-tab
Pause/Allow state, then check the access mode. Only Selected tabs mode requires
restoring the OpenClaw group. Restarting mcporter cannot repair extension
disconnection, tab eligibility, or access policy.
Do not escalate to a full-profile attachment or an isolated browser to route
around it. When the task is a sign-in the user is present for, the faster and
more honest move is to hand the URL to the browser the user is already sitting
at, and if the flow's callback listens on another host, forward that port to
the user's machine first. Otherwise report the access gap.
任务进行到一半时,中继可能会停止暴露标签页,原因包括符合条件的标签页被关闭、当前标签页变为受限或被暂停、选定标签页模式下的组内成员丢失,或扩展断开连接。这种故障可能是静默的:可能返回空结果,后续调用则会超时。
list_pages请将空页面列表视为「中继没有符合条件的标签页」,而非「浏览器已关闭」。请确认Chrome正在运行,检查弹窗连接状态和当前标签页的暂停/允许状态,然后检查访问模式。仅选定标签页模式需要恢复OpenClaw组。重启mcporter无法修复扩展断开连接、标签页资格或访问策略相关的问题。
请勿升级到全配置文件连接或使用隔离浏览器来绕过该问题。如果任务是用户在场的登录操作,更快且更诚实的做法是将URL交给用户正在使用的浏览器;如果流程的回调在另一台主机上监听,请先将该端口转发到用户的机器。否则请报告访问缺口。
Legacy Fallback: Full-Profile Direct Attachment
传统后备方案:全配置文件直接连接
Use this only after the callable plugin and authenticated local extension relay
are unavailable. It exposes the full real-profile tab set and can show Chrome's
blocking Allow remote debugging? prompt.
When a visible, unambiguous Chrome prompt asks to allow the attachment, approve
it once, then rerun . If the prompt is absent, ambiguous, or the
retry fails, stop and ask the user or report that Chrome DevTools MCP is
unavailable. Do not loop approvals, repeatedly restart Chrome or mcporter, or
kill browser processes.
list_pagesVerify that shows the intended real-profile tabs before acting. Always
label this path as full-profile direct attachment, never as OpenClaw extension relay success.
list_pages仅在可调用插件和经过身份验证的本地扩展中继都不可用时才使用该方案。它会暴露完整的真实配置文件标签页集,并且可能会显示Chrome的阻塞式**是否允许远程调试?**提示。
当出现清晰可见的Chrome提示要求允许连接时,批准一次,然后重新运行。如果提示未出现、模糊不清,或重试失败,请停止操作并询问用户,或报告Chrome DevTools MCP不可用。请勿循环批准、反复重启Chrome或mcporter,或杀死浏览器进程。
list_pages操作前请验证显示了目标真实配置文件的标签页。请始终将该路径标注为全配置文件直接连接,绝不能标注为OpenClaw扩展中继成功。
list_pages