Browser Use
ให้ AI ทำงานบนเว็บแทนคุณ เช่น กรอกฟอร์ม ค้นหา และดึงข้อมูล ใช้เบราว์เซอร์บนคลาวด์ของผู้ทำหรือรันในเครื่องก็ได้
คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)
Run Playwright tests and surface structured results for AI agents doing test failure analysis.
สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน
ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry
เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง
PW_ALLOWED_DIRS, PW_RESULTS_FILEต้องเตรียมก่อน
คุณใช้แอปไหน
เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”
เปิด Claude Desktop → Settings → Developer → Edit Config แล้ววางค่านี้ในไฟล์ claude_desktop_config.json
{
"mcpServers": {
"playwright-report": {
"command": "npx",
"args": [
"-y",
"playwright-report-mcp"
],
"env": {
"PW_ALLOWED_DIRS": "ใส่ค่าของคุณ",
"PW_RESULTS_FILE": "ใส่ค่าของคุณ"
}
}
}
}พิมพ์คำสั่งนี้ใน Terminal
claude mcp add playwright-report --env PW_ALLOWED_DIRS='ใส่ค่าของคุณ' --env PW_RESULTS_FILE='ใส่ค่าของคุณ' -- npx -y playwright-report-mcpเติมค่าที่เว้นว่างไว้ก่อนรัน
วางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json
{
"mcpServers": {
"playwright-report": {
"command": "npx",
"args": [
"-y",
"playwright-report-mcp"
],
"env": {
"PW_ALLOWED_DIRS": "ใส่ค่าของคุณ",
"PW_RESULTS_FILE": "ใส่ค่าของคุณ"
}
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
วางในไฟล์ .vscode/mcp.json ของโปรเจกต์
{
"servers": {
"playwright-report": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"playwright-report-mcp"
],
"env": {
"PW_ALLOWED_DIRS": "ใส่ค่าของคุณ",
"PW_RESULTS_FILE": "ใส่ค่าของคุณ"
}
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
ตัวนี้รันในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะ server บนอินเทอร์เน็ต ลองเลือกแอปอื่น
ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี
PW_ALLOWED_DIRS envPW_RESULTS_FILE envค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README
รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง
เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 7 พ.ย. 2569
ชื่อใน registry ยืนยันด้วยบัญชี GitHub hubertgajewski ซึ่งเป็นเจ้าของ repo
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต
ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน
รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต
เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo
จากการตรวจเบื้องต้นของเรา ผ่าน 1 จาก 1 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น
registry ไม่ได้ระบุว่าต้องใช้กุญแจ แต่บางตัวจะขอให้ล็อกอินตอนใช้ครั้งแรก
รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)
repo บน GitHub มีการแก้โค้ดล่าสุด – และส่งรุ่นล่าสุด (3.4.0) เข้า registry 42 วันที่ผ่านมา
โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Node.js ในเครื่องด้วย
ในหมวดเดียวกันมี Browser Use, Chrome DevTools MCP, MCP Server Browser
server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว
อ่านการ์ด:★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi
ให้ AI ทำงานบนเว็บแทนคุณ เช่น กรอกฟอร์ม ค้นหา และดึงข้อมูล ใช้เบราว์เซอร์บนคลาวด์ของผู้ทำหรือรันในเครื่องก็ได้
ให้ AI ใช้เครื่องมือนักพัฒนาของ Chrome ตรวจหน้าเว็บ ดูว่าโหลดช้าตรงไหน และหาข้อผิดพลาด ทำโดยทีม Chrome DevTools
MCP server for browser use access
ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ
An MCP (Model Context Protocol) server for running Playwright tests and reading structured results, failed test details, and attachment content — designed for AI agents doing test failure analysis.
Playwright Report MCP gives an AI agent structured, token-efficient access to Playwright test outcomes. It runs your test suite, reads the JSON reporter output, and surfaces exactly what the agent needs: which tests failed, what the errors were, and the content of relevant attachments.
There are many Playwright MCP servers that control a browser — they navigate pages, click elements, fill forms, and take screenshots. Playwright Report MCP is not one of those.
| Browser automation MCPs | Playwright Report MCP | |
|---|---|---|
| Examples | microsoft/playwright-mcp, executeautomation/mcp-playwright | this project |
| Purpose | Let an AI agent drive a browser | Let an AI agent read test results |
| Runs tests | No | Yes |
| Returns pass/fail | No | Yes |
| Surfaces error messages | No | Yes |
| Reads attachment content | No | Yes |
Default reporters (`list` / `dot`) — Playwright's default reporters print human-readable output to stdout. Compact, but lossy: no attachment paths, no retry breakdown, no structured data.
HTML reporter (report.html) — A self-contained SPA bundle (typically 2–50 MB). Not machine-readable as text and exceeds any LLM context window.
Reading `results.json` directly — Works, but a full JSON report for even a small test suite is 10,000–20,000 tokens. For a failing test, most of that is passing test metadata you don't need.
results.json to only failed testsApproximate input token counts based on Claude tokenization (~3–4 characters per token for mixed JSON/text content).
| What you need | Without MCP — approach | Tokens (no MCP) | With MCP — tool calls | Tokens (MCP) | Savings |
|---|---|---|---|---|---|
| Error message only — live run | npx playwright test, read stdout (list/dot) | ~500–1,200 | run_tests + get_failed_tests | ~300–500 | ~2× |
| Error message only — existing results | Read full results.json | ~12,500–23,000 | get_failed_tests | ~300–500 | ~25–45× |
| + page state at failure | + read error-context file | ~15,000–26,000 | + get_test_attachment('error-context') | ~2,800–3,500 | ~4–7× |
| + custom text attachments¹ | + read attachment files | ~16,200–28,500 | + get_test_attachment ×2 | ~3,300–5,500 | ~4–5× |
| + full page HTML snapshot² | + read snapshot file | ~41,000–103,000 | + get_test_attachment | ~33,300–85,500 | ~1.2× |
¹ Custom text attachments — e.g. AI diagnosis (~500–2,000 tokens) and console logs (~200–500 tokens) added via
testInfo.attach()in your own fixtures.
² Full page HTML snapshot — a custom fixture that attaches the full rendered page HTML on failure. Large pages alone can reach 30,000–80,000 tokens and dominate cost regardless of whether MCP is used.
Key observations:
list/dot) is compact but gives the agent no path to attachment content — dead end for deeper analysisresults.json directly costs ~12,500–23,000 tokens even when only one test failed — most of it is passing test metadata the agent doesn't neederror-context is the single largest optimisation availableThe primary use case: your CI pipeline runs the tests, the agent picks up the results after the fact and diagnoses failures. get_failed_tests reads results.json regardless of who triggered the run. No re-run needed.
1. Install via npx (recommended)
No clone or build step needed — npx downloads and runs the server automatically:
{
"mcpServers": { "playwright-report-mcp": { "command": "npx", "args": ["-y", "playwright-report-mcp"], "type": "stdio" } } }
Or build from source:
git clone https://github.com/hubertgajewski/playwright-report-mcp.git
cd playwright-report-mcp npm install && npm run build
2. Add the JSON reporter to your Playwright project
// playwright.config.ts
reporter: [ ['json', { outputFile: 'test-results/results.json' }], ['html'], // keep any existing reporters ],
3. Register in `.mcp.json`
{
"mcpServers": { "playwright-report-mcp": { "command": "npx", "args": ["-y", "playwright-report-mcp"], "type": "stdio" } } }
4. Ask your AI agent
Run the Playwright tests and tell me what failed.
Tested with Claude Code (CLI). Should work with any MCP-compatible client that supports stdio transport, including Claude Desktop, Cursor, Cline, Windsurf, and Continue.dev — but these have not been verified.
The stdio server supports both MCP protocol eras from one entrypoint:
2026-07-28, selected by clients using version negotiation (for example, versionNegotiation: { mode: "auto" }).initialize handshake. This remains the default behavior in the MCP client SDK.The opening exchange pins one era for the connection lifetime. A client that pins an unsupported revision receives an explicit negotiation error; the server does not silently switch it to another era.
The project-scoped tools accept an optional workingDirectory parameter — see Multi-worktree support. get_run_status can use either a runId from run_tests with wait: false, or a workingDirectory lookup for the latest tracked run.
run_testsRuns the Playwright test suite and returns structured pass/fail results.
| Input | Type | Description |
|---|---|---|
workingDirectory | string (optional) | Playwright project directory. Absolute or relative to the MCP server launch directory. Defaults to ".". Must be under PW_ALLOWED_DIRS — see Multi-worktree support. |
spec | string (optional) | Spec file path relative to the project directory, e.g. tests/login.spec.ts. Must stay within the project directory. |
browser | enum (optional) | Chromium, Firefox, Webkit, Mobile Chrome, Mobile Safari |
tag | string (optional) | Tag filter, e.g. @smoke |
timeout | integer (optional) | Timeout in milliseconds for the whole test run. Defaults to 300000 (5 min). Use a larger value for long suites or a smaller one to fail fast. When the run is killed by this timeout, the tool returns an explicit error rather than a generic non-zero exit. |
wait | boolean (optional) | Wait for completion before returning. Defaults to true. Set to false to start a background run and poll it with get_run_status. |
updateSnapshots | enum (optional) | Update snapshot baselines. One of all, changed, missing, none. Playwright's default is missing; changed updates differing + missing. Omit to leave existing baselines alone. |
headed | boolean (optional) | Run with a visible browser window. Omitting or setting false leaves playwright.config.ts intact — Playwright has no --no-headed flag, so false does not force headless when the config sets headed. |
workers | integer (optional) | Number of parallel workers. Positive integer only; the "50%" string form is not yet supported. |
retries | integer (optional) | Maximum retry count for flaky tests. 0 explicitly disables retries; omit to use the project's config. |
| maxFailures | integer (optional) | Stop the run after this many failures. Positive integer.
ตัดมาแค่ช่วงต้น อ่านต่อใน repo