发布

  • mcp for CLI 3.0 (#5194)

    frostbyte_neo 发布于 2026-07-11 18:34:14 +00:00

    Summary by cubic

    Adds a stdio MCP server for CLI 3.0 behind --cli-mcp, exposing
    persistent browser_harness execution and screenshots to MCP clients.
    Uses a shared, silent stdio runner and validates max_dim inputs.

    • New Features

    • New --cli-mcp flag starts browser_use.mcp.cli_mcp via a shared
      stdio runner (mcp.server.stdio).

      • Tools:
    • browser_exec: run Python in a persistent namespace with helpers
      pre-imported.

    • browser_screenshot: returns base64 PNG; supports full; max_dim
      must be a positive integer.

    • Automatically calls ensure_daemon (except for remote admin calls).
      Disables logging to keep stdio clean.

    • Migration

    • Run: browser-use --cli-mcp. Sets BH_CLIENT=browser-use-mcp by
      default.

    • Connect your MCP client over stdio. Prefer browser_screenshot over
      in-code captures.

    Written for commit 133761dbbd.
    Summary will update on new commits.

    Review in cubic

    下载附件