Skip to main content
Glama
nora-weisser

Playwright Report MCP

by nora-weisser

Playwright Report MCP

Playwright の JSON テストレポートを LLM エージェント向けのツールとして公開する MCP サーバーです。

必要条件

  • Python >= 3.10

  • uv (brew install uv または curl -LsSf https://astral.sh/uv/install.sh | sh)

  • Node.js + npx — MCP Inspector を起動する mcp dev でのみ必要

Related MCP server: Tesults MCP

1. 依存関係のインストール

リポジトリのルートから:

uv sync

これにより .venv/ が作成され、プロジェクトが編集可能モードでインストールされます。以下のすべてのコマンドは uv run 経由で実行されるため、venv を手動でアクティベートする必要はありません。

2. Playwright の JSON レポートを生成する

サーバーは json レポーターによって生成された Playwright レポートを読み取ります。Playwright プロジェクトでは:

npx playwright test --reporter=json > results.json

または playwright.config.ts に恒久的に設定してください:

export default defineConfig({
  reporter: [['json', { outputFile: 'results.json' }]],
});

ファイルには標準のトップレベルキー configsuiteserrorsstats が含まれている必要があります。

サーバーを試してみたいだけの場合は、サンプルレポートが results.json に同梱されています。

3. レポートのパスを設定する

リポジトリのルートに、そのレポートを指す .env ファイルを作成してください (絶対パスを推奨):

REPORT_PATH=/absolute/path/to/results.json

代わりに同梱のサンプルを使用する場合:

REPORT_PATH=/absolute/path/to/playwright-test-analysis-mcp/src/playwright_report_mcp/results.json

REPORT_PATH はツール呼び出しのたびに読み取られるため、サーバーを再起動せずにレポートを再生成できます。未設定の場合、ツール呼び出しは REPORT_PATH environment variable is not set. というエラーで失敗します。

4. サーバーを実行する

インタラクティブ開発 (MCP Inspector)

uv run mcp dev src/playwright_report_mcp/server.py

ブラウザで MCP Inspector を開き、ツールを手動で一覧表示して呼び出すことができます。npx が必要です。

通常の stdio サーバー

uv run playwright-report-mcp

または、同等に:

uv run mcp run src/playwright_report_mcp/server.py

stdin/stdout を介して MCP プロトコルで通信します。MCP クライアントへの接続や、簡単なスモークテストに便利です:

printf '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"t","version":"1"}}}\n' \
  | uv run playwright-report-mcp

"serverInfo":{"name":"Playwright Report",...} を含む JSON-RPC の結果が返ってくるはずです。

クライアントに接続する

Claude Desktop にサーバーを登録してください:

uv run mcp install src/playwright_report_mcp/server.py

または、MCP クライアント設定 (例: claude_desktop_config.json) に手動で追加してください:

{
  "mcpServers": {
    "playwright-report": {
      "command": "uv",
      "args": [
        "--directory",
        "/absolute/path/to/playwright-test-analysis-mcp",
        "run",
        "playwright-report-mcp"
      ]
    }
  }
}

--directory が重要です: これにより uv がこのプロジェクトの venv を解決し、load_dotenv().env ファイルを見つけられるようになります。

ツール

ツール

説明

get_test_summary

最新の実行の概要: start_timeduration_mspassedfailedskippedflaky

get_failures

失敗したテストのリスト。各テストには titlefilestatus と最初の error メッセージが含まれます。

テストの実行

pytestpytest-asyncio はインストールされていますが、リポジトリにはまだテストファイルがないため、現在は 0 個のテストが収集されます:

uv run pytest

トラブルシューティング

症状

修正方法

REPORT_PATH environment variable is not set.

リポジトリのルートに .env を作成するか、サーバーを起動するシェルで REPORT_PATH をエクスポートしてください。

ツール呼び出し時の FileNotFoundError

REPORT_PATH が存在しないファイルを指しています — 絶対パスを使用してください。

KeyError: 'stats'

JSON が Playwright の json レポーターによるレポートではありません (例: HTML レポートや生の blob)。

mcp dev が起動しない

npx が使えるように Node.js をインストールするか、代わりに mcp run を使用してください。

F
license - not found
A
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • A
    license
    A
    quality
    D
    maintenance
    Enables LLMs to explore and analyze UK Government BEIS inspect_ai evaluation logs directly from tools like Claude Code and Cursor. It provides capabilities to list logs, view evaluation summaries, and inspect conversation histories for specific samples.
    6
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Connect AI agents to your test results, insights, and targets. Query test runs, failures, flaky tests, and regressions across frameworks including Playwright, Jest, Pytest, Cypress and more.
    37
    MIT

View all related MCP servers

Related MCP Connectors

  • Browser-backed QA with evidence and fix-ready reports for coding agents.

  • Playwright selector risk checks with healing suggestions and receipts.

  • BuildPulse CI test analytics for AI agents — flaky tests, coverage, and CI run history.

View all MCP Connectors

Latest Blog Posts

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/nora-weisser/playwright-test-analysis-mcp'

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