Testing

io.github.rog0xPublished by GitHub account rog0xv1.0.2Updated Oct 27, 2026

Test generation, mocks, coverage analysis for AI agents

VerifiedSTDIODesktop onlyDeveloper ToolsAI & ML

Overview

AI-generated overview

Local MCP server that gives an assistant test-generation, mock-data and coverage-analysis tools for JavaScript/TypeScript projects.

What you can do
  • Generate Jest or Vitest test cases from a function signature, covering happy paths, edge cases, errors and boundary values
  • Generate mock data records such as names, emails, addresses, UUIDs and phone numbers, optionally mixed-field
  • Generate mock REST API response payloads from a field schema, with method, status code and envelope options
  • Analyze source and test code to find untested functions, ranked by export status, complexity and async usage
  • Generate per-field assertion code from expected and actual JSON values for Jest, Vitest or Chai
When to use it
Useful when writing or filling out unit tests for a JS/TS codebase, when you need realistic fixture or API mock data quickly, or when you want a quick read on which functions lack test coverage.
Requirements
Runs as a local stdio process from the npm package @rog0x/mcp-testing-tools; the README setup installs dependencies and builds it, then points the client at the built dist/index.js with node. No authentication, environment variables or headers are declared.
Before you install
Generated tests, mocks and assertions are suggestions and should be reviewed before being committed or run. Mock data can include credit card and IP fields, so treat generated values as fake and avoid using them as real personal data. The server works on code you paste into tool calls, so consider what source code you are willing to send.

Installation

In SourceWeft

  1. Open Testing in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

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

bash
npm installnpm run build

Usage with Claude Desktop

Add to your claude_desktop_config.json:

json
{  "mcpServers": {    "testing-tools": {      "command": "node",      "args": ["path/to/mcp-testing-tools/dist/index.js"]    }  }}

License

MIT

Source: README.md at commit 738b43e

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v1.0.2LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts