nicken/dsh-browser-use: A Lightweight CDP Browser Control Plugin for DeepSeek Harness

Introduction

DeepSeek Harness (DSH) adopts a “everything is a plugin” philosophy, allowing agent developers to compose capabilities on demand. In browser automation scenarios, existing solutions often face two challenges: either requiring heavyweight dependencies like Playwright, or struggling to balance container isolation with low cost. The nicken/dsh-browser-use plugin offers a middle-ground option: it uses Chrome DevTools Protocol to control the browser directly, runs with zero dependencies, and provides a deterministic security layer that enables agents to complete browsing tasks within a controlled scope.

Plugin Overview

  • Maintainer: nicken
  • Category: Web tools
  • GitHub: https://github.com/nicken/dsh-browser-use
  • Positioning: DSH plugin + self-hosted MCP browser sandbox, providing low-token CDP browser control with a security layer, and a containerized Xvfb/Chromium sandbox (with live view and trajectory replay)

Core Features

DSH Plugin

  • Zero-dependency CDP driver: index.js communicates directly with Chrome DevTools Protocol using the runtime’s WebSocket, without relying on Playwright or any CDP library.

  • Numbered references, minimal observation: browser_observe returns visible interactive controls in lines like [r1] button "Submit" (typically ~200–450 tokens per page), rather than a full DOM dump. References are identified via data-dsh-ref attributes and parsed directly by browser_act.

  • Query-based reading: browser_read answers questions by returning matching paragraphs in Markdown (default 8,000 character budget), avoiding full-page dumps.

  • Single action + diff report: browser_act executes one click/input/keypress/scroll/hover/select operation at a time, returning the URL, title, and added/removed/modified controls, so the model can decide whether to continue observing.

  • Deterministic security layer: Navigation is restricted to absolute http(s) URLs and filtered through an operator policy file (domain allowlist/blocklist); password fields are never auto-filled; file pickers and executable downloads are deferred to the user; high-risk operations require explicit confirmation.

  • Approval with visual evidence: High-risk operations are highlighted in the visible browser, captured in a screenshot, and routed through the DSH approval service; when the policy is set to never, the action is rejected outright.

  • Session-level capability toggle, off by default: Tools are registered via when conditions in ~/.dsh/capability-toggles.json; the Browser tab in the UI and the composer status chip provide the toggle; changes take effect from the next step onward.

  • Isolated profiles, bounded pool: Each conversation gets its own Chromium process and a dedicated user-data-dir, never using the user’s daily profile; up to 3 browsers run concurrently; browsers are automatically closed after 15 minutes of idle time.

  • User takeover and audit: Before executing a high-risk operation, the window is brought to the foreground; show can be invoked on demand; all open/act/evidence calls are appended to a JSONL audit trail (recording only lengths, not plaintext).

  • DSH-native UI: The Browser conversation tab displays the browser pool, pause/resume controls, and recent audit entries; each tool is rendered as a lightweight card; status chips appear only when a browser is open or paused.

  • Coexistence: The plugin owns an independent Chromium driver and does not occupy the optional browserUse provider interface, so it can coexist with other browser plugins; the status router reports competing plugins rather than guessing.

browser-pods MCP Server

  • Session-level container isolation: Each session gets a dedicated Xvfb display, Chromium process, profile directory, port, and VNC endpoint; windows never appear on the user’s desktop.

  • Live view: Each session provides a noVNC URL for real-time viewing and manual takeover, plus a dashboard (thumbnails, action log, and controls).

  • Replayable sessions: On shutdown, the session archives video.webm (full session recording) and trace.zip (Playwright trace: actions, DOM snapshots, network, and screenshots), along with a meta.json describing the run.

  • Multiple concurrent sessions: Slot-based allocation; each instance defaults to PODS_MAX sessions (default 6); multiple instances can be deployed on a single machine via scripts/scale.sh.

  • Explicit certificate override: TLS certificates are verified by default; use browser_open({ ignore_cert_errors: true }) to trust self-signed or internal HTTPS for a single session; or set the environment variable IGNORE_CERT_ERRORS=1 to trust by default for new sessions.

  • Provision-only or full-featured: Setting MCP_DRIVER_TOOLS=1 exposes 16 tools (lifecycle + driver); setting it to 0 exposes only 5 provisioning/observation tools, drivable by any CDP client; docker compose defaults to 1.

  • Compatible with any MCP client: http://127.0.0.1:8787/mcp is a stateless streaming HTTP endpoint, simultaneously serving DSH, Claude Code, or other MCP-capable clients.

