Browser-Router MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Browser-Router MCP Server Open news.ycombinator.com and summarize the top stories"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
dsh-browser-router
Smart Browser-Router MCP Server for AI agents — cheap DOM-first (Playwright/CDP) with automatic escalation to Vision/Coordinate mode (CUA), cost guard, probe-downgrade, SSRF protection, and human-in-the-loop approval gates.
Core Idea: "Cheap First, Vision Only When Needed"
Models only call a single backend-agnostic namespace (browse_*). They never need to know whether Playwright DOM or CUA Vision executes behind the scenes:
Playwright (DOM) by default — fast, deterministic, zero image tokens.
Automatic Escalation → CUA (Vision +
@x,ycoordinates) on structured failure signals (blocked,login_required,empty,locator_not_found,timeout).Probe-Downgrade & Anti-Flap — automatically probes Playwright on subsequent turns to drop back to cheap DOM mode; pins CUA if a domain escalates ≥ 2 times.
Cost Guard — hard caps on
max_cua_stepsand estimatedmax_cua_budget_tokens(budget_exhausted).Human-in-the-Loop Gates:
CAPTCHA→ returnsstatus: "needs_human"(never blindly clicks).browse_submit→ blocked by default (require_approval_submit: true) withstatus: "needs_human".
SSRF & Scheme Protection — blocks
file://,javascript:,chrome://,data:(opt-in), and loopback/private/metadata IPs (127.0.0.0/8,localhost,[::1],[::ffff:127.0.0.1],169.254.169.254, RFC1918, RFC4193) before touching Chrome.Per-Bot Chrome Isolation — connects over CDP (
--remote-debugging-portbound to127.0.0.1) with separate Chrome profiles per agent.
Related MCP server: chrome-browser-bridge
Exposed MCP Tools
Tool | Description |
| Open URL (validated for scheme + SSRF + domain-map routing) |
| Read page state (DOM elements or screenshot + element bboxes) |
| Click element by ref ( |
| Fill/type text into ref ( |
| Extract page text / structured elements (or visual capture in CUA) |
| Capture screenshot (returned as standard MCP |
| Wait for load state, CSS selector, or text |
| Navigate back |
| Reload current page |
| Submit active form (gated by |
Requirements
Node.js >= 22.5
Chrome / Chromium (for live CDP sessions)
Install & Verify
npm install
npm run typecheck
npm test
npm run buildQuick Start
1. Start Chrome with CDP (or use the wire script)
npx tsx scripts/wire-browser-router.ts \
--port 9222 \
--config examples/browser-router.yaml \
--launch-chrome \
--headless2. Run the MCP Server (stdio)
BROWSER_ROUTER_CONFIG=examples/browser-router.yaml \
CHROME_CDP=http://127.0.0.1:9222 \
npm start3. Wire into DeepSeek Harness (dsh)
npm run wire generates browser-router.mcp.yml matching @deepseek-ai/dsh-mcp-client:
- id: mcp-browser-router
name: '@deepseek-ai/dsh-mcp-client'
config:
serverName: browser_router
transport: stdio
command: npx
args:
- tsx
- <path-to-repo>/src/mcp.ts
env:
CHROME_CDP: 'http://127.0.0.1:9222'
BROWSER_ROUTER_CONFIG: '<path-to-repo>/examples/browser-router.yaml'4. Domain-Map Configuration (examples/browser-router.yaml)
browser:
default_backend: playwright
rules:
- match: "*.amazon.com"
backend: playwright
- match: "*.linkedin.com"
backend: cua
- match: "*.google.com/recaptcha*"
backend: cua
escalation:
enabled: true
signals: [blocked, login_required, empty, locator_not_found, timeout]
cost_guard:
max_cua_steps: 8
max_cua_budget_tokens: 20000
require_approval_submit: true
allow_private_network: false
allow_data_urls: falseArchitecture & Design
See docs/design.md for the full architecture, result contract, escalation state machine, and multi-bot isolation model.
License
MIT
Available Tools
10 toolsbrowse_clickA
Bấm phần tử theo ref từ snapshot (r-), hoặc toạ độ dạng '@x,y' (chỉ dùng ở CUA khi không có ref).
Inputs: ref (required).
browse_extractC
Trích xuất dữ liệu theo mục tiêu (goal) từ trang hiện tại.
Inputs: goal (required).
browse_go_backA
Quay lại trang trước.
Inputs: no named parameters.
browse_refreshB
Tải lại trang.
Inputs: no named parameters.
browse_screenshotC
Chụp ảnh trang (base64).
Inputs: full_page.
browse_snapshotC
Đọc trạng thái trang (elements + text/ảnh tuỳ backend).
Inputs: no named parameters.
browse_submitA
Nộp form hiện tại (Enter). Bị chặn bởi require_approval_submit: trả needs_human thay vì tự động thực hiện.
Inputs: no named parameters.
browse_typeB
Gõ text vào phần tử theo ref (r-) hoặc toạ độ '@x,y'.
Inputs: ref (required), text (required).
browse_waitD
Chờ load / selector / text.
Inputs: value, condition, timeout_ms.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Most tools target distinct browser actions (navigate, click, type, wait, back, refresh, submit). The read-oriented tools snapshot/extract/screenshot overlap somewhat, but their descriptions distinguish page elements, goal-based extraction, and image capture.
All tools use a consistent browse_ prefix followed by a snake_case action verb or verb phrase. The pattern is predictable and readable throughout the set.
Ten tools is well-scoped for a browser automation server. Each tool corresponds to a clear, useful operation in the browse interaction loop.
The core browser lifecycle is covered: navigation, page inspection, interaction, extraction, screenshots, waiting, history, refresh, and form submission. Minor gaps remain for advanced interactions such as scrolling, hover, select dropdowns, or JavaScript evaluation, but agents can often work around these.
Maintenance
Related MCP Connectors
Control a real browser from AI agents: navigate, click, type, screenshot, read the page.
AI-powered web automation. Navigate websites using AI agents for one page or a thousand
AI-powered web automation. Navigate websites using AI agents for one page or a thousand
Stealth web automation for AI agents. Login, signup, navigate, screenshot.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to drive a real Chrome browser for autonomous web tasks, using fast typed decisions with calibrated confidence, human-in-the-loop questions, safety gates, and full debug traces.7MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to control a real, authenticated Chrome browser through native tools for navigation, DOM interaction, form filling, scraping, screenshots, and human-in-the-loop checkpoints while minimizing tokens and latency.MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to browse and interact with web pages through a token-efficient, structured representation of each page rather than raw accessibility-tree dumps. Agents get compact page orientations, targeted element queries, and full interaction—clicking, typing, form filling, screenshots, and session management—while controlling how much detail is returned per call.4 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to drive a real Chromium browser by receiving compact, token-efficient page maps and only the changes after each action. It guards against hidden prompt injections, blocks payments, sends and deletions until the user approves, and lets agents learn site-specific notes over time.1MIT