# k11 Playwright QA

> k11 Playwright QA is an MCP server for browser automation. Turn user stories into verified Playwright tests and heal broken locators. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Platforms:** CLI
- **Repository:** https://github.com/k11-software-solutions/k11techlab-playwright-qa-mcp
- **MCP Registry name:** io.github.K11-Software-Solutions/playwright-qa
- **Categories:** [browser automation](https://ai-powered.com/categories/browser-automation), [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-14

## About

Assistants tend to guess selectors when they write Playwright tests, and the tests then fail on first run. This server opens the real page and returns locators that match exactly one element, ordered from most stable (test IDs, roles, labels) downward.

It also converts user stories, Gherkin scenarios or acceptance-criteria bullets into a test skeleton with one test per scenario and one step per line, runs the suite and reports per-test results with the locator a failing test was waiting for. For maintenance, it can record a fingerprint of each element while tests pass, then score the current page against that fingerprint after a redesign and propose a replacement with a confidence and reasons. It never edits tests silently.

A heal-ci command applies changes only above a confidence threshold, re-runs the healed tests, reverts any that still fail and writes a report for a pull request. Pages behind a login are reachable using saved sessions, with secrets read from environment placeholders.

## Features

- **Verified locators:** Lists elements with locators confirmed to match exactly one element.
- **Story to spec:** Builds a Playwright skeleton from stories or Gherkin.
- **Structured test runs:** Per-test results including the failing locator.
- **Self-healing suggestions:** Scores candidates against a baseline fingerprint and explains why.
- **CI healing with audit trail:** Re-runs healed tests, reverts failures and writes a report.
- **Login sessions:** Reaches pages behind sign-in with up to 25 scripted steps.

## Good for

- Generate a first Playwright spec from an acceptance-criteria list
- Repair locators after a UI redesign and open a reviewable pull request
- Check whether a selector matches one element on a live page
- Test flows behind a login without putting passwords in prompts

## Install

### Claude Code (Terminal)

```sh
claude mcp add playwright-qa -- npx -y k11-playwright-qa-mcp
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "playwright-qa": {
      "command": "npx",
      "args": [
        "-y",
        "k11-playwright-qa-mcp"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "playwright-qa": {
      "command": "npx",
      "args": [
        "-y",
        "k11-playwright-qa-mcp"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "playwright-qa": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "k11-playwright-qa-mcp"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "playwright-qa": {
      "command": "npx",
      "args": [
        "-y",
        "k11-playwright-qa-mcp"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "playwright-qa": {
      "command": "npx",
      "args": [
        "-y",
        "k11-playwright-qa-mcp"
      ]
    }
  }
}
```

## Tools

- `explore_page`: Opens a URL and lists elements with locators verified to match one element.
- `check_locator`: Counts what a locator matches on a page and whether it is visible.
- `parse_user_story`: Turns a user story into scenarios and a Playwright skeleton.
- `write_test`: Writes a spec into tests/ and refuses paths outside it.
- `run_tests`: Runs Playwright Test and returns per-test results.
- `capture_baseline`: Fingerprints the element each locator matches while tests pass.
- `heal_locator`: Suggests a verified replacement after a UI change.
- `save_login_state`: Logs in once and saves the session for other tools.

## FAQ

### Does healing change my tests automatically?

Not in the MCP tools; they only suggest. The heal-ci command edits files only with --apply and above a confidence threshold of 0.7 by default.

### Where are baselines stored?

In .qa-mcp/baselines.json, which the README says to commit so healing works in CI.

### Should I commit saved logins?

No. Keep .qa-mcp/auth out of git; save_login_state adds it to .gitignore.

### Which clients work?

Claude Code as a plugin, Claude Desktop and other MCP clients.

### How do I add k11 Playwright QA to Claude Code?

Run this command in your terminal: claude mcp add playwright-qa -- npx -y k11-playwright-qa-mcp

### What are the best alternatives to k11 Playwright QA?

The closest alternatives to k11 Playwright QA are k11 Selenium QA, Playwright E2E MCP, k11 Appium QA, PlaywrightGen and Playrunner.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [k11 Selenium QA](https://ai-powered.com/mcp/k11-selenium-qa): k11 Selenium QA is an MCP server for browser automation.
- [Playwright E2E MCP](https://ai-powered.com/mcp/playwright-e2e-mcp): Playwright E2E MCP is an open-source MCP server for browser automation.
- [k11 Appium QA](https://ai-powered.com/mcp/k11-appium-qa): k11 Appium QA is an open-source MCP server for developer tools.
- [PlaywrightGen](https://ai-powered.com/mcp/playwrightgen): PlaywrightGen is a freemium MCP server for developer tools.
- [Playrunner](https://ai-powered.com/mcp/playrunner): Playrunner is an MCP server for developer tools.
- [Vibe Test — Browser Testing Agent](https://ai-powered.com/mcp/vibe-test-browser-testing-agent): Vibe Test — Browser Testing Agent is an open-source MCP server for browser automation.
- [TestWatch](https://ai-powered.com/mcp/testwatch): TestWatch is a freemium MCP server for developer tools.
- [6Frame Verify](https://ai-powered.com/mcp/6frame-verify): 6Frame Verify is a freemium MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/k11-playwright-qa
