Browser Mcp Cdp

io.github.zhiqi-li由 GitHub 帳號 zhiqi-li 發布v0.1.2更新於 Oct 27, 2026

Local Chrome via CDP with profile-snapshot isolation and shared-broker multi-client support

概覽

AI 產生的概覽

透過 Chrome DevTools 協定驅動本機真實 Chrome 的 MCP 伺服器,使用 Chrome 設定檔的暫時副本,讓助理看到你已登入的工作階段。

可以做什麼
  • 開啟網址並回傳最終 URL、標題、頁面或元素的可見文字與 HTML
  • 在頁面中執行 JavaScript 並取回結果
  • 擷取 PNG 截圖,依像素捲動頁面
  • 依 CSS 選擇器或像素座標點擊,填寫輸入框、文字區域與下拉選單,等待選擇器出現
  • 列出已開啟的分頁並新增分頁
  • 透過獨立背景 broker 程序讓多個 MCP 用戶端共用同一個 Chrome 實例
適用情境
適合需要在你已登入的網站(例如網頁信箱、內部儀表板、銀行入口)中操作的場合,不必把憑證交給雲端瀏覽器。也適合多個 MCP 用戶端需要共用同一個瀏覽器工作階段的設定。
執行需求
以本機程序方式透過 npx 執行(npm 套件 browser-mcp-cdp),需要 Node 18+ 與已安裝的 Google Chrome。選用環境變數可指定 Chrome 路徑、設定檔根目錄、broker 通訊端與鎖定檔路徑以及 broker 閒置逾時。僅支援桌面端。
安裝前請注意
助理可在已登入你帳號的瀏覽器中執行任意 JavaScript,並在工作階段期間讀取 Cookie、工作階段權杖以及對你可見的任何資料。僅在你信任的模型與提示下使用。設定檔快照可避免對真實 Chrome 設定造成持續性修改,但暫時副本只在 broker 閒置逾時結束後才會刪除。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Browser Mcp Cdp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

browser-mcp-cdp

A Model Context Protocol (MCP) server that drives your real local Chrome via the Chrome DevTools Protocol. Designed for agents that need access to your logged-in sessions (Gmail, internal dashboards, banking, etc.) without uploading credentials to a cloud service.

Why another browser MCP?

Different tradeoffs from the alternatives:

browser-mcp-cdpPlaywright MCPChrome DevTools MCP
BrowserYour local ChromeManaged Playwright ChromiumYour local Chrome
Login state✅ Snapshot of your profile (cookies, logins, IndexedDB)❌ Fresh profile✅ Real profile (modifies it)
Profile isolation✅ Copy-on-start, real profile untouchedN/A⚠️ Direct attach
Multi-client✅ Shared broker across MCP clients❌ Per-client❌ Per-client
DependenciesNode only (no Playwright download)Playwright + browsersNode only

The profile snapshot pattern means you can ask an agent to "check my email" — it sees your Gmail logged in — but the agent's actions never modify your real Chrome profile. Each session gets a disposable copy.

Install

bash
claude mcp add browser -- npx -y browser-mcp-cdp

Or add manually to ~/.claude.json / Claude Desktop config:

json
{  "mcpServers": {    "browser": {      "command": "npx",      "args": ["-y", "browser-mcp-cdp"]    }  }}

Requires Node 18+ and Google Chrome installed.

Tools

ToolPurpose
browser_navigateLoad a URL, return final URL + title
browser_evaluateRun JS in the page, return result
browser_screenshotPNG of current page
browser_clickClick via CSS selector
browser_click_atClick at pixel coordinates (pierces iframes / overlays)
browser_fillSet value on input/textarea/select
browser_wait_forWait for a selector to appear
browser_get_urlCurrent URL
browser_get_textVisible text of page or element
browser_get_htmlouterHTML of page or element
browser_scrollScroll by (x, y) pixels
browser_tabsList open tabs
browser_new_tabOpen a new tab

Environment variables

VarDefault
BROWSER_MCP_CHROME_PATHAuto-detected per OS
BROWSER_MCP_CHROME_PROFILE_ROOTOS-standard Chrome profile dir
BROWSER_MCP_BROKER_SOCKET_PATH~/.browser-mcp/broker.sock
BROWSER_MCP_BROKER_LOCK_PATH~/.browser-mcp/broker.lock
BROWSER_MCP_BROKER_IDLE_TIMEOUT_MS600000 (10 min)

How it works

  1. First MCP client connection spawns a broker subprocess (detached).
  2. Broker copies your Chrome profile's cookies/local storage/login data to a temp dir.
  3. Broker launches Chrome with --user-data-dir=<temp> and --remote-debugging-port.
  4. Subsequent MCP clients connect to the same broker over a Unix socket → they share one Chrome.
  5. Broker exits after BROKER_IDLE_TIMEOUT_MS of no activity; temp profile is deleted.

Security

This server lets an LLM execute arbitrary JavaScript in a browser that is logged into your accounts. Only use with models and prompts you trust. Profile snapshotting limits damage (no persistent mutations to your real Chrome), but the agent can read cookies, session tokens, and any data visible to logged-in you for the duration of the session.

License

MIT

來源:README.md,提交 0cf6e0b

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.2最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分