Installation & Activation

Plugin Only (Local Browser)

Install to a DSH profile:

dsh plugin --profile web add github:nicken/dsh-browser-use

After installation, enable the bundle on DSH’s Plugins page (the install dialog usually prompts you). Once enabled, configure the execution engine (local / browser-pods / auto) and related parameters on the Browser tab in DSH. Settings are saved to ~/.dsh/browser-use/engine.json and take effect from the next step; environment variables take higher priority.

The plugin requires DSH (tested version 0.2.2-rc.5, web profile) and a local Microsoft Edge or Google Chrome. Auto-detection covers default Windows installation paths; on Linux/macOS or non-standard installations, set DSH_BROWSER_PATH=/path/to/chrome. A desktop display environment is required for visible windows; headless servers should use browser-pods mode.

MCP Server Only (browser-pods Sandbox)

Install Docker Engine 24+ and Compose v2 on a Linux host, reserving approximately 2 GB of disk space and 1–2 GB of memory per concurrent sandbox. Navigate to the mcp directory:

cd mcp && docker compose up -d --build

Verify health:

curl -s http://127.0.0.1:8787/healthz

Default listening ports: control/MCP 8787, VNC 5902+, noVNC 6082+, CDP 9223+. No additional configuration is needed for local-only access; when exposing externally, set MCP_TOKEN before opening the control plane.

Using Both Plugin and MCP

Both can be deployed in parallel, with the execution engine selector in DSH determining the mode. Choose browser-pods sandbox on the Browser tab, or set DSH_BROWSER_ENGINE=pod in the environment. The plugin will automatically create and manage the browser-pods pod while still exposing only the browser_* tool interface. See docs/DEPLOYMENT-FORMS.md for detailed configuration.

Typical Usage

Enabling Browser Capability in DSH

  1. After installing the plugin, enable the dsh-browser-use bundle on DSH’s Plugins page.
  2. On the Browser tab, set the capability toggle to on.
  3. Configure the execution engine to local (using the local browser) or browser-pods sandbox (using the containerized sandbox).
  4. In the conversation, use browser_observe to inspect current page controls, and execute browser_act using numbered references.

Using browser-read to Query Page Content

In a session, ask the model to call browser_read with a question, for example:

browser_read("What are the main action buttons on the page?")

The plugin returns the matching paragraphs in Markdown, and the model can decide the next action based on the response.

Using browser-pods in MCP Mode

  1. Start the browser-pods MCP server.
  2. In DSH, set DSH_BROWSER_ENGINE=pod, or directly select browser-pods sandbox on the Browser tab.
  3. The plugin will automatically create the pod and communicate via CDP; the tool interface remains consistent.

Use Cases & Caveats

  • Suitable for scenarios requiring precise browser control, low token consumption, and a level of trust in the browser environment.
  • Not suitable for scenarios requiring high isolation, real-time human intervention, or full session video replay (use the browser-pods sandbox instead).
  • The plugin runs with the current DSH process permissions and uses the local browser. Review the source code and license (MIT) before installing.

Summary

nicken/dsh-browser-use provides a lightweight, zero-dependency browser control capability within DeepSeek Harness. It reduces token consumption through numbered references and query-based reading, and enhances controllability through a deterministic security layer and audit mechanisms. Paired with the browser-pods MCP sandbox, it offers greater flexibility in balancing isolation and replayability. Full documentation and source code: https://github.com/nicken/dsh-browser-use

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye