DOMShell

io.github.apireno由 GitHub 帳號 apireno 發布v2.0.10更新於 Nov 3, 2026

Drive Chrome with filesystem commands (ls, cd, grep, click, type). One MCP tool, multi-agent.

概覽

AI 產生的概覽

把 Chrome 變成虛擬檔案系統,讓 AI 助理用 ls、cd、grep、click、type 等指令瀏覽並操作網頁。

可以做什麼
  • 瀏覽與檢視頁面:用 ls、cd、pwd、cat、find、grep、tree、diff 在對應為檔案與目錄的無障礙樹上定位並讀取內容。
  • 管理分頁:列出分頁、開啟網址、導覽、上一頁與下一頁、重新整理及關閉。
  • 操作頁面:點擊、聚焦、輸入、捲動、選取、送出、等待以及截圖。
  • 擷取結構化資料:抓取連結與表格,執行腳本或 JavaScript,求值運算式。
  • 一次呼叫跑完整流程:多行指令會在同一工作階段中依序執行,lane 與 group_id 讓多個代理各自使用獨立的分頁群組。
適用情境
適合需要讓助理在使用者自己的 Chrome 工作階段中讀取或操作真實網站的場合,例如填寫表單、擷取表格或連結、完成多步驟網頁任務,並希望用精簡的指令詞彙取代原始選擇器與座標。
執行需求
本機需 Node.js 18+(npm 或 npx),支援 macOS、Linux 與 Windows;容器方式需要 Docker Desktop。所有方式都必須安裝 DOMShell Chrome 擴充功能,伺服器透過 WebSocket 橋接與它通訊。驗證權杖由安裝精靈產生或透過 DOMSHELL_TOKEN 設定;寫入與敏感工具需分別加上 --allow-write 與 --allow-sensitive 參數。
安裝前請注意
寫入類工具會在瀏覽器中點擊、輸入、送出並執行 JavaScript,敏感類工具可讀取身分與 Cookie 資料,應謹慎開啟。逐操作確認提示預設關閉,建議搭配 --confirm、網域白名單與稽核日誌限制範圍。驗證權杖用來保護本機 HTTP 端點,不要寫進共用設定。

安裝

在 SourceWeft 中

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

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

其他 MCP 客戶端

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

README

@apireno/domshell

MCP server that turns your browser into a filesystem. AI agents use ls, cd, grep, find, click, and type to browse the web — the same way you'd navigate a Linux filesystem.

DOMShell maps Chrome's Accessibility Tree to a virtual filesystem. Every DOM element becomes a file or directory. Agents work with familiar commands instead of raw selectors and coordinates.

Install

DOMShell supports three install paths — pick whichever fits your setup. Path 1 is the documented default and what 99% of users want; Paths 2 and 3 exist if you want lifecycle management across several MCP servers.

Path 1 — Native CLI (default, simplest)

bash
npm install -g @apireno/domshell

Or run directly without installing:

bash
npx @apireno/domshell

Works on macOS, Linux, and Windows with Node 18+. Nothing else required.

Path 2 — Dockerized (optional)

Run DOMShell in a container — useful if you don't want a global Node install or you want process isolation. Requires Docker Desktop. The token is persisted to a gitignored .env file so it survives container restarts and host reboots:

bash
git clone https://github.com/apireno/DOMShell && cd DOMShell/mcp-servercp .env.example .env# Edit .env and set DOMSHELL_TOKEN to: $(openssl rand -hex 24)docker compose build      # produces domshell-mcp-server:latestdocker compose up -ddocker compose logs -f

The container maps ports 3001 (MCP HTTP) and 9876 (WebSocket bridge to the Chrome extension) to your loopback interface, so the Chrome extension reaches it exactly as it would the native install. restart: unless-stopped brings the container back automatically when Docker Desktop starts (toggle "Start Docker Desktop when you log in" in Docker Settings to make Path 2 fully reboot-resilient).

Path 3 — ToolHive-managed (optional)

Use ToolHive (thv) to manage the container's lifecycle alongside any other MCP servers you're running. Same .env file Path 2 uses, just sourced by thv:

bash
brew tap stacklok/tap && brew install thv      # one-timecd DOMShell/mcp-servercp .env.example .env       # edit DOMSHELL_TOKEN if you haven't alreadydocker compose build       # produces domshell-mcp-server:latest
thv run \  --name domshell-mcp-server \  --transport streamable-http \  --target-port 3001 \  -p 9876:9876 \  --env-file .env \  domshell-mcp-server:latest
thv list                          # workload status (URL on the proxy port)thv logs domshell-mcp-server      # tail logs

The container is reachable on http://127.0.0.1:3001/mcp because --target-port 3001 auto-publishes that port to host loopback — your existing MCP client config (Claude Desktop, Cursor, …) keeps working without changes.

Path 3 needs a one-time launchd agent for reboot autostart (Path 2 survives reboot through Docker Desktop alone). Full reboot table, launchd plist template, autostart script, and a simulated-reboot verification: docs/deploy/container-and-toolhive.md.

