dev-browser-mcp
dev-browser-mcp
MCPサーバー for SawyerHood/dev-browser。エージェントは、サンドボックス化されたJavaScriptと少数の構造化ツールを使用して、永続的なChromium(または既に実行中のChrome)を操作します。
リポジトリ: github.com/kamkozlowski/dev-browser-mcp
スクリプトはNode.jsではなくQuickJSで実行されます。名前付きページは、dev-browser デーモンを介してツール呼び出し間で永続化されます。
dev-browser(CLI + Playwright Chromium)はこのパッケージの依存関係です。npm install はCLIをダウンロードし、Chromiumをインストールします。グローバルな dev-browser のインストールは不要です。Chromiumのダウンロードをスキップするには DEV_BROWSER_SKIP_CHROMIUM=1 を設定します(たとえば、既存のChromeに接続するだけの場合)。DEV_BROWSER_BIN は引き続きバンドルされたCLIを上書きします。
インストール
クローンしてビルド:
git clone https://github.com/kamkozlowski/dev-browser-mcp.git
cd dev-browser-mcp
npm install
npm run buildまたはGitHubのtarballからインストール:
npm pack github:kamkozlowski/dev-browser-mcp
tar -xzf dev-browser-mcp-*.tgz
cd package
npm install
npm run buildRelated MCP server: Cloudflare Playwright MCP
Cursor 設定
~/.cursor/mcp.json(またはプロジェクトの .cursor/mcp.json)に追加します。
推奨: GitHub からブートストラップ (~/.cache 下にキャッシュ)
ローカルクローンは不要です。初回起動時にCursorがパッケージをダウンロードし、依存関係をインストールし、ビルドしてサーバーを起動します:
{
"mcpServers": {
"dev-browser": {
"command": "bash",
"args": [
"/ABS/PATH/TO/dev-browser-mcp/scripts/bootstrap-mcp.sh"
],
"env": {
"DEV_BROWSER_HEADLESS": "true"
}
}
}
}ローカルクローンを保持しない場合は、次のワンライナーを使用します(scripts/bootstrap-mcp.sh と同じロジック):
{
"mcpServers": {
"dev-browser": {
"command": "bash",
"args": [
"-lc",
"CACHE=\"${XDG_CACHE_HOME:-$HOME/.cache}/dev-browser-mcp\"; LOCK=\"$CACHE/.install.lock\"; PKG=\"$CACHE/package\"; ENTRY=\"$PKG/dist/index.js\"; mkdir -p \"$CACHE\"; install() { cd \"$CACHE\" && rm -rf package dev-browser-mcp-*.tgz && npm pack github:kamkozlowski/dev-browser-mcp >/dev/null && tar -xzf dev-browser-mcp-*.tgz && rm -f dev-browser-mcp-*.tgz && cd package && npm install && npm run build; }; if [ ! -f \"$ENTRY\" ]; then ( flock -n 9 || flock 9; [ -f \"$ENTRY\" ] || install ) 9>\"$LOCK\"; fi; [ -f \"$ENTRY\" ] || { echo \"Install failed; rm -rf $CACHE\" >&2; exit 1; }; cd \"$PKG\" && exec node dist/index.js"
],
"env": {
"DEV_BROWSER_HEADLESS": "true"
}
}
}
}サーバーが Cannot find module .../dist/index.js で起動に失敗した場合は、壊れたキャッシュを削除して再試行します:
rm -rf "${XDG_CACHE_HOME:-$HOME/.cache}/dev-browser-mcp"Chromiumを起動する代わりに実行中のChromeにアタッチするには:
{
"mcpServers": {
"dev-browser": {
"command": "bash",
"args": [
"-lc",
"CACHE=\"${XDG_CACHE_HOME:-$HOME/.cache}/dev-browser-mcp\"; LOCK=\"$CACHE/.install.lock\"; PKG=\"$CACHE/package\"; ENTRY=\"$PKG/dist/index.js\"; mkdir -p \"$CACHE\"; install() { cd \"$CACHE\" && rm -rf package dev-browser-mcp-*.tgz && npm pack github:kamkozlowski/dev-browser-mcp >/dev/null && tar -xzf dev-browser-mcp-*.tgz && rm -f dev-browser-mcp-*.tgz && cd package && npm install && npm run build; }; if [ ! -f \"$ENTRY\" ]; then ( flock -n 9 || flock 9; [ -f \"$ENTRY\" ] || install ) 9>\"$LOCK\"; fi; [ -f \"$ENTRY\" ] || { echo \"Install failed; rm -rf $CACHE\" >&2; exit 1; }; cd \"$PKG\" && exec node dist/index.js"
],
"env": {
"DEV_BROWSER_CONNECT": "auto",
"DEV_BROWSER_SKIP_CHROMIUM": "true"
}
}
}
}Chromeで chrome://inspect/#remote-debugging でリモートデバッグを有効にするか、--remote-debugging-port=9222 で起動します。
ローカルクローン (シンプル)
チェックアウト内で npm install と npm run build を実行後:
{
"mcpServers": {
"dev-browser": {
"command": "node",
"args": ["/ABS/PATH/TO/dev-browser-mcp/dist/index.js"],
"env": {
"DEV_BROWSER_HEADLESS": "true"
}
}
}
}ローカルクローン (自己ブートストラップ, bash)
dist/ が存在しない場合、Cursorが初回起動時にインストールとビルドを実行します:
{
"mcpServers": {
"dev-browser": {
"command": "bash",
"args": [
"-lc",
"REPO=\"/ABS/PATH/TO/dev-browser-mcp\"; if [ ! -f \"$REPO/dist/index.js\" ]; then cd \"$REPO\" && npm install && npm run build; fi; cd \"$REPO\" && exec node dist/index.js"
],
"env": {
"DEV_BROWSER_HEADLESS": "true"
}
}
}
}REPO をチェックアウトパスに置き換えます。
開発 (TypeScript, ビルド不要)
{
"mcpServers": {
"dev-browser": {
"command": "bash",
"args": [
"-lc",
"REPO=\"/ABS/PATH/TO/dev-browser-mcp\"; cd \"$REPO\" && exec npx --yes tsx src/index.ts"
],
"env": {
"DEV_BROWSER_HEADLESS": "true"
}
}
}
}REPO をチェックアウトパスに置き換えます。
ツール
ツール | 目的 |
| メインツール。 サンドボックス化されたPlaywrightスクリプトを実行します。 |
| タブを一覧表示: |
| 名前付きページを取得/作成(またはtargetIdでアタッチ) |
| 名前付きページを閉じる |
| ナビゲート |
| AIアクセシビリティスナップショット( |
| PNGスクリーンショット(画像としても返される) |
| CSSセレクタまたはスナップショット参照でクリック |
| 入力を埋める |
| 1文字ずつタイプ |
| ページ内でJavaScriptを |
| セレクタを待つ |
| デーモンの状態 |
| 管理対象のブラウザインスタンス |
| デーモンを停止 |
| Playwright Chromiumをインストール |
完全なサンドボックスAPIについては dev-browser://guide を参照してください。page.cua(ビジョン)や page.domCua(DOM ID)などが含まれます。
環境
変数 | 意味 |
| バンドルされた |
|
|
| 名前付きデーモンブラウザインスタンス(デフォルト: |
|
|
|
|
|
|
| スクリプトのタイムアウト(秒)(デフォルト: |
| アイドル状態の起動済みブラウザを閉じる(例: |
呼び出しごとの browser、connect、headless、ignoreHttpsErrors、timeoutSeconds は環境変数を上書きします。
Playwright MCP との違い
dev-browser は、長い原子MCP呼び出しの連鎖ではなく、決定ごとに1つのサンドボックス化されたスクリプトを中心に構築されています。単一のgoto/click/fillを超える場合は dev_browser_run を使用してください。一般的な検査/操作手順を構造化したままにするために便利なツールも存在します。
benkraus/dev-browser-mcp(Chrome拡張機能 + CDPリレー)とは異なり、このサーバーは公式の dev-browser CLIをそのQuickJSサンドボックスと永続的なデーモンページでラップしています。
開発
npm test
npm run typecheck
npm run buildMaintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityCmaintenanceEnables AI assistants to control a browser through a set of tools, allowing them to perform web automation tasks like navigation, typing, clicking, and taking screenshots.
- Flicense-qualityCmaintenanceEnables AI assistants to control a browser through a set of tools, allowing them to perform web automation tasks like navigation, typing, clicking, and taking screenshots.
- Flicense-qualityCmaintenanceEnables AI assistants to control a browser through a set of tools, allowing them to perform web automation tasks like navigation, typing, clicking, and taking screenshots.
- AlicenseBqualityFmaintenanceEnables AI agents to directly control your real Chrome browser with full context including login sessions, cookies, and open tabs. It provides tools for page scanning, JavaScript execution, CDP control, screenshots, and physical mouse/keyboard input for authentic browser automation.20239MIT
Related MCP Connectors
AI-powered browser automation — navigate, click, fill forms, and extract data from any website.
Provides cloud browser automation capabilities using Stagehand and Browserbase, enabling LLMs to i…
Live browser debugging for AI assistants — DOM, console, network via MCP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/kamkozlowski/dev-browser-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server