MCP server

Playwright tests your editor’s AI has proven on the live page

Connect GitHub Copilot, Cursor or Claude Code to PlaywrightGen. Your assistant writes the test from the real page, runs it until it passes, and proposes it with that evidence — and your team decides what counts.

1

Write it from the real page

generate_playwright_test opens the page in a remote browser and builds locators from its real buttons, fields and test attributes, so the first draft is not a guess.

2

Run it until it passes

run_playwright_test replays the test step by step on the live page and returns the failing step with the page as it was, so your assistant fixes the locator and runs again. prove_playwright_test does that whole loop in one call.

3

Propose it for review

propose_test_case sends the test case and code with a signed receipt of the passing run. A person on your team approves it; then it becomes reviewed automation.

Tools

Eleven tools over the Model Context Protocol (Streamable HTTP). Running and generating use your workspace’s daily AI allowance.

ToolKindWhat it does
prove_playwright_testRunsThe whole loop in one call: write it, run it, fix the failing step, run again until it passes.
plan_page_coverageProposesPlans the tests a whole page needs; a person approves the plan in PlaywrightGen.
prove_page_coverageRunsProves each approved test on the live page and returns the passing suite.
generate_playwright_testRunsWrites a draft from a described flow and the real page.
run_playwright_testRunsReplays a test on the live page; reports each step and the page at a failure.
propose_test_caseProposesCreates a draft test case, optionally with code and a passing run, for review.
submit_playwright_codeProposesSends code for an existing test case, waiting for a person to use it.
list_test_casesReadsTest cases with their review status and version.
get_test_caseReadsApproved steps, expected results and the version marker for the test title.
list_approved_automationReadsReviewed Playwright automation in the project.
get_approved_automationReadsThe approved code, ready to save into the repository.
list_recent_failuresReadsWhat failed in CI recently, with the failure output.
project_overviewReadsRelease readiness: coverage, regressions and blockers.

Connect in three steps

  1. 1. Create a free workspace and a project.
  2. 2. Open the project’s Automation page and copy your personal editor token.
  3. 3. Add PlaywrightGen to your editor, replacing YOUR_TOKEN (the Automation page gives you this with your token filled in):

VS Code (Copilot agent mode)

.vscode/mcp.json

{
  "inputs": [
    {
      "type": "promptString",
      "id": "playwrightgen-token",
      "description": "PlaywrightGen editor token",
      "password": true
    }
  ],
  "servers": {
    "playwrightgen": {
      "type": "http",
      "url": "https://playwrightgen.com/api/mcp",
      "headers": {
        "Authorization": "Bearer ${input:playwrightgen-token}"
      }
    }
  }
}

Cursor

~/.cursor/mcp.json

{
  "mcpServers": {
    "playwrightgen": {
      "url": "https://playwrightgen.com/api/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_TOKEN"
      }
    }
  }
}

Claude Code

Terminal

claude mcp add --transport http playwrightgen https://playwrightgen.com/api/mcp --header "Authorization: Bearer YOUR_TOKEN"

What it can never do

  • Approve anything. Proposals wait for a person on your team; nothing counts as coverage until they approve it.
  • Go beyond your role. The token is yours, for one project, and checked against your access on every request. A viewer’s assistant cannot write.
  • Execute test code. Runs read the test into safe Playwright steps and replay them in a remote browser, only on public pages.
  • Keep your test account. Values for a sign-in are used for one run, never stored, and blanked out of what the run reports.