Playwright Report MCP
Playwright Report MCP
一个 MCP 服务器,将 Playwright JSON 测试报告以工具的形式提供给 LLM 智能体。
环境要求
Python >= 3.10
uv(
brew install uv或curl -LsSf https://astral.sh/uv/install.sh | sh)Node.js + npx — 仅用于
mcp dev,它会启动 MCP Inspector
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' }]],
});该文件必须包含标准顶层键 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.jsonREPORT_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你应该会收到一个 JSON-RPC 结果,其中包含 "serverInfo":{"name":"Playwright Report",...}。
将其连接到客户端
将服务器注册到 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 文件。
工具
工具 | 描述 |
| 最近一次运行的摘要: |
| 失败测试的列表,每项包含 |
运行测试
pytest 和 pytest-asyncio 已安装,但仓库中还没有测试文件,因此目前会收集到 0 个测试:
uv run pytest故障排除
症状 | 解决方法 |
| 在仓库根目录创建 |
工具调用时出现 |
|
| 该 JSON 不是 Playwright |
| 安装 Node.js 以确保 |
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables 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.6MIT

Tesults MCPofficial
AlicenseNot gradedqualityDmaintenanceConnect 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.37MIT- FlicenseAqualityDmaintenanceEnables AI agents to run reusable Playwright test fixtures against live deployments, providing structured test results, screenshots, and assertions.3
- AlicenseBqualityBmaintenanceSupercharges AI-assisted debugging of Playwright tests by parsing trace files to extract failures, action history, network logs, screenshots, and suggesting fixes.612MIT
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.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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