playwright-rerun-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
playwright-rerun-mcp
An MCP server that lets an AI assistant (Claude Code, Claude Desktop, or any MCP client) see which Playwright tests failed and rerun only those, or rerun tests by test-case ID.
I built the same kind of tool at work, where it reran failed specs by their test-management ID. This is a clean, public version.
Add it to Claude Code
From your Playwright project root:
claude mcp add playwright-rerun -- npx -y github:ibtsam2666/playwright-rerun-mcpOr add it to any MCP client config:
{
"mcpServers": {
"playwright-rerun": {
"command": "npx",
"args": ["-y", "github:ibtsam2666/playwright-rerun-mcp"],
"env": { "PLAYWRIGHT_PROJECT_ROOT": "/path/to/your/project" }
}
}
}Your project needs @playwright/test installed (npm ci). The server uses your project's own Playwright and config.
Related MCP server: Playwright Debug MCP Server
Tools
Tool | What it does |
| Reads the last JSON report and lists failed and flaky tests with file, line, error and case IDs. Read-only |
| Reruns only the tests that failed last time, optionally filtered by title |
| Reruns tests by case ID, e.g. |
| Runs tests by title pattern, tag ( |
Each tool returns a short text summary plus structured content: { exitCode, timedOut, counts: { passed, failed, flaky, skipped } }.
Case IDs come from Playwright tags or from test titles:
test('order total includes tax', { tag: ['@smoke', '@TC-301'] }, async ({ page }) => { /* ... */ });Settings
Variable | Default | Purpose |
| current directory | The Playwright project to run |
|
| A run that takes longer is stopped |
The report is written to test-results/results.json in the project root.
Safety
Spec paths must stay inside the project and end in
.spec.tsor.spec.js.Only one run at a time, so the report is never written twice at once.
Every run has a timeout. Project names and case IDs are checked against strict patterns.
Develop
npm ci
npm test # unit tests for the report parser and path guard
npm run smoke # builds, starts the server over stdio, reruns example test TC-1src/report.ts parses the report (pure functions), src/tools.ts defines the tools and src/cli.ts starts the server.
The same server also runs inside my Playwright portfolio against a full UI and API suite.
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Direct access to Cypress tests results and accessibility reports in your AI workflow.
Approved test intent, reviewed Playwright automation and run evidence, inside your editor.
Create and manage test cases, test runs and results in Testiny from your AI assistant.
Discover Playwright workflows, start runs, and inspect results in Playrunner Cloud.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI agents to run reusable Playwright test fixtures against live deployments, providing structured test results, screenshots, and assertions.3MIT
- FlicenseBqualityDmaintenanceSupercharges AI-assisted debugging of Playwright tests by parsing trace files to extract failures, action history, network logs, screenshots, and suggesting fixes.6-
- AlicenseAqualityDmaintenanceEnables AI assistants to summarize Playwright test runs, identify flaky tests, heuristically triage failures, generate Playwright test stubs, and retrieve recent GitHub CI status through MCP tool calls.5MIT
- AlicenseAqualityBmaintenanceAllows LLM agents to query Playwright JSON test results for run summaries and failure information.2MIT