Skip to main content
Glama
Daytona Playwright MCP Server

Daytona Playwright MCP Server

by jamesmurdza

Daytona Playwright MCPサーバー

Daytonaクラウドサンドボックス内で実行されるステルスpatchright+Chromeブラウザを制御できるMCP(Model Context Protocol)サーバーです。Claude Code、Claude Desktop、またはMCP互換クライアントで使用して、Webブラウジング、スクリーンショット撮影、フォーム入力などを行うことができます。

https://github.com/user-attachments/assets/23b13e1f-4ed3-4204-ad0d-b2fdb1f77d0d

特徴

  • ステルスChrome: 仮想ディスプレイにレンダリングされた本物のChrome(patchrightのステルスパッチ経由、ヘッドレスではありません)

  • ライブVNCビュー: browser_startが返す署名付きプレビューURLでサンドボックスのデスクトップをストリーミングするため、Claudeの操作をリアルタイムで確認可能

  • クラウドサンドボックス: ブラウザはローカルマシンから隔離されたDaytonaサンドボックス内で安全に実行

  • 豊富なツールセット: ナビゲーション、クリック、入力、スクロール、スクリーンショット撮影、コンテンツ抽出、タブ管理

  • スクリーンショット対応: Claudeが認識・分析可能な画像としてスクリーンショットを返却

  • 複数のトランスポート: stdio(デフォルト)、SSE、HTTPに対応

Related MCP server: Glance

クイックスタート

1. パッケージのインストール

pipx install git+https://github.com/jamesmurdza/playwright-daytona-mcp-server.git

2. Daytona APIキーの取得

  1. daytona.ioでサインアップ

  2. ダッシュボードに移動し、APIキーを生成

3. Claude Code / Claude Desktopの設定

MCP設定に以下を追加します:

{
  "mcpServers": {
    "daytona-playwright": {
      "command": "daytona-playwright-mcp",
      "env": {
        "DAYTONA_API_KEY": "your-api-key-here"
      }
    }
  }
}

使用方法

設定が完了したら、ClaudeにWebブラウジングを依頼できます:

"Start a browser and go to https://news.ycombinator.com"

"Take a screenshot of the page"

"Click on the first article link"

"Search for 'AI news' on Google and show me the results"

"Fill out the contact form on example.com with test data"

ワークフロー

  1. ブラウザの起動: Claudeがbrowser_startを呼び出し、Daytonaサンドボックスを作成してChromeを起動

  2. ナビゲーションと操作: ナビゲーション、クリック、入力などのツールを使用

  3. スクリーンショット撮影: browser_screenshotでページの状態を確認

  4. クリーンアップ: 終了時にbrowser_stopを呼び出し、サンドボックスを削除

利用可能なツール

ブラウザのライフサイクル

ツール

説明

browser_start

Daytonaサンドボックスで新しいブラウザセッションを開始

browser_stop

ブラウザを停止し、サンドボックスをクリーンアップ

browser_status

ブラウザが実行中か確認

ナビゲーション

ツール

説明

browser_navigate

URLへ移動

browser_back

履歴を戻る

browser_forward

履歴を進む

browser_refresh

現在のページを更新

操作

ツール

説明

browser_click

要素をクリック(CSS、XPath、またはテキストセレクタ)

browser_type

入力フィールドにテキストを入力

browser_press

キーボードキーを押下(Enter、Tabなど)

browser_hover

要素にホバー

browser_select

ドロップダウンから選択

browser_scroll

ページまたは要素をスクロール

コンテンツ抽出

ツール

説明

browser_screenshot

スクリーンショットを撮影(ページ全体または要素)

browser_get_text

ページからテキストコンテンツを取得

browser_get_html

HTMLコンテンツを取得

browser_get_attribute

要素の属性を取得

browser_evaluate

JavaScriptを実行して結果を取得

待機

ツール

説明

browser_wait_for_selector

要素の表示/非表示を待機

browser_wait_for_navigation

ナビゲーションの完了を待機

