browser-harness

browser-useMIT活跃维护

让 Claude Code、Codex、Cursor 等编码 Agent 直接操控你已登录的真实 Chrome,一句话完成配置,省去重新登录和环境搭建的麻烦。

Let Claude Code, Codex or Cursor use your real Chrome, logged in as you. One prompt to set up. Open source, MIT.

v0.1.13发布于 2026-09-04 02:52 UTC18,995star +59 / 7 天1,879fork同步于 2026-11-10 11:24 UTC

怎么上手

由 README 提炼,执行前请确认
uvx --from "browser-harness[mcp]" browser-harness-mcp
硬件要求按 README 说明

README 未说明显存或 GPU 要求;需本机运行 Chrome,Chrome 144+ 需在 chrome://inspect 勾选远程调试并点 Allow。

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

让 Claude Code、Codex、Cursor 直接操控你已登录的真实 Chrome,省去重新登录和配置浏览器

让 Claude Code、Codex、Cursor 等编码 Agent 直接操控你已登录的真实 Chrome,一句话完成配置,省去重新登录和环境搭建的麻烦。

核心能力

  • 通过 CDP 连接你正在运行的 Chrome,沿用你的登录状态
  • 粘贴一段提示词给编码 agent 即可完成安装与连接
  • agent 缺少 helper 时自行编写并复用,能力随任务累积
  • 提供 browser-harness-mcp,以 stdio 暴露浏览器控制工具给任意 MCP 客户端
  • 附 SKILL.md 教 agent 浏览器工作流,核心源码受保护

容易踩的坑

