unbrowser by Unchained

io.github.protostatis由 GitHub 账号 protostatis 发布v0.0.21更新于 Oct 24, 2026

Chrome-free MCP web access for agents with low-token page maps and browser escalation hints.

概览

AI 生成的概览

无需 Chrome 的有状态网页运行时,让助手导航页面、查询元素、填写表单并以低 token 页面地图提取结构化内容。

可以做什么
  • 导航页面并返回包含标题、标题层级、地标与交互元素的结构化 BlockMap
  • 按选择器查询元素,并通过稳定元素引用执行点击、输入或提交
  • 在会话内保留 Cookie、链接、重定向与 URL 编码表单提交
  • 按需在受限 QuickJS 中执行页面脚本,以应对静态 HTML 不足的情况
  • 借助路由、卡片、表格与正文提取等辅助功能获取结构化数据
  • 读取页面与挑战信号及路由提示,建议下一步操作或升级到真实浏览器
适用场景
适用于纯 HTTP 抓取能力不足、而完整 Chrome 又过重的场景:静态或服务端渲染页面、链接与表单流程,以及需要会话状态的助手式提取。它也会提示何时确实需要真实浏览器。
运行要求
以本地 stdio 进程运行原生二进制,可通过 uvx 安装 pyunbrowser(PyPI)、Cargo、Docker 或发布包获取。Python 安装需 3.10 及以上。未声明认证、环境变量或请求头。
安装前请注意
会话 Cookie 应视为凭据:仅保存在本地并限定于获授权任务。Cookie 导入与挑战检测并不授权绕过访问控制或站点条款。公开演示与共享端点仅用于公开测试,不要发送隐私数据、Cookie 或需登录的任务。脚本执行需显式开启且受限,并非完整浏览器引擎。

安装

在 SourceWeft 中

  1. 打开 控制台中的 unbrowser by Unchained,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

unbrowser

The cheap browser pass for agents. One native binary. No Chrome.

[unbrowser MCP server]

Official MCP Registry identity: mcp-name: io.github.protostatis/unbrowser

unbrowser is a stateful, non-visual web runtime for agents. It sits between curl/WebFetch and a real browser: it retains cookies and DOM state, returns queryable element refs, handles links and HTML forms, detects challenge and SPA signals, and can run bounded QuickJS page scripts when static HTML is not enough.

Default navigate is a fast static/SSR pass. Set exec_scripts: true only when you need bounded QuickJS execution. Heavy SPAs, pixels, V8 fidelity, extensions, and interactive anti-bot challenges belong in a real Chrome tier.

Try the live public-web demo before installing. It accepts only the fixed public source sets shown on the page; do not send private data, cookies, or authenticated tasks through it. A shared Streamable HTTP MCP endpoint is available at https://unchainedsky.com/unbrowser-mcp for public smoke tests; production sessions should use a local install.

Use unbrowser only on sites, accounts, and data you are permitted to access. Challenge detection and cookie import do not grant permission to bypass access controls or site terms. Treat session cookies as credentials: keep them local, scope them to the authorized task, and never send them to the public demo.

Pick the right tier

Needcurl / WebFetchunbrowserReal Chrome
Static / SSR HTMLraw responsestructured BlockMap + DOM queriesfull browser
Cookies, links, HTML formsDIYbuilt inbuilt in
Client-side page scripts❌bounded QuickJS, opt-inV8
Pixels, Canvas, WebGL, Workers, extensions❌❌✅
Agent-oriented outputDIY parsingelement refs, page signals, structured extractionDIY CDP / DOM parsing
Interactive access challenge❌detect + stop or escalateauthorized browser / human confirmation

Use unbrowser when HTTP alone is too dumb and a full browser is too expensive. When the page needs Chrome, the output tells the agent to escalate rather than pretending compatibility it does not have.

Quick start

Docker — Linux amd64/arm64, ~13 MiB pull

bash
docker pull ghcr.io/protostatis/unbrowser:latest
# One-shot navigationdocker run --rm ghcr.io/protostatis/unbrowser:latest \  navigate https://example.com --json
# Default mode: MCP over stdiodocker run --rm -i ghcr.io/protostatis/unbrowser:latest

The image is distroless and runs as non-root: no shell, package manager, or persistent state. Pin :vX.Y.Z or an image digest in production.

Python

bash
pipx install pyunbrowser   # recommended on macOS / modern Linux# or, inside a Python 3.10+ virtual environment:pip install pyunbrowser
python
from unbrowser import Client
with Client() as ub:    ub.navigate("https://news.ycombinator.com")    for link in ub.query(".titleline > a")[:3]:        print(link["text"], link["attrs"]["href"])

On macOS, /usr/bin/python3 is 3.9 and cannot install the wheel; use pipx or a Homebrew Python. The PyPI distribution is pyunbrowser, while the import and executable remain unbrowser.

MCP

json
{  "mcpServers": {    "unbrowser": {      "command": "unbrowser",      "args": ["--mcp"]    }  }}

Minimal surface: add "--mcp-profile", "minimal" to expose only navigate/query/extract/help and let the agent discover the rest via help(topic). The Python wrapper ships a 3-tool smart server (search/open/help) as the unbrowser-smart console script.

Docker MCP configuration
json
{  "mcpServers": {    "unbrowser": {      "command": "docker",      "args": [        "run", "--rm", "-i",        "ghcr.io/protostatis/unbrowser:latest"      ]    }  }}

See installation and interface reference for Cargo, release archives, source builds, persistent shell sessions, raw JSON-RPC, and all MCP options.

What an agent gets

  • navigate returns a BlockMap: page title, landmarks, headings, interactives, density signals, and an ASCII outline. Its size is page-dependent; it is structured for planning rather than a fixed-token promise.
  • Stable element refs (e:142): query an element once, then click, type, or submit it without re-parsing HTML.
  • Stateful cookies and forms: cookie jar, GET and URL-encoded POST form submission, links, and redirects persist within a session.
  • Page and challenge signals: density.likely_js_filled, thin_shell, and challenge.provider tell an agent whether to run scripts, inspect embedded data, stop, or escalate to an authorized browser session.
  • Routing aids on every result: micro_hint (the single next concrete step), next_tools (ranked candidates), avoid (tools with nothing to act on), and a stable escalation taxonomy (challenge, thin_shell, partial_result, …) with retryable/severity/evidence — recommendations never contradict avoid.
  • Structured helpers: route discovery, card extraction, table normalization, text_main, and selector debugging cover common extraction workflows.

Script mode and escalation

json
{"id":1,"method":"navigate","params":{"url":"https://example.com","exec_scripts":true}}

With exec_scripts: true, inline and external scripts run in QuickJS under a bounded watchdog. This can materialize light hydration and fetch-visible data; it is not V8 or a rendering engine. Heavy React/Vue/Ember apps may still leave an empty shell.

Escalate to unchainedsky-cli or Unchained when a permitted task needs real pixels, Canvas/WebGL, Workers, browser extensions, V8 compatibility, an authenticated profile, or human confirmation. When the user has already established an authorized session in Chrome, cookies_set can import the required session cookie locally until it expires; it is not a license to circumvent a site's controls.

Documentation

NeedRead
Install paths, session CLI, one-shot CLI, raw RPC, MCP, shims, full RPC tableUsage reference
Script compatibility, SPA signals, challenge handling, authorized cookie handoff, escalationCompatibility and escalation
Distribution and supported directory listingsDistribution notes
Build the native binaryBuild instructions

License

Apache-2.0 — see LICENSE.

来源:README.md,提交 b2f0d74

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.0.21最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分