タブ管理

ツール

説明

browser_new_tab

新しいタブを開く

browser_list_tabs

開いているすべてのタブを一覧表示

browser_switch_tab

別のタブに切り替え

browser_close_tab

タブを閉じる

ファイル操作

ツール

説明

browser_upload_file

ファイル入力にファイルをアップロード

異なるトランスポートでの実行

Stdio(デフォルト - Claude Code/Desktop用)

daytona-playwright-mcp

HTTPトランスポート(リモート接続用)

daytona-playwright-mcp --transport http --host 0.0.0.0 --port 8765

その後、http://localhost:8765/mcp経由で接続します。

SSEトランスポート(レガシー)

daytona-playwright-mcp --transport sse --host 0.0.0.0 --port 8765

環境変数

変数

説明

デフォルト

DAYTONA_API_KEY

Daytona APIキー(必須)

-

DAYTONA_API_URL

Daytona APIサーバーURL

https://app.daytona.io/api

開発

ソースから実行

# Clone the repository
git clone https://github.com/jamesmurdza/playwright-daytona-mcp-server.git
cd playwright-daytona-mcp-server

# Install dependencies
uv sync

# Run the server
uv run daytona-playwright-mcp

開発用MCPの設定

ローカルで開発する場合は、以下のMCP設定を使用してください:

{
  "mcpServers": {
    "daytona-playwright": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/playwright-daytona-mcp-server", "daytona-playwright-mcp"],
      "env": {
        "DAYTONA_API_KEY": "your-api-key-here"
      }
    }
  }
}

テストの実行

uv run pytest

仕組み

  1. browser_startを呼び出すと、サーバーは以下の処理を行います:

    • 最小限のDaytonaサンドボックスイメージを宣言的にビルド(computer_use用のxfce + VNCスタック、およびChromeチャネル付きのpatchright)

    • computer_useを起動し、サンドボックスのデスクトップをポート6080でストリーミング(返される「ライブビュー」URL)

    • patchright経由でChromeをDISPLAY=:0で起動し、CDPを0.0.0.0:9222にバインド(起動時にpatchrightのステルスパッチが適用されるため、TCPプロキシは不要)

    • Daytonaの安全なプレビューURLを通じて、署名付きCDP WebSocket経由でChromeに接続

  2. すべてのブラウザコマンドは、リモートブラウザに接続された非同期Playwright APIを通じて実行されます

  3. スクリーンショットはPNG画像としてキャプチャされ、MCPの画像コンテンツタイプ経由で返されます

  4. browser_stopを呼び出すと、サンドボックスが削除され、すべてのリソースが解放されます

クレジット

Available Tools

26 tools
browser_backB

Navigate back in browser history.

Inputs: no named parameters. Returns: result

browser_clickA

Click on an element on the page.

Supports CSS selectors, XPath, and text selectors. Examples:

  • CSS: "button.primary", "#submit-btn", "[data-testid='login']"

  • XPath: "//button[@type='submit']"

  • Text: "text=Sign In", "text=Submit"

Inputs: selector (required), button, click_count, timeout. Returns: result

browser_close_tabB

Close a browser tab.

Inputs: index. Returns: result

browser_download_waitA

Wait for a download to start and complete, returning the downloaded file path.

Call this before triggering the download action.

Inputs: timeout. Returns: result

browser_evaluateA

Execute JavaScript in the page context and return the result.

Examples:

  • "document.title"

  • "window.location.href"

  • "document.querySelectorAll('a').length"

  • "JSON.stringify(localStorage)"

Inputs: script (required). Returns: result

browser_forwardB

Navigate forward in browser history.

Inputs: no named parameters. Returns: result

browser_get_attributeB

Get an attribute value from an element.

Inputs: selector (required), attribute (required), timeout. Returns: result

browser_get_htmlB

Get HTML content from the page or a specific element.

Inputs: selector, outer. Returns: result

browser_get_textB

Get text content from the page or specific elements.

Inputs: selector, timeout. Returns: result