需先安装 uv,Cursor 的 MCP 配置依赖它;首次连接要在 chrome://inspect/#remote-debugging 勾选远程调试并允许;安装提示词要求用 Python 3.12 通过 uv 安装,版本不符可能失败。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v0.1.13
  1. v0.1.13最新正式版2026-09-04 · 2026-09-04 02:52 UTC

    What changed

    • Pin the MCP extra to mcp 2.1.1.
    • Pin release build tooling to build 1.6.0 and setuptools 84.0.0.
    • Preserve the Chrome permission and macOS accessibility reliability improvements from 0.1.12.

    Verification

    • 251 unit tests passed with the MCP extra.
    • pip-audit found no known vulnerabilities in the resolved environment.
    • Wheel and source distribution built successfully.
  2. v0.1.122026-09-04 · 2026-09-04 01:09 UTC
    查看更新说明

    What's Changed

    Full Changelog: https://github.com/browser-use/browser-harness/compare/v0.1.11...v0.1.12

  3. v0.1.112026-09-03 · 2026-09-03 15:42 UTC
    查看更新说明

    What's Changed

    New Contributors

    Full Changelog: https://github.com/browser-use/browser-harness/compare/v0.1.10...v0.1.11

  4. v0.1.102026-08-26 · 2026-08-26 00:49 UTC
    查看更新说明

    What's Changed

    Full Changelog: https://github.com/browser-use/browser-harness/compare/v0.1.9...v0.1.10

  5. v0.1.92026-08-16 · 2026-08-16 17:50 UTC
    查看更新说明

    What's Changed

    Full Changelog: https://github.com/browser-use/browser-harness/compare/v0.1.8...v0.1.9

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    Browser Harness ♞

    Browser Harness lets Claude Code, Codex or Cursor use your real Chrome browser: open pages, click, type, read and download, logged in as you. Paste one prompt into your coding agent to set it up. It talks to Chrome over the DevTools Protocol (CDP), and the agent writes any missing helper as it works, so the harness gets better with each task. Open source, MIT licensed.

    Try browser-harness in Browser Use Cloud or paste the setup prompt into your coding agent.

      ● agent: wants to upload a file
      │
      ● agent-workspace/agent_helpers.py → helper missing
      │
      ● agent writes it                         agent_helpers.py
      │                                                       + custom helper
      ✓ file uploaded
    

    You will never use the browser again.

    See it work

    Task: "Open my X profile, find my latest 20 video posts, and download them."

    Download my latest 20 X videos

    Setup prompt

    Paste into Claude Code or Codex (Cursor: use the MCP config below):

    Install or upgrade browser-harness to the latest stable version with uv using Python 3.12, register the skill from `browser-harness skill`, and connect it to my browser. Ask whether I want local browser recordings enabled; default to no and preserve my existing preference on upgrades. Follow https://github.com/browser-use/browser-harness/blob/main/install.md if setup or connection fails.
    

    The agent will open chrome://inspect/#remote-debugging. On first setup, tick the checkbox so the agent can connect to your browser:

    How it works

    • install.md connects the agent to your browser.
    • SKILL.md teaches it the browser workflow.
    • src/browser_harness/ stays protected while the agent writes reusable helpers in its local workspace.

    Compared with other browser tools

    Works withBrowser it drivesWhat you approve in your own Chrome
    Browser HarnessClaude Code, Codex, Cursor, any MCP client via browser-harness-mcpYour running Chrome, logged in as youWhole browser: on Chrome 144+, tick remote debugging in chrome://inspect, then click Allow
    Playwright MCPAny MCP client (Claude Code, Codex, Cursor, Copilot and more)Its own browser profile by default. Your Chrome with --extension (Playwright Extension) or --cdp-endpointChosen tabs (one tab group per client) via the extension, approval skippable with a token; or whole browser via --cdp-endpoint
    Playwright CLIClaude Code, GitHub Copilot and other agents that run shell commandsIts own browser by default. Your Chrome with attach --extension=chrome or attach --cdp=chromeChosen tab via the Playwright Extension, or whole browser via --cdp
    Chrome DevTools MCPAny MCP client (Claude Code, Cursor, Copilot, Antigravity and more), plus a CLIA new Chrome with a dedicated profile by default. Your Chrome 144+ with --autoConnectWhole browser: the same Chrome 144+ toggle and Allow dialog; the server sees every open window of that profile
    agent-browserClaude Code, Codex, Cursor, Gemini CLI, Copilot and more, as a CLI with a skill, plus an MCP serverIts own Chrome for Testing by default. A copy of your Chrome profile with --profile. Your running Chrome with --auto-connect or --cdpWhole browser via --auto-connect or --cdp: the same Chrome 144+ toggle and Allow dialog
    Claude in ChromeClaude Code (CLI or VS Code) with the Claude extension, signed in with a direct Anthropic plan (Pro, Max, Team, Enterprise), not an API keyYour Chrome, Edge or other Chromium browser, logged in as youPer site: allow sites in the extension, or per action in Claude Code (auto mode can skip the per-site check). Claude works in a tab group it opens
    ChatGPT Browser and browser extensionCodex and ChatGPT chats in the ChatGPT desktop app, not Codex CLI or the Codex IDE extensionBrowser: a separate profile. Extension: your Chrome, Edge, Brave, Opera or Vivaldi profilePer site: asks before each new website (allow once, for this site, or for all sites)

    Matched eval by Browser Use on 100 of the 200 public BU Bench V2.1 tasks (bu2-001 to bu2-100; 101-200 not run). Measured 2026-10-14.

    • Same agent for every tool: Codex CLI 0.144.6, GPT-6 Luna, medium reasoning, web search off. Same frozen judge.
    • Browser Harness was given to the agent as its CLI and SKILL.md, not browser-harness-mcp. Playwright MCP and Chrome DevTools MCP ran as MCP servers with default settings. agent-browser ran as its CLI and skill.
    • Every tool drove the same fresh Browser Use cloud browser over CDP. This does not measure each tool's default or local-Chrome mode.
    • One run per task. Agent failures were never retried. Runner, browser and judge failures were rerun once (Browser Harness 3 tasks, Playwright MCP 4, Chrome DevTools MCP 6, agent-browser 0).
    ToolMean rubric score 0-100 (95% CI)Fully solvedMedian input tokens per taskMedian model cost per task (GPT-6 Luna list price)Median agent time per task
    Browser Harness a6426f84 (main)60.4 (55.2-65.4)11%2.1M$0.0429.0 min
    Playwright MCP 0.0.8360.0 (55.1-65.0)11%4.4M$0.0668.3 min
    Chrome DevTools MCP 1.10.161.0 (55.8-65.9)11%6.7M$0.0978.7 min
    agent-browser 0.39.156.3 (51.1-61.5)9%3.3M$0.05611.2 min

    No tool wins on score: every paired difference against Browser Harness has a 95% CI that includes zero (other tool minus Browser Harness: agent-browser -4.0, CI -10.0 to +1.8; Playwright MCP -0.4, -6.6 to +5.7; Chrome DevTools MCP +0.6, -5.6 to +6.6).

    Browser Harness had the lowest median input tokens (2.1M vs 3.3-6.7M) and the lowest median model cost ($0.042 vs $0.056-0.097). Model cost excludes browser, proxy and judge. It was slower than Playwright MCP and Chrome DevTools MCP (median 9.0 vs 8.3 and 8.7 min) and faster than agent-browser (11.2 min). These are medians, with no confidence intervals.

    A first agent-browser run was discarded: a setup bug on our side let it launch its own local browser instead of the shared cloud browser. The row shows the corrected rerun.

    Measured with Codex only. Claude Code, Cursor, Playwright CLI and Claude in Chrome were not measured. Method and per-task scores: coding-agent-browser-tools.json.

    When to use something else

    • Playwright (Test, MCP or CLI): isolated, repeatable CI tests of your own app, in a clean browser with no personal logins.
    • Chrome DevTools MCP: performance traces and DevTools debugging (network, console, source-mapped stack traces).
    • Claude in Chrome: you only use Claude and have a Pro, Max, Team or Enterprise plan.
    • Cursor's built-in Browser: the agent doesn't need your logged-in Chrome. It runs in its own per-workspace profile.

    OpenAI's Codex labels its browser feature "Browser use" in its settings. It is separate from Browser Use, the company behind this repo.

    Scale with Browser Use Cloud

    Use your local browser for logged-in, personal work. When you want many browsers in parallel, with live previews, proxies, stealth, CAPTCHA solving, and more, scale with Browser Use Cloud.

    MCP server

    browser-harness-mcp exposes the browser control helpers as MCP tools over stdio, so any MCP client (Claude Code, Devin, Cursor, etc.) can drive the browser without writing a second CDP layer. See docs/MCP.md for setup and client configuration.

    Cursor

    Add this to .cursor/mcp.json in your project, or to ~/.cursor/mcp.json for every project. It needs uv.

    {
      "mcpServers": {
        "browser-harness": {
          "type": "stdio",
          "command": "uvx",
          "args": ["--from", "browser-harness[mcp]", "browser-harness-mcp"]
        }
      }
    }
    

    Contributing

    Bug fixes, documentation improvements, and agent-generated domain skills are welcome. See CONTRIBUTING.md.


    The Bitter Lesson of Agent Harnesses · Web Agents That Actually Learn