# mcp-eval-runner [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/dbsectrainer/mcp-eval-runner  
**GitHub Stars:** 0  
**npm Downloads (last month):** 358  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/mcp-eval-runner

## Description
A standardized testing harness for MCP servers and agent workflows

## Tools
Capabilities this server exposes over MCP:

- **run_suite** — Execute all fixtures in the fixtures directory. Returns a pass/fail summary.

Execution modes:
  Live mode:       fixture has a 'server' block with command/args — spawns the server
                   and calls tools via real MCP stdio transport.
  Simulation mode: no server block — assertions run against expected_output fields.

Assertion types supported in fixture expect blocks:
  output_contains: "substring"
  output_not_contains: "substring"
  output_equals: "exact text"
  output_matches: "regex"
  tool_called: "tool_name"
  latency_under: 500
  schema_match: { type: "object", required: ["result"], properties: { result: { type: "string" } } }

Step output piping: use {{steps.<step_id>.output}} in input values to reference
the output of a previous step.
- **run_case** — Run a single named test case from the fixtures directory.

Assertion types supported in fixture expect blocks:
  output_contains: "substring"
  output_equals: "exact text"
  tool_called: "tool_name"
  latency_under: 500
  schema_match: { type: "object", required: ["id"], properties: { id: { type: "number" } } }
- **list_cases** — Enumerate all available fixtures with their step counts and assertion types.
- **create_test_case** — Create a new YAML fixture file in the fixtures directory.

Supported assertion types in each step's expect block:
  output_contains: "substring"        — checks output includes this text
  output_equals: "exact"              — checks exact output match
  tool_called: "tool_name"            — verifies which tool was called
  latency_under: 500                  — asserts response time under N ms
  schema_match: { type: 'object', ... } — validates output JSON against schema
- **regression_report** — Compare current state to the last run and return what changed (regressions, fixes, new cases).
- **compare_results** — Diff two named run results by run ID. Shows regressions, fixes, new and removed cases.
- **generate_html_report** — Generate a full single-file HTML report for a completed run.
The report includes: suite summary (pass/fail counts, duration),
per-case drill-down with per-assertion pass/fail details, and
color-coded status (green=pass, red=fail, yellow=error).

Use run_suite or run_case first, then pass the returned run_id here.
- **scaffold_fixture** — Generate a boilerplate YAML fixture file in the fixtures directory.
Each tool name provided becomes a documented step with placeholder
input parameters and all supported assertion types pre-filled as comments.

Example: scaffold_fixture({ name: 'search_test', tool_names: ['search', 'summarize'] })

Supported assertion types (pre-filled as TODOs in the generated file):
  output_contains, output_equals, tool_called, latency_under, schema_match
- **evaluate_deployment_gate** — CI gate — evaluate whether recent eval runs meet a minimum pass rate threshold.
Fails (passed: false) if the pass rate of recent runs drops below min_pass_rate.
Use this in CI pipelines to block deployments on regressions.
- **discover_fixtures** — Discover fixture files across one or more directories.
Returns a list of fixtures with their names, paths, and step counts.
If no dirs are provided, uses the configured fixtures directory and
FIXTURE_LIBRARY_DIRS env var (colon-separated list of paths).

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "mcp-eval-runner": {
    "command": "npx",
    "args": ["-y","mcp-eval-runner@latest"]
  }
}
```

## Documentation

## What mcp-eval-runner does

The mcp-eval-runner MCP server turns YAML or JSON files into repeatable test cases for MCP tools and agent workflows. Each fixture has a unique name, optional description, and ordered steps. A step identifies a tool, supplies its input, and can define assertions over the result.

Fixtures can check text inclusion or exclusion, exact output, regular-expression matches, JSON Schema conformance, the tool that was called, and response latency. Later steps can receive an earlier step's output through a `{{steps.<step_id>.output}}` reference, allowing multi-step workflows to be tested without hard-coding every intermediate value.

## How it works

A fixture with a `server` block runs in live mode. The runner starts the configured executable as a child process, connects through MCP stdio, and sends each step's tool call to that process. Assertions then run against the real responses. Server errors fail the relevant step and, by default, the case.

Without a `server` block, the fixture uses simulation mode. No process is started; each step evaluates its `expected_output`, or an empty string when that field is absent. This mode is suitable for authoring and dry runs, but content-based assertions need corresponding expected output to pass.

The mcp-eval-runner MCP server stores run history in SQLite. You can execute all fixtures, target one case, inspect available cases, compare two run IDs, or generate a single-file HTML report. Regression reporting compares the current fixture state with the previous run and identifies regressions or fixes. A deployment-gate operation can fail when the recent pass rate falls below a selected threshold.

## Setup and configuration

Node.js 22.5.0 or newer and npm are required. Add the package to an MCP client's server configuration with `npx`, for example:

```json
{
  "mcpServers": {
    "eval-runner": {
      "command": "npx",
      "args": ["-y", "mcp-eval-runner@latest"]
    }
  }
}
```

Fixtures are read from `./evals` by default. The `--fixtures` or `--fixtures-dir` option selects another directory. Other supported options set the SQLite path, per-step timeout, watch mode, result format, concurrency, and an HTTP port that switches the service from stdio to HTTP. Watch mode reruns the affected fixture when files change.

## Tools and capabilities

- `run_suite` runs every fixture and returns a pass/fail summary.
- `run_case` executes one named fixture, while `list_cases` reports available fixtures, step counts, and descriptions.
- `create_test_case` writes a new simulation fixture; `scaffold_fixture` creates a boilerplate file with placeholder steps and assertion comments.
- `regression_report` examines changes against the last run, and `compare_results` diffs two stored runs.
- `generate_html_report` produces a standalone report for a completed run.
- `evaluate_deployment_gate` checks a recent pass-rate threshold for CI use.
- `discover_fixtures` searches one or more directories and honors `FIXTURE_LIBRARY_DIRS`.

## Limitations and notes

The mcp-eval-runner MCP server does not add a `server` block when creating fixtures. Files produced by `create_test_case` therefore remain in simulation mode until a live-server configuration is added manually. Simulation does not start or contact an MCP server, so it cannot verify real tool behavior.

Live evaluations use the configured child process and MCP stdio transport. The default step timeout is 30,000 milliseconds, default concurrency is one case at a time, and the default result format is console output. The package also provides a GitHub Action for running evaluations when configuration changes.

_Full upstream README: https://allmcps.com/mcp/mcp-eval-runner/readme_