browser_hoverB

Hover over an element on the page.

Inputs: selector (required), timeout. Returns: result

browser_list_tabsA

List all open tabs with their URLs and titles.

Inputs: no named parameters. Returns: result

browser_navigateB

Navigate the browser to a URL.

Inputs: url (required), wait_until. Returns: result

browser_new_tabA

Open a new browser tab and switch to it.

Inputs: url. Returns: result

browser_pressB

Press a keyboard key, optionally on a specific element.

Key examples: Enter, Tab, Escape, Backspace, Delete, ArrowUp, ArrowDown, Control+a, Control+c, Control+v, Shift+Tab, Alt+F4

Inputs: key (required), selector, timeout. Returns: result

browser_refreshB

Refresh the current page.

Inputs: no named parameters. Returns: result

browser_screenshotC

Take a screenshot of the current page or a specific element.

Returns the screenshot as an image that can be displayed.

Inputs: full_page, selector.

browser_scrollB

Scroll the page or a specific element.

Inputs: direction, amount, selector. Returns: result

browser_selectA

Select an option from a dropdown ( element).

Provide one of: value, label, or index.

Inputs: selector (required), value, label, index, +1 more. Returns: result

browser_startA

Start a new browser session in a Daytona sandbox.

This creates a cloud sandbox with Chrome installed, launches the browser, and establishes a connection for remote control. Must be called before using any other browser tools.

Inputs: timeout. Returns: result

browser_statusB

Check the current status of the browser session.

Inputs: no named parameters. Returns: result

browser_stopA

Stop the browser and clean up the Daytona sandbox.

Call this when you're done using the browser to free up resources.

Inputs: no named parameters. Returns: result

browser_switch_tabB

Switch to a different browser tab by index.

Inputs: index (required). Returns: result

browser_typeB

Type text into an input field or editable element.

Inputs: selector (required), text (required), clear_first, delay, +1 more. Returns: result

browser_upload_fileB

Upload a file to a file input element.

Note: The file must exist on the machine running this MCP server.

Inputs: selector (required), file_path (required), timeout. Returns: result

browser_wait_for_navigationB

Wait for a navigation to complete.

Inputs: url, timeout. Returns: result

browser_wait_for_selectorB

Wait for an element to reach a specific state.

States:

  • attached: Element is in the DOM

  • detached: Element is removed from the DOM

  • visible: Element is visible on the page

  • hidden: Element is hidden or removed

Inputs: selector (required), state, timeout. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 26 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose with no ambiguity. For example, browser_click is for clicking, browser_type is for typing, browser_screenshot is for capturing images, and browser_wait_for_selector is for waiting on element states. The descriptions reinforce these distinctions, making misselection unlikely.

    Naming Consistency5/5

    All tools follow a consistent 'browser_verb' or 'browser_verb_noun' naming pattern (e.g., browser_back, browser_click, browser_screenshot). This uniformity makes the tool set predictable and easy to navigate, with no deviations in style or convention.

    Tool Count3/5

    With 26 tools, the count feels heavy for a browser automation server, though not extreme. While it covers many operations, some tools could potentially be consolidated (e.g., browser_back and browser_forward are simple navigations), making the set borderline in scope.

    Completeness5/5

    The tool set provides complete coverage for browser automation, including session management (start, stop, status), navigation, interaction (click, type, hover), inspection (get_html, get_text), and utilities (screenshot, download). There are no obvious gaps, and agents can handle typical workflows without dead ends.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      An MCP server that provides AI models with full browser automation capabilities through Chrome. It enables navigation, interaction, screenshots, and complete DevTools access by bridging AI clients with a companion Chrome extension.
      99
      11 npm
      3
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server to control Chrome browsers locally or remotely via the Claude extension, enabling navigation, form filling, screenshots, and JavaScript execution from any MCP client.
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Local browser automation MCP server for Claude Code, enabling navigation, clicking, typing, and inspecting real web pages via Google Chrome.
      1
      MIT