Skip to main content
Y

local-browser-mcp

yangdw2024/local-browser-mcp

Connects DSH to your existing local Chrome, Edge, or Brave browser over CDP via 19 MCP tools: auto-discovers browsers and user profiles, preserves cookies and institutional sessions, handles Cloudflare/CAPTCHA pauses with human-in-the-loop waiting, extracts links and downloads authenticated files, and adds a Local browser settings panel. Its HTTP routes have no DSH access check, so a web page open in your browser could call them.

Install

dsh plugin --profile web add github:yangdw2024/local-browser-mcp

README

local-browser-mcp

English | 简体中文

CI npm version License: MIT

Zero-terminal, one-click MCP server & native DeepSeek Harness (DSH) bundle that connects your AI agents — DeepSeek Harness (DSH), OpenAI Codex, Antigravity, Doubao / Trae, Claude Code, Claude Desktop, Cursor — directly to your real local Chrome, Edge, or Brave browser over CDP.

Auto-discovers installed browsers and user profiles, lets you switch browsers/accounts visually in DSH Settings → Local browser or the Web Setup Wizard, connects directly to your running Chrome/Edge 136+ window via inspect/#remote-debugging, bypasses Cloudflare 403 on RSC/Wiley/ACS/Elsevier/Springer, and downloads PDF & Supporting Information (SI) files using your real institutional session.

Architecture


Easiest Setup (No Manual Config Editing!)

Option 1: DeepSeek Harness (DSH) — Native Bundle + Built-in Settings Page

  1. Tell DSH in chat: "Install plugin local-browser-mcp" (or install local-browser-mcp in Plugin Manager).
  2. Open Settings → Local browser (or Plugins → Local browser bridge) inside DSH to view all auto-discovered browsers (Chrome / Edge / Brave), see detected profiles/accounts, switch your active browser anytime without restarting, or launch a dedicated persistent window.

Option 2: Visual One-Click Setup Wizard (All Other Agents)

In the visual wizard page:

  1. Pick any auto-discovered browser (Auto / Chrome / Edge / Brave) & account, or click Launch Dedicated Window (or enable chrome://inspect/#remote-debugging / edge://inspect/#remote-debugging in your everyday browser).
  2. Click "One-Click Enable Selected" — automatically detects Codex, Antigravity, Trae / Trae CN (Doubao IDE), Claude, and Cursor, creates timestamped backups, and writes safe MCP configs.

Option 3: One-Line Auto-Install

npx -y local-browser-mcp install
# Remove later:
npx -y local-browser-mcp uninstall

Why local-browser-mcp?

FeatureHeadless / web_fetchlocal-browser-mcp
Cloudflare 403 / TLS fingerprintBlocked immediatelyUses your real Chrome / Edge / Brave binary & TLS stack
Campus VPN / Institutional SSO / CookiesNo login stateConnects directly to your everyday Chrome/Edge (inspect/#remote-debugging) or persistent profile
Auto-discovery & switchingFixed to one browserAuto-discovers Chrome, Edge, Brave & all user profiles; switch live with browser_select or DSH Settings
Cloudflare Turnstile / CAPTCHAStuck foreverAuto-detects EN/ZH challenge pages + browser_wait_for_human resumes automatically once clicked
Downloading PDFs / SI behind authFails with 403 / login pagebrowser_download uses authenticated in-page fetch() + native CDP download fallback
Multi-agent compatibilityLocked to one appNative DSH bundle + standard MCP (stdio & Streamable HTTP) for Codex, Antigravity, Doubao/Trae, Claude, Cursor
Heavy browser downloads (300 MB+)Downloads separate ChromiumZero browser binaries downloaded — uses the Chrome/Edge you already have

Available MCP Tools (19)

ToolDescription
browser_statusCheck CDP connection, active preference, browser version, open tabs, and detected browsers
browser_discoverAuto-discover installed browsers (Chrome/Edge/Brave), live debugging status, and all user profiles
browser_selectSwitch preferred browser (auto | chrome | edge | brave | chromium) & profile immediately
browser_tabsList open page tabs (tab_id, title, url)
browser_navigateNavigate to a URL (optionally in a new tab) and auto-detect Cloudflare / CAPTCHA challenges
browser_snapshotCompact numbered DOM snapshot of visible & interactive elements with ref IDs and bounding boxes
browser_extract_textExtract clean visible text from the page or a CSS selector
browser_extract_linksScan the current page for PDF, Supporting Information (SI), dataset, and DOI links
browser_clickClick by ref, CSS selector, or viewport x/y
browser_typeInsert text into focused element or target (ref / selector / x,y)
browser_pressPress a keyboard key (Enter, Tab, Escape, arrows, etc.)
browser_scrollScroll page with real mouse-wheel events
browser_screenshotCapture viewport or clipped region as PNG/JPEG image
browser_downloadAuthenticated file download inside the real browser session (with native CDP download fallback)
browser_wait_for_humanFocuses the tab and waits for you to click a Cloudflare Turnstile / CAPTCHA / SSO login, resuming automatically
browser_evaluateRun async JavaScript in the page context and return JSON result
browser_consoleRead captured console logs & uncaught exceptions
browser_networkInspect recent network requests (status, MIME type, URLs)
browser_close_tabClose a specific tab or active tab

Advanced: CLI Reference & Manual Configuration
local-browser-mcp ui        [--port 0] [--cdp-url http://127.0.0.1:9222]
local-browser-mcp select    [--channel auto|chrome|edge|brave] [--profile-dir "Profile 18"] [--download-dir <dir>]
local-browser-mcp install   [--clients codex,cursor] [--all] [--dry-run]
local-browser-mcp uninstall [--clients codex,cursor] [--dry-run]
local-browser-mcp launch    [--channel chrome|edge|brave] [--port 9222]
local-browser-mcp doctor    [--cdp-url http://127.0.0.1:9222]
local-browser-mcp serve     [--cdp-url <url>] [--auto-launch] [--channel <name>] [--download-dir <dir>] [--http --port 3845]
local-browser-mcp setup     [--client dsh|codex|antigravity|doubao|trae|claude-code|claude-desktop|cursor|all]

Security Note

  • Both the visual wizard and CDP bind strictly to 127.0.0.1 (localhost only). The wizard enforces per-session CSRF tokens and Host header checks; DSH Host routes enforce loopback/dsh-app:// origin validation.
  • Preferences are stored locally at ~/.local-browser-mcp/config.json.

License

MIT © yangdw2024

Related plugins