DSH 插件:通过 CDP 控制 360 浏览器

Introduction

It is a common requirement in agent development to have DSH’s Agent directly manipulate local 360 Extreme Browser X and 360 Secure Browser. Traditional methods require driving the browser via automation frameworks like Selenium or Playwright, or installing browser extensions. This plugin reuses the browser’s own configuration and login state, requiring no changes on the browser side; simply launching the browser with a debugging port allows communication via CDP (Chrome DevTools Protocol).

Plugin Overview

This is a plugin for DeepSeek Harness (DSH) provided by maintainer 13286793372, categorized as “Internet Tools”. It utilizes the browser’s native CDP interface, enabling DSH’s Agent to directly operate on 360 series browsers.

Core Features

  • Open pages, switch tabs
  • Read the page’s accessibility tree
  • Click, type, fill forms
  • Take screenshots
  • Execute JavaScript

The plugin does not rely on browser extensions or external services; upon activation, it registers a stdio MCP service for each browser.

Installation

Install via command line:

dsh plugin --profile web add github:13286793372/dsh-360-browser

After installation, restart DSH for the plugin to take effect.

Enable Browser Debugging Port

The two browsers need to be started with debugging ports via command line arguments:

Browser Argument Tool Namespace
360 Extreme Browser X --remote-debugging-port=9222 mcp__browser360__browser_*
360 Secure Browser --remote-debugging-port=9223 mcp__browser_se__browser_*

Append the above parameters to the “Target” field of the shortcut, then completely exit the browser and reopen it. Running processes cannot add debugging ports retroactively.

Verify that the port is working normally: Access http://127.0.0.1:9222/json/version in the browser. Returning {"Browser":"Chrome/..."} indicates normal operation.

How It Works

The plugin relies on the standard CDP interface of the Chromium kernel. Upon activation, it locates the Node executable, points to the built-in @playwright/mcp, and registers a stdio MCP service for each browser via DSH’s built-in mcp-manager. No browser extensions or external services are involved.

Usage

The plugin probes the browser port every 8 seconds. The tool automatically appears within about 8 seconds after the browser starts and automatically disappears when closed, without needing to restart DSH. You can start the browser or DSH first.

Environment variables can override default port configurations:

Variable Default Value Meaning
BROWSER360_PORT 9222 Port for 360 Chrome X
BROWSER_SE_PORT 9223 Port for 360 Secure Browser
BROWSER360_TARGETS both Optional values: browser360, browser_se, or browser360,browser_se

Limitations

  • The browser must be started with debugging ports; running processes cannot add ports retroactively.
  • Only supports Chromium kernel; Firefox and WebKit are not supported.
  • When the port is closed, tool calls will report connection errors, but DSH itself continues to run.
  • All sessions share the same browser connection; do not let two sessions write to the same page simultaneously.
  • The port binds to 127.0.0.1, but any program on the local machine can take over the browser (including cookies). When not in use, close the browser and do not expose the port to the network.

Use Cases

Suitable for developers who need to directly operate 360 series browsers within a DSH Agent. It is recommended to check the source code and license before installation.

Conclusion

This plugin provides standard capabilities to control 360 browsers via CDP, making it suitable for scenarios requiring browser manipulation within an Agent.

  • Plugin Directory: https://www.skillhub.cn/plugins/13286793372/dsh-360-browser
  • GitHub: https://github.com/13286793372/dsh-360-browser
羽毛球分组比赛记分
小程序二维码

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

Xiaoye