mcp-testing-tools
Provides testing and quality assurance tools for AI agents via MCP, enabling generation of test cases, mock data, API mocks, coverage analysis, and assertions.
README
@rog0x/mcp-testing-tools
Testing and quality assurance tools for AI agents, exposed via the Model Context Protocol (MCP).
Tools
generate_tests
Generate test cases from a function signature. Produces four categories of tests as ready-to-run Jest or Vitest code:
- Happy path -- valid inputs, expected outputs
- Edge cases -- empty strings, zero values, null parameters
- Error cases -- missing arguments, wrong types
- Boundary values -- extreme numbers, large arrays, NaN
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
signature |
string | Yes | Function signature, e.g. async function fetchUser(id: number): Promise<User> |
framework |
string | No | jest or vitest (default: vitest) |
module_path |
string | No | Import path for the module under test (default: ./module) |
generate_mock_data
Generate realistic mock data for testing. Supported types:
name, email, address, date, uuid, phone, company, credit_card, ip
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
type |
string | Yes | Data type to generate |
count |
number | No | Number of items (default: 10, max: 1000) |
locale |
string | No | en or es (default: en) |
types |
string[] | No | Generate mixed records with multiple field types |
generate_api_mock
Generate mock API responses from a schema definition. Creates realistic JSON payloads for REST endpoints by inferring values from field names and types.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
endpoint |
string | Yes | API endpoint path |
method |
string | No | HTTP method (default: GET) |
fields |
object[] | Yes | Field schemas with name, type, optional items, fields, nullable, enum |
count |
number | No | Number of records (default: 1, max: 100) |
status_code |
number | No | HTTP status code (default: 200) |
wrap_in_envelope |
boolean | No | Wrap in { success, data, meta } (default: true) |
analyze_test_coverage
Analyze source code and test code to find untested functions. Prioritizes suggestions by:
- Export status (public API surface)
- Cyclomatic complexity estimate
- Parameter count
- Async functions (more error paths)
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
source_code |
string | Yes | Source code to analyze |
test_code |
string | Yes | Existing test code |
source_file_name |
string | No | Filename label (default: source.ts) |
generate_assertions
Generate detailed assertion code by comparing expected and actual values. Performs deep diff and produces per-field assertions with descriptive comments.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
expected |
string | Yes | Expected value as JSON string |
actual |
string | Yes | Actual value as JSON string |
label |
string | No | Description for the comparison |
framework |
string | No | jest, vitest, or chai (default: jest) |
deep |
boolean | No | Deep equality for objects/arrays (default: true) |
Setup
npm install
npm run build
Usage with Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"testing-tools": {
"command": "node",
"args": ["path/to/mcp-testing-tools/dist/index.js"]
}
}
}
License
MIT
Recommended Servers
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.