mcp-eval-runner

v1.0.1
io.github.dbsectrainer/mcp-eval-runner Checked 2 days ago Published 29 days ago

A standardized testing harness for MCP servers and agent workflows

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

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:…

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" } } }

ParameterTypeDescription
name *stringThe name of the fixture to run

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

ParameterTypeDescription
name *stringThe name of the new test case
steps *arrayArray of steps for the test case
descriptionstringOptional description for the test case

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.

ParameterTypeDescription
run_id_a *stringFirst run ID to compare
run_id_b *stringSecond run ID to compare

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.

ParameterTypeDescription
run_id *stringThe run ID returned by run_suite or run_case

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

ParameterTypeDescription
name *stringName for the new fixture (becomes filename)
tool_names *arrayList of tool names — each becomes a fixture step

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.

ParameterTypeDescription
min_pass_rate *numberMinimum acceptable pass rate (0.0 – 1.0)
lookback_runsintegerNumber of most-recent runs to consider (default: 10)
workflow_namestringOptional suite/workflow name to filter runs by

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).

ParameterTypeDescription
dirsarrayList of directories to scan for fixtures