
Agent Browser
io.github.codeChap由 GitHub 帳號 codeChap 發布v0.1.0更新於 Oct 26, 2026
MCP server for browser automation via Vercel's agent-browser CLI
概覽
本機 MCP 伺服器,包裝 Vercel 的 agent-browser CLI,讓助理操作真實 Chromium 瀏覽器:導覽、點擊、填表、快照與截圖。
- 可以做什麼
- 導覽頁面,並依載入、URL、文字或選擇器等待
- 透過無障礙樹快照與正規表示式文字擷取檢視頁面內容
- 依元素參照進行點擊、輸入與表單填寫
- 擷取螢幕截圖與 PDF,並管理下載檔案
- 處理 Cookie、工作階段與持久登入狀態,並提供 eval 與 CDP 存取
- 以診斷工具檢查 CLI、設定與常駐程序狀態
- 適用情境
- 適合需要助理操作真實瀏覽器而非抓取文件的場合:填寫表單、點擊需登入的網站、確認頁面實際呈現結果或截圖。它本身不提供搜尋,通常先用搜尋工具找到網址再導覽。
- 執行需求
- 以本機 stdio 程序在桌面環境執行;需先安裝 agent-browser CLI(cargo install agent-browser,再執行 agent-browser install),瀏覽器透過 Playwright 驅動 Chromium。MCP 用戶端需指向建置出的執行檔。可選 TOML 設定位於 ~/.config/mcp-server-agent-browser/config.toml,可用 MCP_AGENT_BROWSER_CONFIG 覆寫;相關設定包括 AGENT_BROWSER_PATH、AGENT_BROWSER_HEADED 與 AGENT_BROWSER_ENCRYPTION_KEY。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Agent Browser,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
mcp-server-agent-browser
Status: Beta — CLI wrapper is covered by unit tests and a fake-browser stdio smoke test. Cookie restore across a real Chromium restart is still a manual check.
Let LLMs drive a real browser. This MCP server wraps agent-browser (Vercel Labs) so any MCP client can navigate, fill forms, click, snapshot the accessibility tree, and screenshot.
It is not Grok's web_search / open_page. Those fetch documents. This one runs Chromium. Use search to find a URL, then browser_navigate.
Prerequisites
Call browser_doctor if anything is missing.
Build
Binary: target/release/mcp-server-agent-browser
Real Chromium login-restore is not in CI. After a headed login, restart the MCP process and confirm the next browser_navigate is still logged in.
Configuration
MCP client (stdio):
Optional TOML at ~/.config/mcp-server-agent-browser/config.toml (see config.example.toml). Missing file uses defaults. Override the path with MCP_AGENT_BROWSER_CONFIG.
allowed_domains is optional. Localhost is allowed unless you set a list that excludes it.
What it can do
Same interaction set as before (navigate, click, type, snapshot, screenshot, cookies, eval, CDP, sessions), plus:
browser_doctor— CLI, config, persist, headed/DISPLAY, daemon guess. Does not launch Chrome.browser_get_textpattern— regex over page text with two lines of context.browser_wait—load/url/textas well as a selector.
Typical loop:
browser_navigatebrowser_snapshot(-ifor interactive)browser_click/browser_fillwith@refsbrowser_screenshotif you need pixels
Persistence
With persist = true (default), each session saves cookies and localStorage on close and on the CLI's autosave interval. State lives under ~/.agent-browser/, namespaced to mcp-server. Isolated session_ids do not share a restore key.
Headed login once, browser_close or exit the MCP, start again. The next navigate should restore that session.
A killed MCP process may leave the daemon running. browser_doctor reports that. Idle shutdown still saves if persist is on.
Limitations
- Chromium via
agent-browser(Playwright). No search. - Headed is ignored until the existing daemon is closed.
- Snap Chromium on Ubuntu can fail to advertise its DevTools port; prefer
agent-browser install's browser orexecutable_path. - Writes (screenshot, pdf, download) must be relative, under
/tmp, or underdownload_dir. - Element screenshots take a CSS selector or
@ref, plus a trailing:has-text("..."). The selector is checked first, so a miss is an error, not a silent full-viewport shot. Not combinable withfull_page. - 25s Playwright action timeout is an upstream CLI limit, not this wrapper.
License
MIT
來源:README.md,提交 7d1010f
工具
0版本歷史
1- v0.1.0最新Sep 16, 2026
評分
已滿足適用檢查項的 40%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
請在儲存庫或註冊中心條目中宣告授權條款。