QA Copilot MCP Server
QA Copilot MCP Server
Un servidor Model Context Protocol que proporciona a un asistente de IA un pequeño conjunto de herramientas concretas de QA e inteligencia de pruebas, en lugar de pedirle que adivine: resumir una ejecución de Playwright, encontrar tests flaky entre varias ejecuciones, explicar un fallo de forma heurística, generar un stub de test de Playwright y consultar el estado reciente de CI de un repositorio de GitHub. Apunta a Claude Desktop, Claude Code o cualquier otro host compatible con MCP y esas capacidades pasan a ser llamadas reales a herramientas, no suposiciones en texto libre.
Es la pieza de «dale a la IA datos reales, no sensaciones» dentro de un portafolio de automatización de QA: los otros repositorios de este portafolio (healthcare-qa-automation-framework, healthcare-data-quality-framework) generan informes JSON de Playwright y ejecuciones de CI; este servidor es lo que convierte esos datos en algo que un asistente puede consultar de verdad.
Por qué está construido así
El cableado del protocolo es una capa fina sobre funciones simples. La lógica real de cada herramienta vive en
src/playwright/,src/github/ysrc/tools/como módulos pequeños, puros (o casi) y con pruebas unitarias independientes.src/index.tssolo los registra con el SDK de MCP, así que la parte complicada (el análisis de informes, la detección de flaky, las heurísticas) queda cubierta por pruebas unitarias rápidas, y la capa del protocolo la cubre una prueba de humo de extremo a extremo aparte (más abajo).El acceso a GitHub is pluggable, con el mismo patrón que las integraciones de LLM del resto del portafolio.
GitHubClientuna interfaz;RealGitHubClientenvuelvefetchcontra la GitHub REST API, yFakeGitHubClientdevuelve datos fijos. Eso hace queget_repo_ci_statussea totalmente testeable unitariamente sin red, mientras que el cliente real es código genuino y ejecutable: un host MCP en la máquina de un desarrollador tiene acceso normal a internet, incluso en entornos (como el sandbox de CI de este mismo repositorio) que no lo tienen.La generación de stubs de pruebas es determinista y a propósito no se base en un LLM. Dada una secuencia con nombre de interacciones
data-testid,generate_playwright_test_stubsiempre produce exactamente la misma salida: instantánea, libremente reproducible. Una herramienta distinta para un trabajo distinto (generar casos de prueba a partir de una especificación o una historia de usuario, donde un LLM sí aporta valor) es un proyecto aparte dentro de este portafolio.Una prueba de humo a nivel de protocolo, no solo unit tests.
smoke-test.mjslanza el servidor compilado como un proceso hijo real y lo conduce con elClientoficial de MCP a través de stdio —tools/listy luego untools/callpor cada herramienta—, de modo que CI comprueba que el protocolo de red real funciona, no solo las funciones que hay detrás.
Related MCP server: playwright-e2e-mcp
Herramientas
Herramienta | Qué hace |
| Convierte la salida del reporter JSON de Playwright en conteos de pass/fail/timeout/skipped/flaky, duración y toda la información del fallo. |
| Compara las mismas pruebas en 2+ informes JSON de Playwright y señala cualquier prueba cuyo resultado no haya sido consistente. |
| Estimación heurística de causa raíz mediante plantillas que coinciden con el mensaje de error crudo. Totalmente offline. |
| Genera de forma determinista un test Playwright ejecutable a partir de una secuencia nombrada de interacciones |
| Obtiene las ejecuciones recientes de Actions de un repositorio público de GitHub y resume los conteos de éxito/fallo/en curso. |
Arquitectura
src/
index.ts MCP server: registers all 5 tools, connects over stdio
playwright/reportParser.ts Pure Playwright-JSON parsing: summarizeReport, findFlakyTests
github/githubClient.ts GitHubClient interface + RealGitHubClient (fetch) + FakeGitHubClient
tools/
explainFailure.ts Heuristic pattern-matching (ported from the triage_failure.py
script in healthcare-qa-automation-framework)
generateTestStub.ts Deterministic Playwright test-file template generator
getRepoCiStatus.ts Wraps GitHubClient into pass/fail/in-progress counts
test/ Vitest unit tests for every module above
fixtures/ Sample Playwright JSON reports (3 runs, used for flaky-test tests)
smoke-test.mjs End-to-end MCP protocol smoke test (real child process, real client)
.github/workflows/ci.yml Type-check, unit tests, build, protocol smoke testStack tecnológico
TypeScript · Node.js · @modelcontextprotocol/sdk · Zod · Vitest · GitHub REST API ·
GitHub Actions
Ejecutarlo en local
npm install
npm run build # compiles to dist/
npm test # unit tests (27 tests, fully offline)
npm run smoke # builds, then drives the real server over stdio via the MCP clientUso desde un host MCP
Apunta cualquier cliente compatible con MCP al servidor compilado, por ejemplo en el
claude_desktop_config.json de Claude Desktop:
{
"mcpServers": {
"qa-copilot": {
"command": "node",
"args": ["/absolute/path/to/qa-copilot-mcp-server/dist/index.js"]
}
}
}Define la variable de entorno GITHUB_TOKEN para elevar el límite de requests sin autenticar de GitHub para get_repo_ci_status (60 peticiones por hora sin él; 5,000 por hora con él) — funciona bien sin token para un uso ocasional.
CI
Cada push y pull request sobre main ejecuta un único job: type-check
(tsc --noEmit), la suite de tests unitarios (vitest run), un build de producción y un
smoke test de protocolo (node smoke-test.mjs) contra el build generado. No se asume ni se requiere acceso a red en ningún punto de CI: get_repo_ci_status solo se ejerce contra FakeGitHubClient en los tests, y el smoke test acepta un resultado de get_repo_ci_status sin red como válido siempre que el servidor lo notifique correctamente por el canal isError de MCP en lugar de estrellarse.
Qué no es esto
No es un dashboard genérico de GitHub ni de CI, sino un conjunto pequeño y enfocado de herramientas construidas específicamente alrededor de las formas de Playwright-report y GitHub-Actions que de verdad producen los otros repos de este portfolio; está pensado para mostrar cómo un asistente de IA se conecta con datos de prueba reales y verificables en vez de que se le pida razonarlo sobre resultados de tests a partir de un paráfrasis.
Available Tools
5 toolsexplain_failureExplain a test failureA
Given a Playwright (or similar) error message, returns a heuristic, pattern-matched guess at the root cause and a suggested next step. Fully offline - no LLM call.
Inputs: errorMessage (required).
generate_playwright_test_stubGenerate a Playwright test stubA
Deterministically scaffolds a runnable Playwright test file from a named sequence of data-testid interactions (fill, click, expectText, expectVisible). Template-based, not LLM-based - instant and 100% reproducible.
Inputs: steps (required), testName (required), describeName.
get_repo_ci_statusGet a repo's recent CI statusA
Fetches the last N GitHub Actions workflow runs for a public repo (owner/repo) and summarizes pass/fail/in-progress counts alongside the raw run list. Requires network access from wherever this server is running; set GITHUB_TOKEN in the environment to raise the unauthenticated rate limit.
Inputs: repo (required), owner (required), limit.
list_flaky_testsList flaky tests across multiple runsA
Compares the same tests across two or more Playwright JSON reports (e.g. the last N CI runs of the same suite) and returns every test whose outcome wasn't consistent - it passed in some runs and failed/timed out in others.
Inputs: reportJsons (required).
summarize_test_runSummarize a Playwright test runA
Parses Playwright's JSON reporter output and returns pass/fail/timeout/skipped/flaky counts, total duration, and full details on every failure.
Inputs: reportJson (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool targets a distinct responsibility—summarizing test output, identifying flaky tests, explaining failures, generating test stubs, and fetching CI status. There is no meaningful overlap between any pair of tools.
All tool names follow a consistent verb_noun pattern with clear action-prefixed names: summarize_, list_, explain_, generate_, get_. Minor pluralization differences do not create confusion.
Five tools cover a tightly scoped QA workflow—analyze results, detect flakiness, explain failures, generate tests, and check CI—without redundancy or bloat.
The core QA reporting and triage loop is well supported, from parsing reports to explaining failures and detecting flaky tests. Minor gaps like actionable test-edit or test-deletion operations are absent, but they fall outside the visible purpose.
Maintenance
Related MCP Connectors
Direct access to Cypress tests results and accessibility reports in your AI workflow.
Test analytics for AI agents: test history, flaky tests, failure clusters, coverage.
Approved test intent, reviewed Playwright automation and run evidence, inside your editor.
Flaky-test evidence for AI: analyze CI reports, explain flaky tests, reports, stress runs
Related MCP Servers
AlicenseNot gradedqualityDmaintenanceEnables querying Playwright test failure reports and execution results directly from AI assistants, allowing retrieval of test outcomes, failures, and report details.MIT- AlicenseAqualityBmaintenanceEnables AI agents to run, debug, and inspect Playwright end-to-end tests, returning structured pass/fail stats, failure diagnostics with actionable fix hints, live DOM inspection, selector validation, visual diffs, and flakiness verdicts instead of raw test output.11MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI coding assistants to drive Playwright and Midscene browser automation, generate and run heuristic test suites, manage authenticated sessions, monitor UI/console/network failures, and export Playwright tests through MCP tools.11MIT
- AlicenseAqualityBmaintenanceEnables AI assistants to inspect the latest Playwright JSON report, list failed or flaky tests, and rerun only those or selected cases by test-case ID, title, tag, spec file, or project.6MIT