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/가 생성되고 프로젝트가 편집 가능(editable) 모드로 설치됩니다. 아래의 모든 명령은 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' }]],
});

파일에는 표준 최상위 키인 config, suites, errors, stats가 포함되어야 합니다.

서버를 간단히 사용해 보려면 샘플 리포트가 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_time, duration_ms, passed, failed, skipped, flaky.

get_failures

실패한 테스트 목록. 각 테스트에는 title, file, status 및 첫 번째 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