The Playwright MCP server enables automated browser interactions through a Docker environment, supporting headless Chromium, Firefox, and WebKit browsers for various web automation tasks.
- Navigate and interact: Visit URLs, navigate history, click elements, type text, select options, drag, hover, and upload files.
- Manage browser tabs: Open, switch between, list, and close tabs.
- Capture page data: Take screenshots, save PDFs, log network requests, and generate accessibility snapshots.
- Handle dialogs: Accept or dismiss browser alerts, prompts, and confirms with custom input.
- Wait and monitor: Wait for specific conditions or timeframes, and receive real-time updates via SSE.
- Generate and debug: Automatically create Playwright test scripts, enable debugging logs, and save trace files.
- Customize and integrate: Configure via environment variables and connect with tools like n8n, VS Code, and Cursor.
Enables browser automation for Firefox, allowing AI agents to interact with web pages through structured accessibility snapshots, perform navigation, clicks, typing, and other browsing actions.
Integrates with GitHub Copilot in VS Code, providing tools for web automation that allow the AI assistant to interact with websites, fill forms, click buttons, and extract data from web pages.
Provides browser automation capabilities built on Node.js, allowing programmatic control of web browsers for navigation, interaction, and data extraction from web pages.
Playwright MCP Docker Environment
Docker環境でPlaywright MCPサーバーを実行し、外部ツールから自動ブラウザ操作を可能にするプロジェクトです。
🚀 クイックスタート
SSEエンドポイント: http://localhost:8931/sse
📋 機能
- ヘッドレスブラウザ操作: Chromium/Firefox/WebKitでの自動操作
- SSE通信: リアルタイムなブラウザ操作結果の取得
- 外部ツール連携: n8n、VS Code、Cursorなどとの統合
- 出力ファイル管理: スクリーンショット、PDF、Traceファイルの保存
- 設定可能: 環境変数による柔軟な設定変更
🛠️ 構成
⚙️ 設定
環境変数
変数 | デフォルト | 説明 |
---|---|---|
MCP_HOST_PORT | 8931 | 公開ポート |
DEBUG | - | デバッグログ有効化 |
SAVE_TRACE | false | Trace保存 |
VISION_MODE | false | スクリーンショットモード |
デバッグ有効化
🔗 外部ツール連携
n8n
VS Code/Cursor
📊 監視
📚 ドキュメント
🔧 トラブルシューティング
よくある問題
- ポート競合:
.env
でMCP_HOST_PORT
を変更 - 起動失敗:
docker-compose logs
でエラー確認 - 接続できない: ファイアウォール設定を確認
サポート
問題が発生した場合は、以下を確認してください:
- トラブルシューティングガイド
- コンテナログ:
docker-compose logs playwright-mcp
- ヘルスチェック:
curl http://localhost:8931/health
📝 ライセンス
このプロジェクトは実験的なものです。商用利用の際は適切なライセンス確認を行ってください。
🤝 貢献
プルリクエストやイシューの報告を歓迎します。
You must be authenticated.
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Tools
A Model Context Protocol server that provides browser automation capabilities using Playwright, enabling LLMs to interact with web pages through structured accessibility snapshots without requiring screenshots or visually-tuned models.
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityA Model Context Protocol server that provides browser automation capabilities using Playwright. This server enables LLMs to interact with web pages, take screenshots, and execute JavaScript in a real browser environment.Last updated -139,4573,642TypeScriptMIT License
- -securityFlicense-qualityProvides a server utilizing Model Context Protocol to enable human-like browser automation with Playwright, allowing control over browser actions such as navigation, element interaction, and scrolling.Last updated -2TypeScript
- -securityAlicense-qualityA Model Context Protocol server that provides browser automation capabilities using Playwright, enabling LLMs to interact with web pages, take screenshots, and execute JavaScript in a real browser environment.Last updated -3PythonApache 2.0
- AsecurityAlicenseAqualityA Model Context Protocol server that provides browser automation capabilities using Playwright, enabling LLMs to interact with web pages through structured accessibility snapshots without requiring screenshots or vision models.Last updated -2186,592TypeScriptApache 2.0