@anvailabs/agentbrowser-mcp

中文文档
1.34.0发布于 2026/11/06Apache-2.0TypeScriptES Module零依赖构建来源已验证近 30 天下载 4672

MCP server exposing AgentBrowser as high-level, safe, composable tools (talks to an AgentBrowser service via AGENTBROWSER_BASE_URL)

原始使用文档
文档目录9 节
  1. Discover usage before inspecting source
  2. Tool surface
  3. Protocol and result compatibility
  4. Multiple pages and large research results
  5. Running it
  6. Release consumers: the single binary (recommended)
  7. Development: from the workspace
  8. Environment
  9. Building and gating the binary

@anvailabs/agentbrowser-mcp

The MCP server for AgentBrowser. Two install paths, one source:

npm i -g @anvailabs/agentbrowser-mcp   # Node >= 18
# or: download the bun-compiled standalone binary from the GitHub Releases

The package is only the MCP stdio adapter — it proxies to an AgentBrowser service. Point it at one with AGENTBROWSER_BASE_URL (default http://localhost:5709).

Discover usage before inspecting source

tools/list includes headed-session, cookie-handoff and LAN policy guidance on the relevant tools. create returns both a sessionId and an initial pageId; set headless: false for a visible window on the server host. CLI session create only returns a session, so shell clients must also call page create.

When shell access is available, use agentbrowser --help and offline agentbrowser describe session create / describe navigate / describe plan --schema for examples and exact CLI syntax. AGENTBROWSER_BASE_URL configures this adapter; the CLI uses --base-url. Neither reconfigures the running REST server. An operator may set AGENTBROWSER_ALLOWED_CIDRS on agentbrowser-server at startup for specific authorized LAN hosts. This never relaxes loopback/metadata blocks or overrides session host restrictions. There is no per-tool policy-widening argument.

Cookie tool results contain credentials. Prefer the CLI's private-file export/import when appropriate, and verify the expected authenticated UI after seeding. See the quick reference.

Exposes AgentBrowser as a small set of high-level, safe, composable MCP tools (ADR-009). Raw engine operations — evaluate, routing, selectors, low-level input — are deliberately not exposed.

Tool surface

See the generated tool catalog for unbound and delegated surfaces, required arguments and output contracts. It comes from actual tools/list responses, with a digest over complete descriptions and schemas. The existing release artifact check rejects drift. Regenerate after building with node scripts/mcp-catalog-docs.mjs --write.

session inspects metadata and pages when given a sessionId. On a delegated connection the binding supplies that ID and the same response also includes current control status. The tool requires both session.control and page.observe; application mode therefore does not expose it. Delegated mode removes create/close/cookies and adds operation (operation status). AGENTBROWSER_MODE fixes one profile for the lifetime of the bridge connection. Reconnect to change profiles; clients may cache catalogs. Obtain the effective catalog from your own connection with tools/list; metadata never enlarges a session grant, and the service rejects a tool call that the bearer grant's profile does not allow even if a mismatched bridge advertises it.

qa, operations, appsec, bounty, and forms currently project the complete browser catalog. audit omits bulk autofill. application exposes only delegated operation reconciliation until T4 publishes typed application tools. These deliberate duplicates avoid fictional context savings; the generated catalog records exact result bytes for every profile and binding.

Protocol and result compatibility

The foundation candidate supports MCP 2024-11-05 and 2025-06-18. Explicit legacy clients keep text JSON and catalogs without output schemas/annotations. Newer or unknown requested versions are offered 2025-06-18; clients must support that returned version or disconnect. Missing initialization retains historical text behavior; clients should always perform the handshake. A connection cannot renegotiate while calls run.

Under 2025-06-18, autofill and plan advertise canonical urn:agentbrowser:autofill-report:v1 and urn:agentbrowser:plan-report:v1 schemas and return validated structuredContent plus identical serialized JSON text. Plan retains optional mode/revision metadata to preserve the existing SDK contract; the current server always supplies it. Other tools still return text JSON; no unqualified output schemas are invented. Both tools' annotations explicitly state that it mutates and is not safe to repeat. Hints are not authorization or proof of browser/backend support. The MCP tools specification defines the structured/text compatibility behavior.

Failed autofill and plan reports (ok: false) now set isError: true in both protocols while retaining complete receipt/result JSON. This changes error signaling from 1.8.18; clients should inspect the retained report and must not treat it as a retry instruction. Successful verify: none reports do not establish verification or application commit. Invalid upstream bulk reports return a sanitized text error with uncertainty instructions, never a fabricated structured success or an automatic second write. Errors before a valid report exists remain text diagnostics without structured content.

This transport qualification does not yet certify structured-result consumption by installed Victor, Codex or Claude clients. That remains T8 harness acceptance.

For qualified native forms, prefer autofill; inspect each field's verification receipt and preserve uncertain writes. For explicit heterogeneous steps use snapshot → plan — see the main README.

Multiple pages and large research results

create still returns its initial pageId. Use page_create with that sessionId and an optional HTTP(S) url to create another page in the same cookie context. Use pages to discover page IDs, including adopted popups; never invent an ID or expect navigation to create a page implicitly. These tools delegate to the existing SDK, and the service remains the authorization/policy owner. The equivalent shell interfaces remain agentbrowser page create --help and agentbrowser page list --help.

Bound creation requires operationId chosen before dispatch. Controlled sessions deduplicate that ID, but operation status does not retain the resulting page ID. Ordinary sessions made by create do not acquire deduplication from an ID alone. Do not automatically retry an uncertain create in either case; inventory is not proof of which page a concurrent create produced. A general explicit-page quota and result correlation remain follow-ups, separate from the existing popup cap.

extract preserves complete data and evidence within maxBytes. Its default ceiling is 1 MiB of compact JSON including evidence; the operator can raise the ceiling with AGENTBROWSER_EXTRACT_MAX_BYTES before starting the service. Raw HTML size is not the extracted result size. Over-limit results fail explicitly, with no partial JSON. The MCP text envelope is separately serialized and can be larger. Any overflow files written by Claude or another harness belong to that harness; AgentBrowser does not define their paths.

For the reproducible headed research smoke and its limits, see research qualification.

Running it

Download agentbrowser-mcp-<target> from the GitHub releases (verify against sha256sums.txt), then point any MCP client at it — no Node, no pnpm, no repo checkout:

# ~/.victor/mcp.yaml
mcpServers:
  agentbrowser:
    command: /usr/local/bin/agentbrowser-mcp
    env:
      AGENTBROWSER_BASE_URL: http://localhost:5709

The binary is only the MCP adapter (TD-BROWSER-5 scope boundary): it needs a reachable AgentBrowser server over AGENTBROWSER_BASE_URL for anything beyond the protocol handshake. Deploy the server once (release tarball, or node packages/api/dist/bin.js); every consumer process spawns the binary.

Development: from the workspace

pnpm --filter @anvailabs/agentbrowser-mcp build
node packages/mcp-server/dist/bin.js

Environment

VariableMeaning
AGENTBROWSER_BASE_URLAgentBrowser server to proxy to (default http://localhost:5709)
AGENTBROWSER_API_KEYBearer key for the service, when it has AGENTBROWSER_API_KEYS configured
AGENTBROWSER_SESSION_IDOperator-configured delegated session binding; use its current delegated credential as the API key
AGENTBROWSER_MODEFixed mode profile for this connection: qa (default), operations, audit, appsec, bounty, forms, or application
AGENTBROWSER_MCP_VERSIONOverride the reported serverInfo.version (debugging; the binary is otherwise stamped at build time from package.json)

Building and gating the binary

pnpm --filter @anvailabs/agentbrowser-mcp compile   # -> dist-bin/agentbrowser-mcp (needs bun)
pnpm --filter @anvailabs/agentbrowser-mcp smoke     # stdio handshake + full tool-catalog gate

Cross-compile with node scripts/compile.mjs --target=bun-linux-arm64 --outfile=.... CI runs both on every PR (Bun compile + smoke job), and every v* tag publishes the five-target release matrix — see docs/td/TD-BROWSER-5-single-binary-mcp-distribution.md.

版本与发布记录

@anvailabs/agentbrowser-mcp 共发布 64 个版本,首次发布于 2026/09/03;过去 12 个月发布了 64 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
1.34.0latest2026/11/061 天前
1.33.12026/11/053 天前
1.33.02026/11/043 天前
1.32.02026/11/034 天前
1.31.02026/11/025 天前
1.30.32026/11/025 天前

关于 @anvailabs/agentbrowser-mcp 的常见问题

@anvailabs/agentbrowser-mcp 是什么?

MCP server exposing AgentBrowser as high-level, safe, composable tools (talks to an AgentBrowser service via AGENTBROWSER_BASE_URL)

如何安装 @anvailabs/agentbrowser-mcp?

在项目目录运行 npm install @anvailabs/agentbrowser-mcp,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 agentbrowser-mcp,可以用 npx agentbrowser-mcp 直接运行。

@anvailabs/agentbrowser-mcp 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@anvailabs/agentbrowser-mcp 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@anvailabs/agentbrowser-mcp 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=18。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@anvailabs/agentbrowser-mcp 可以商用吗?

@anvailabs/agentbrowser-mcp 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@anvailabs/agentbrowser-mcp 的下载量有多少?

根据 npm 官方下载统计,@anvailabs/agentbrowser-mcp 在 2026/10/06 – 2026/11/04 这 30 天内被下载 4,672 次,日均约 156 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@anvailabs/agentbrowser-mcp 还在维护吗?

最新版本 1.34.0 发布于 2026/11/06(1 天前);至今共发布 64 个版本,其中过去 12 个月发布了 64 个;首次发布于 2026/09/03。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。