UUV MCP Server: Human-Readable End-to-End Tests
Generate human-readable end-to-end tests with the UUV MCP server to simplify creation, execution, and review across your CI pipeline.
npx -y @packages/mcp-serverOverview
The UUV MCP Server implements the Model Context Protocol (MCP) to produce human-readable end-to-end tests from model-driven prompts. It acts as a lightweight HTTP server that accepts structured MCP requests, forwards them to a configured language model and any registered tools, and returns deterministic, reviewable test artifacts. The result is an automated way to generate end-to-end test scenarios that are easy for engineers and reviewers to read, modify, and run in CI pipelines.
This approach separates intent (what to test) from format (how the test should look) by using MCP as the exchange format. That makes test generation reproducible, auditable, and easier to iterate on: a single server can be run locally, in CI, or as part of a microservice architecture to centralize test generation and review workflows.
Features
- Generate human-readable end-to-end tests from structured MCP prompts.
- Pluggable model backends (OpenAI-compatible or other LLMs).
- Tool integration: shell, HTTP client, file system, test runner hooks.
- Simple HTTP API with endpoints for generation, validation, and history.
- Configurable output templates so tests match your project style.
- Docker-friendly for CI and ephemeral environments.
- Request/response logging for auditability and review.
Installation / Configuration
Prerequisites: Node.js 18+ and npm or yarn.
Clone and install dependencies:
Run locally in development:
# start dev server
# or start in production mode
Environment variables (example):
Minimal config file (mcp-config.json):
Run with Docker:
Available Resources
API endpoints (default base: http://localhost:8080):
| Endpoint | Method | Purpose |
|---|---|---|
| /generate | POST | Create a human-readable end-to-end test from MCP input |
| /validate | POST | Validate a generated test against project rules or linters |
| /history | GET | List recent generation requests and responses |
| /health | GET | Liveness and readiness checks |
Example /generate request body (MCP-style):
Typical response:
Available Tools
The server supports a set of tool integrations that MCP prompts can request during generation. Tools are implemented as pluggable handlers.
Common built-in tools:
- http — make authenticated HTTP calls to verify external APIs or gather fixtures.
- shell — run shell commands to inspect repository structure or run linters.
- filesystem — read/write project files for templating or snapshot comparison.
- test-runner — invoke local test runners to validate a generated test quickly.
Register additional tools by adding modules to the server’s tools directory and referencing them in the config. Each tool exposes a small JSON-based RPC surface that MCP can call as part of generation.
Use Cases
CI-driven E2E test generation
- Generate human-readable tests during PR checks to validate new features.
- Example: A PR creates an API; MCP generates a Playwright test that hits the new endpoints, and the CI runs the test in a temp environment.
Test scaffolding for new features
- Generate starter tests from a feature description so engineers can quickly iterate.
- Example request: intent “e2e test for checkout with coupon” → server returns a complete test file matching project test style.
Reviewable test diffs
- Use /history to surface generated tests for code review, making AI-generated changes auditable.
- Preserve generation seed and model metadata to reproduce results.
Continuous validation
- Run /validate as a final gate to ensure generated tests conform to linters, coding standards, and internal test policies before merging.
Getting Started Examples
Generate a test with curl:
Fetch recent generations:
Where to find the code
Source and issues: https://github.com/e2e-test-quest/uuv/tree/main/packages/mcp-server
For contributions, review the repository README and open issues for feature requests or bug reports.