QA-MCP-Learning-Lab

QA-MCP-Learning-Lab

Showcases principal-level QA architecture using MCP tools and Playwright for validating security, business workflows, contract safety, and cross-layer consistency.

Category
Visit Server

README

QA-MCP-Learning-Lab

Project Overview

QA-MCP-Learning-Lab is a showcase repository for principal-level quality engineering architecture using Model Context Protocol (MCP) tools and Playwright-based UI validation. The project demonstrates how modern QA systems can validate security, business workflows, contract safety, and cross-layer consistency in a single, extensible test harness.

QA Pillars

  • Security / Session Integrity
    • Validate authentication, authorization, and protected endpoint behavior.
  • Business Workflows
    • Exercise end-to-end business logic for create/read/update/delete flows.
  • Contract / Data Safety
    • Enforce request and response schemas with Zod to prevent malformed payloads.
  • Cross-Layer Sync
    • Verify that backend behavior and frontend/UI expectations remain aligned.

Architectural View

πŸ—οΈ QA & System Architecture Overview

This section outlines how our test suites, core infrastructure, and quality pillars connect to deliver reliable software outputs.


πŸ—ΊοΈ Architecture Blueprint

Layer Component Group Included Elements & Responsibilities
Layer 1 πŸ› οΈ Test Harness MCP Tools β€’ Node Unit Tests β€’ Playwright UI Tests<br>The entry point where all automated tests run.
Layer 2 πŸ’» System Components Server & Tool Registry β€’ API / Business Logic β€’ Frontend Browser β€’ Zod Schemas<br>The actual application code and infrastructure being tested.
Layer 3 πŸ›‘οΈ QA Pillars Security & Session Integrity β€’ Contract & Data Safety β€’ Cross-Layer Sync<br>The core criteria ensuring safety, data contract validation, and system sync.
Layer 4 πŸ“Š Outputs QA Reports & Artifacts<br>The final test results, logs, and compliance documentation generated.

πŸ”„ How Data Flows

  1. Test Execution: The Test Harness (Layer 1) fires automated tests.
  2. System Evaluation: These tests hit the System Components (Layer 2) to verify the UI, API, and schemas.
  3. Core Validation: The system behaviors are filtered against our strict QA Pillars (Layer 3).
  4. Final Delivery: The pipeline outputs clean, client-ready QA Reports (Layer 4) showing exactly what passed or failed.

Directory Structure

  • src/tools
    • MCP tool implementations and tool registration logic.
  • src/tests
    • Node-based unit tests and Playwright smoke/e2e tests.
  • src/utils/schema.ts
    • Shared Zod schemas for request/response contract validation.
  • src/playwright
    • Playwright configuration and browser-based test setup.
  • src/server.ts
    • Application entry point for local execution and tool exposure.

MCP Tool Registration

MCP tools are implemented under the src/tools area and registered with the server entry point so they can be exposed to clients in a structured, discoverable way. The server acts as the orchestration layer for tool execution and test interaction.

Zod Schemas and Contract Enforcement

Zod schemas provide runtime validation for payload structures and API contracts. They help ensure the system fails fast when requests or responses drift from the expected shape, improving diagnostics and preventing downstream compatibility issues.

Test Portfolio

The project is organized as a showcase test portfolio with 10 milestone tests across four phases.

  • Phase 1: Session & Security (2 tests)
    • Authentication/session handling
    • Protected endpoint security
  • Phase 2: CRUD & Business Logic (4 tests)
    • Create, read, update, and delete workflow coverage
  • Phase 3: Contract & Diagnostics (2 tests)
    • Schema validation and contract-safe behavior
  • Phase 4: Cross-Layer UI (2 tests)
    • Frontend/browser-level verification against the same product behavior
    • One test is optional and runs only when a valid BASE_URL is configured

Total showcase tests: 10

Note: this repository does not include a hosted frontend application by default. To enable the optional UI smoke check, set BASE_URL to a running frontend URL such as http://localhost:3000 or your deployed app URL.

CI/CD

The project includes a GitHub Actions workflow at .github/workflows/ci.yml that runs the build and test pipeline automatically.

CI Workflow Expectations

  • Install dependencies with npm ci
  • Build the TypeScript project with npm run build
  • Execute the test harness with npm test
  • Publish Playwright report artifacts for inspection

Available npm Scripts

  • npm run build
  • npm test

Test Reports

Playwright reports are generated into the test-results directory, including an HTML report for browser-based validation.

How to Run

npm ci
npm run build
npm test
npx playwright show-report

Environment Variables

  • BASE_URL β€” Optional frontend URL used by the Playwright frontend smoke test.
  • Example: BASE_URL=http://localhost:3000 or BASE_URL=https://demo.realworld.show

If BASE_URL is not set, the optional frontend verification test will be skipped, but the remaining workflow and contract tests will still run.

Test inventory (what runs today)

Primary showcase tests (10):

  • src/tests/conduit.phase1.test.ts β€” 2 tests (Session & Security)
  • src/tests/phase2-crud.test.ts β€” 4 tests (CRUD & Business Logic)
  • src/tests/phase3-contract.test.ts β€” 2 tests (Contract & Diagnostics)
  • src/tests/phase4-ui.test.ts β€” 2 tests (Cross-Layer UI)

Additional tests included in the repository (not part of the primary 10):

  • src/tests/playwright.smoke.test.ts β€” 2 Playwright checks (engine availability + optional frontend smoke check)
  • src/tests/run-all-tests.report.test.ts β€” 1 internal regression/test helper (parses Playwright JSON)

When the harness runs all files in src/tests, these extras will increase the total test count reported (e.g. 13 total in some runs). To restrict reports to the 10 showcase tests, exclude the helper files or adjust the harness filter.

Future Enhancements

  • Add custom reporters for phase-by-phase test results and trend tracking
  • Integrate with a dashboard for richer QA visibility and historical reporting

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured