
playwright-e2e-mcp
The test doctor for AI agents: run your Playwright suite, diagnose failures from the trace, apply fixes proven by a re-run, and audit pages for accessibility and speed. GitHub · npm
○ Checking the endpoint…
https://playwright-e2e-mcp.vercel.app/api/mcp
It speaks MCP Streamable HTTP. It requires a bearer token: a request
without Authorization: Bearer <token> is answered 401 {"error":"unauthorized"}.
What works here
inspect-page,validate-selector,audit-accessibilityandaudit-performanceon any public URL, in a bundled Chromiumlist-testsandget-failureon the example specs bundled with the deployment
What needs the local install
- Your own tests:
run-test,get-run-status,suggest-fix,diagnose-flaky,generate-e2e-test,analyze-history,load-report,audit-tests,bisect-failure,save-login,check-test-change,check-mocks,quarantineandcompare-visual-stateneed your project next to the server (Playwright Test or pytest-playwright) localhostand private-network pages, Firefox and WebKit
Discovery: the Server Card and AI catalog describe this endpoint without a token.
Run it next to your code with npx -y playwright-e2e-mcp init
(see the README for one-line installs).
Connect a client
claude.ai connectors sign in with OAuth: add the endpoint as a custom connector, leave the OAuth fields empty, and type the access key on the sign-in page that opens. ChatGPT and other remote clients send the token as an API key (bearer token).
Try it from a terminal
Put your token in a variable first, so it stays out of the command. macOS / Linux:
export PW_TOKEN=<token>
curl -s -X POST https://playwright-e2e-mcp.vercel.app/api/mcp \
-H 'content-type: application/json' \
-H 'accept: application/json, text/event-stream' \
-H "authorization: Bearer $PW_TOKEN" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"inspect-page","arguments":{"url":"https://example.com","view":"aria"}}}'
Windows (cmd), one line:
set PW_TOKEN=<token>
curl -s -X POST https://playwright-e2e-mcp.vercel.app/api/mcp -H "content-type: application/json" -H "accept: application/json, text/event-stream" -H "authorization: Bearer %PW_TOKEN%" -d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/call\",\"params\":{\"name\":\"inspect-page\",\"arguments\":{\"url\":\"https://example.com\",\"view\":\"aria\"}}}"
The reply lists the page's headings, links and buttons. A self-hosted bridge started without
PW_MCP_HTTP_TOKEN needs no token but serves only list-tests, get-failure
and analyze-history.