mcpField
@
@rog0x/mcp-testing-tools

@rog0x/mcp-testing-tools

Local
github.com/rog0xDeveloper Tools0Updated 32w ago

About @rog0x/mcp-testing-tools

@rog0x/mcp-testing-tools is a testing and QA MCP server for AI agents. It generates Jest or Vitest tests, mock data and API responses, and can analyze coverage and produce assertions.

Key features

  1. 01Generate tests from function signatures
  2. 02Create mock data in multiple types
  3. 03Build API responses from schemas
  4. 04Find untested functions and rank suggestions
  5. 05Compare values and generate assertions

Use cases

  1. 01Add boundary and error tests to functions
  2. 02Prepare mock records or API payloads
  3. 03Identify functions to prioritize for testing
  4. 04Turn expected and actual values into assertions

MCP support

The MCP server exposes tools for test generation, mock data, API mocking, coverage analysis, and assertion generation to AI agents.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"testing-tools": {
"command": "npx",
"args": [
"-y",
"@rog0x/mcp-testing-tools"
]
}
}
}
Run commandnpx -y @rog0x/mcp-testing-tools

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@rog0x/mcp-testing-tools1.0.2

Tools

5

Saved tool list · updated 3w ago

ParameterTypeRequiredDescription
frameworkenumNoTest framework to generate for (default: vitest)jest | vitest
signaturestringYesThe function signature to generate tests for, e.g. "export async function fetchUser(id: number): Promise<User>"
module_pathstringNoImport path for the module under test (default: "./module")

Details

From the project 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:

NameTypeRequiredDescription
signaturestringYesFunction signature, e.g. async function fetchUser(id: number): Promise<User>
frameworkstringNojest or vitest (default: vitest)
module_pathstringNoImport 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:

NameTypeRequiredDescription
typestringYesData type to generate
countnumberNoNumber of items (default: 10, max: 1000)
localestringNoen or es (default: en)
typesstring[]NoGenerate 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:

NameTypeRequiredDescription
endpointstringYesAPI endpoint path
methodstringNoHTTP method (default: GET)
fieldsobject[]YesField schemas with name, type, optional items, fields, nullable, enum
countnumberNoNumber of records (default: 1, max: 100)
status_codenumberNoHTTP status code (default: 200)
wrap_in_envelopebooleanNoWrap 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:

NameTypeRequiredDescription
source_codestringYesSource code to analyze
test_codestringYesExisting test code
source_file_namestringNoFilename 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:

NameTypeRequiredDescription
expectedstringYesExpected value as JSON string
actualstringYesActual value as JSON string
labelstringNoDescription for the comparison
frameworkstringNojest, vitest, or chai (default: jest)
deepbooleanNoDeep 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

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.