Skip to main content
Glama

Playwright MCP Server

by Kotelberg

Playwright MCP サーバー

英語 |日本語

このプロジェクトは、モデル コンテキスト プロトコル (MCP) を使用して Playwright Web ページ コンテンツ取得機能を提供するサーバーです。

特徴

  • ページナビゲーション
  • 全ページコンテンツ取得
  • 可視コンテンツの検索
  • インタラクティブ要素の検出
  • マウス操作シミュレーション
  • テスト用のエコー機能

インストール

Smithery経由でインストール

Smithery経由で Claude Desktop 用の Playwright MCP Server を自動的にインストールするには:

npx -y @smithery/cli install @showfive/playwright-mcp-server --client claude

手動インストール

npm install

使用法

サーバーの起動

npm run build npm start

MCPツール

利用可能なツールは次のとおりです。

  1. navigate
    • 指定されたURLに移動する
    • 引数: { url: string }
    • 戻り値: ナビゲーション結果
  2. get_all_content
    • ページ全体からコンテンツを取得する
    • 引数: なし
    • 戻り値: ページのすべてのテキストコンテンツ
  3. get_visible_content
    • 現在表示されているコンテンツを取得する
    • 引数: { minVisiblePercentage?: number }
    • 戻り値: 表示されるテキストコンテンツ
  4. get_interactive_elements
    • ページ上のインタラクティブな要素(ボタン、リンクなど)の位置情報を取得します。
    • 引数: なし
    • 戻り値: インタラクティブ要素の座標と境界情報
  5. move_mouse
    • マウスカーソルを指定した座標に移動する
    • 引数: { x: number, y: number }
    • 戻り値: 演算結果
  6. mouse_click
    • 指定された座標でマウスクリックを実行する
    • 引数: { x: number, y: number, button?: "left" | "right" | "middle", clickCount?: number }
    • 戻り値: クリック操作の結果
  7. mouse_wheel
    • マウスホイールスクロールを実行する
    • 引数: { deltaY: number, deltaX?: number }
    • 戻り値: スクロール操作の結果
  8. drag_and_drop
    • ドラッグアンドドロップ操作を実行する
    • 引数: { sourceX: number, sourceY: number, targetX: number, targetY: number }
    • 戻り値: ドラッグアンドドロップ操作の結果
  9. echo
    • テスト用のエコーツール
    • 引数: { message: string }
    • 戻り値: 送信されたメッセージ

発達

テストの実行

# Run all tests npm test # Run tests in watch mode npm run test:watch # Generate coverage report npm run test:coverage

テスト構造

  • tools/*.test.ts : 各ツールの機能テスト
  • mcp-server.test.ts : MCP サーバー機能テスト

実装機能

  1. コンテンツ検索
    • 全ページコンテンツ取得
    • 表示コンテンツのみの取得
    • 適切なHTML解析
  2. 交流
    • インタラクティブ要素の検出と位置情報の取得
    • マウス操作シミュレーション(移動、クリック、スクロール)
    • ドラッグアンドドロップのサポート
  3. エラー処理
    • 適切なナビゲーションエラー処理
    • タイムアウト処理
    • 無効なURLの検出
  4. 構成の柔軟性
    • ヘッドレス/ヘッドモードの選択
    • カスタムユーザーエージェント
    • ビューポートサイズ設定

重要な注意事項

  • MCPサーバーを使用する前に、必要な環境変数が設定されていることを確認してください。
  • ウェブページのコンテンツを取得する際は、対象ウェブサイトの利用規約に従ってください。
  • 複数のリクエストを送信する場合は適切な間隔を維持する
  • マウス操作を行う際は、実際のユーザーインタラクションをシミュレートするため、適切な間隔を維持します。

ライセンス

ISC

-
security - not tested
F
license - not found
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

AI システムがモデル コンテキスト プロトコルを通じて Web ページを参照、コンテンツを取得、対話できるようにするサーバー。

  1. 特徴
    1. インストール
      1. Smithery経由でインストール
      2. 手動インストール
    2. 使用法
      1. サーバーの起動
      2. MCPツール
    3. 発達
      1. テストの実行
      2. テスト構造
    4. 実装機能
      1. 重要な注意事項
        1. ライセンス

          Related MCP Servers

          • -
            security
            A
            license
            -
            quality
            A Model Context Protocol server that enables AI assistants like Claude to browse and analyze Reddit content, including searching subreddits, retrieving post details with comments, and viewing trending posts.
            Last updated -
            1
            Python
            MIT License
            • Apple
          • A
            security
            F
            license
            A
            quality
            A Model Context Protocol server that connects Claude and other AI assistants to your Notion workspace, allowing AIs to interact with databases, pages, and blocks.
            Last updated -
            12
            0
            10
            JavaScript
            • Apple
          • A
            security
            A
            license
            A
            quality
            A Model Context Protocol server that enables AI assistants to interact with Confluence content, supporting operations like retrieving, searching, creating, and updating pages and spaces.
            Last updated -
            9
            3
            TypeScript
            MIT License
          • A
            security
            F
            license
            A
            quality
            A Model Context Protocol server that enables AI assistants to perform real-time web searches, retrieving up-to-date information from the internet via a Crawler API.
            Last updated -
            1
            44
            8
            JavaScript
            • Apple
            • Linux

          View all related MCP servers

          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/Kotelberg/playwright-mcp-server'

          If you have feedback or need assistance with the MCP directory API, please join our Discord server