Playwright MCP サーバー
英語 |日本語
このプロジェクトは、モデル コンテキスト プロトコル (MCP) を使用して Playwright Web ページ コンテンツ取得機能を提供するサーバーです。
特徴
ページナビゲーション
全ページコンテンツ取得
可視コンテンツの検索
インタラクティブ要素の検出
マウス操作シミュレーション
テスト用のエコー機能
インストール
Smithery経由でインストール
Smithery経由で Claude Desktop 用の Playwright MCP Server を自動的にインストールするには:
手動インストール
使用法
サーバーの起動
MCPツール
利用可能なツールは次のとおりです。
navigate指定されたURLに移動する
引数:
{ url: string }戻り値: ナビゲーション結果
get_all_contentページ全体からコンテンツを取得する
引数: なし
戻り値: ページのすべてのテキストコンテンツ
get_visible_content現在表示されているコンテンツを取得する
引数:
{ minVisiblePercentage?: number }戻り値: 表示されるテキストコンテンツ
get_interactive_elementsページ上のインタラクティブな要素(ボタン、リンクなど)の位置情報を取得します。
引数: なし
戻り値: インタラクティブ要素の座標と境界情報
move_mouseマウスカーソルを指定した座標に移動する
引数:
{ x: number, y: number }戻り値: 演算結果
mouse_click指定された座標でマウスクリックを実行する
引数:
{ x: number, y: number, button?: "left" | "right" | "middle", clickCount?: number }戻り値: クリック操作の結果
mouse_wheelマウスホイールスクロールを実行する
引数:
{ deltaY: number, deltaX?: number }戻り値: スクロール操作の結果
drag_and_dropドラッグアンドドロップ操作を実行する
引数:
{ sourceX: number, sourceY: number, targetX: number, targetY: number }戻り値: ドラッグアンドドロップ操作の結果
echoテスト用のエコーツール
引数:
{ message: string }戻り値: 送信されたメッセージ
発達
テストの実行
テスト構造
tools/*.test.ts: 各ツールの機能テストmcp-server.test.ts: MCP サーバー機能テスト
実装機能
コンテンツ検索
全ページコンテンツ取得
表示コンテンツのみの取得
適切なHTML解析
交流
インタラクティブ要素の検出と位置情報の取得
マウス操作シミュレーション(移動、クリック、スクロール)
ドラッグアンドドロップのサポート
エラー処理
適切なナビゲーションエラー処理
タイムアウト処理
無効なURLの検出
構成の柔軟性
ヘッドレス/ヘッドモードの選択
カスタムユーザーエージェント
ビューポートサイズ設定
重要な注意事項
MCPサーバーを使用する前に、必要な環境変数が設定されていることを確認してください。
ウェブページのコンテンツを取得する際は、対象ウェブサイトの利用規約に従ってください。
複数のリクエストを送信する場合は適切な間隔を維持する
マウス操作を行う際は、実際のユーザーインタラクションをシミュレートするため、適切な間隔を維持します。
ライセンス
ISC
This server cannot be installed
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 ページを参照、コンテンツを取得、対話できるようにするサーバー。
Related MCP Servers
- Asecurity-licenseAqualityThis server implements the Model Context Protocol to facilitate meaningful interaction and understanding development between humans and AI through structured tools and progressive interaction patterns.Last updated -54
- -security-license-qualityA server that provides rich UI context and interaction capabilities to AI models, enabling deep understanding of user interfaces through visual analysis and precise interaction via Model Context Protocol.Last updated -60
- -security-license-qualityA server that enables AI to access external services through the Model Context Protocol, specifically integrating with an authentication system to obtain login tickets.
- -security-license-qualityA server that implements the Model Context Protocol, providing a standardized way to connect AI models to different data sources and tools.Last updated -010MIT License