JohnXu22786/browser-automation ↗★ 0
web-bridge-mcp
dsh 插件:使用真实浏览器的自动化 MCP server。以无障碍树快照驱动导航、点击、填表、截图与 JS 执行,充当 agent 的眼睛和手。
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:JohnXu22786/browser-automation说明文档
阅读完整 README ↗Configuration
Priority: defaults < config file (--config or WEB_BRIDGE_CONFIG) < environment variables.
Environment variables (prefix WEB_BRIDGE_)
| Variable | Default | Description |
|---|---|---|
WEB_BRIDGE_BROWSER | chromium | Engine: chromium / firefox / webkit |
WEB_BRIDGE_HEADLESS | true | Headless mode |
WEB_BRIDGE_VIEWPORT | 1280x720 | Viewport size, e.g. 1440x900 |
WEB_BRIDGE_EXECUTABLE | — | Custom browser executable path |
WEB_BRIDGE_USER_DATA_DIR | — | User data directory (persistent context; login state survives across sessions) |
WEB_BRIDGE_PROXY | — | Proxy address, e.g. http://proxy:3128 |
WEB_BRIDGE_LOCALE / WEB_BRIDGE_TIMEZONE | — | Locale and browser timezone |
WEB_BRIDGE_USER_AGENT | — | Custom User-Agent |
WEB_BRIDGE_IGNORE_HTTPS_ERRORS | false | Ignore certificate errors (debug only) |
WEB_BRIDGE_SANDBOX | true | Browser sandbox; set to false when no sandbox in container |
WEB_BRIDGE_PERMISSIONS | — | Permissions granted to the context, comma-separated (e.g. geolocation,clipboard-read) |
WEB_BRIDGE_ACTION_TIMEOUT | 10000 | Per-action timeout (ms, 0 = unlimited) |
WEB_BRIDGE_NAV_TIMEOUT | 60000 | Navigation timeout (ms, 0 = unlimited) |
WEB_BRIDGE_SETTLE_MS | 500 | Wait for async tasks to settle after an action (ms) |
WEB_BRIDGE_STORAGE_STATE | — | Session restore file path (non-persistent mode only) |
WEB_BRIDGE_TEST_ID_ATTR | data-testid | Attribute name used by the testid= selector |
WEB_BRIDGE_CONFIG | — | Config file path |
Config file
{
"browser": { "name": "chromium", "headless": true, "viewport": { "width": 1280, "height": 720 } },
"context": { "ignoreHTTPSErrors": false, "permissions": ["geolocation"] },
"timeouts": { "action": 10000, "navigation": 60000, "settle": 500 },
"sandbox": true,
"testIdAttribute": "data-testid"
}
Start: node dist/index.js --config web-bridge.config.json.