Chrome extension (required for all three paths)

You also need the DOMShell Chrome Extension — the MCP server talks to the browser through it.

Quick Start

bash
npx @apireno/domshell init

The setup wizard detects installed MCP clients (Claude Desktop, Cursor, Windsurf), generates a secure token, and writes the config. Use --yes for non-interactive mode.

Then:

  1. Install the DOMShell Chrome Extension
  2. Open Chrome's side panel and start a DOMShell session
  3. Restart your MCP client — DOMShell tools will appear
  4. In the DOMShell terminal, run connect <token> (printed by the wizard)

Claude Desktop Config

Add this to your Claude Desktop MCP settings (claude_desktop_config.json):

json
{  "mcpServers": {    "domshell": {      "command": "npx",      "args": ["-y", "@apireno/domshell", "--allow-write"]    }  }}

For the stdio proxy (required if your client needs command/args format):

json
{  "mcpServers": {    "domshell": {      "command": "npx",      "args": ["-y", "-p", "@apireno/domshell", "domshell-proxy", "--port", "3001", "--token", "YOUR_TOKEN"]    }  }}

Benchmarks

We tested DOMShell against Computer-in-the-Cloud (CiC) — both using Claude as the underlying model — across 4 web tasks over 8 trials.

MetricDOMShellCiC
Avg API calls per task4.38.6
Hardest task (T4)6.0 calls13.0 calls
Cold start vs CiC warm cache4.5 calls5.5 calls

DOMShell uses 2× fewer API calls to complete the same tasks. The filesystem metaphor gives the model a mental map of the page, so it spends less time exploring and more time extracting.

Full experiment data: experiments/claude_domshell_vs_cic

MCP Interface

Default (recommended): the single domshell_execute tool. Pass any DOMShell command as a string — "ls", "cd tabs/123", "open https://example.com" — or pass several newline-separated for a whole workflow in one call. One tool, one approval, the full command vocabulary in the tool description.

Multi-line semantics: when command contains newlines, each line runs in order in the same MCP session and lane, so cwd, env, and history persist between lines. An error on one line does not halt the rest — its message is included in the combined output and subsequent lines still run. This is the right shape for cleanup-line idioms like "cd path\ngrep pattern\ncd back": the trailing restore runs even if the middle step errors. Implementation: mcp-server/index.ts:1115-1136.

Lanes & multi-agent. Every reply ends with [lane: <id>]. Multiple MCP clients can connect simultaneously, each in its own isolated Chrome tab group. To carve sub-lanes within a single client (e.g. two Claude Desktop chats), pass group_id: "new" on the first call and carry the returned id thereafter. See CHANGELOG.md.

Granular mode — --granular

Start the server with --granular and the 38 per-command tools are exposed alongside domshell_execute. Use it when you want per-operation approval in the client UI.

Read tier (always available): ls, cd, pwd, cat, find, grep, tree, text, read, tabs, here, refresh, diff, eval, functions, watch, for, script, each, extract_links, extract_table

Write tier (--allow-write): click, focus, type, scroll, navigate, open, submit, back, forward, close, select, js, screenshot, wait, call

Sensitive tier (--allow-sensitive): whoami

CLI Flags

FlagDescription
--allow-writeEnable write-tier tools (click, type, navigate, etc.)
--allow-sensitiveEnable sensitive-tier tools (whoami)
--allow-allEnable all tiers
--granularExpose the 38 per-command tools alongside domshell_execute
--port NWebSocket port (default: 9876)
--mcp-port NHTTP MCP port (default: 3001)
--domains a.com,b.comRestrict to specific domains
--token TOKENSet auth token (auto-generated if omitted)
--log-file PATHAudit log location (default: audit.log)
--confirmOpt in to per-action y/n prompts in the server terminal before each write. Off by default.
--no-confirmNo-op (kept for backward compatibility — per-action prompts are off by default).

Security

Every command goes through a 4-tier security model:

  • Read — always allowed (ls, find, grep, text)
  • Navigate — requires --allow-write (navigate, open, back, forward)
  • Write — requires --allow-write (click, type, js, select)
  • Sensitive — requires --allow-sensitive (whoami, cookie access)

All commands are logged to an audit file. Domain allowlists restrict which sites the agent can access. Auth tokens protect the HTTP endpoint.

Architecture

MCP Client (Claude, Cursor, etc.)    ↓ HTTP :3001/mcpDOMShell MCP Server (Express + WebSocket)    ↓ WebSocket :9876DOMShell Chrome Extension (CDP 1.3)    ↓ Chrome Debugger ProtocolBrowser DOM + Accessibility Tree

Links

Built by Pireno.

License

MIT

來源:mcp-server/README.md,提交 d313db0

工具

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

版本歷史

1
  1. v2.0.10最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

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

  • 已宣告認證方式10 分

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

  • 已列出工具15 分

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

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