testing-toolkit-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@testing-toolkit-mcp review the tests I just wrote"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
testing-toolkit-mcp
Coding agents now write and modify tests, but they have no view of test health. They retry flaky tests instead of recognising them, write assertions that prove nothing, and change prompts without any regression signal. Every one of those mistakes is invisible to the agent because the tools that would catch it live outside the conversation.
This is a Model Context Protocol server, written in TypeScript for the Node.js runtime, that gives agents that view as tools they can call. It wraps three Java testing tools so any MCP client (Claude Code, Claude Desktop, IDE agents) can ask instead of guess:
flake-detector: which tests are flaky, why, and what is quarantined.
test-quality-linter: lint a test file or a whole test tree and get findings with fix hints.
llm-eval-harness: run a golden set against a prompt version and report scores and drift.
Requirements
Node.js 22 or newer
Java 17 or newer on the
PATH(the tools are Java command-line jars)
Related MCP server: Autonomous QA Engineer MCP
Install
The package is not published to npm yet (planned, see docs/releasing.md). Until then, build it from a checkout:
git clone https://github.com/byreshb/testing-toolkit-mcp.git
cd testing-toolkit-mcp
npm ci
npm run buildnode dist/index.js then starts the server on stdio; --version and --help are the only
options.
Quick start
Register the server with your MCP client, pointing TOOLKIT_REPO at the project whose tests you
care about. With Claude Code:
claude mcp add testing-toolkit -e TOOLKIT_REPO=/path/to/project \
-- node /path/to/testing-toolkit-mcp/dist/index.jsWith Claude Desktop or any other client that takes a JSON block:
{
"mcpServers": {
"testing-toolkit": {
"command": "node",
"args": ["/path/to/testing-toolkit-mcp/dist/index.js"],
"env": { "TOOLKIT_REPO": "/path/to/project" }
}
}
}Then ask the agent about test health, or use one of the prompts. In Claude Code:
> /mcp__testing-toolkit__triage-red-build target/surefire-reportsruns flake.gate over the JUnit reports, explains every failure from the run history, and ends
with the list of real regressions and the list of flakes to quarantine. Asking "review the tests
I just wrote" makes it call tql.lint, which returns findings with fix hints, and read resources
such as toolkit://tql/rules/TQL003 to cite the rule it is applying. Before shipping a prompt
edit, /mcp__testing-toolkit__check-prompt-change runs the golden set with llmeval.run and
compares it with the baseline through llmeval.drift. A full walkthrough and the configuration
for other clients are in docs/clients.md.
Tools and resources
Name | Kind | What it does |
| tool | Most flaky tests first, with scores and explanations |
| tool | Why one test has the score it has |
| tool | Quarantined tests, expiry and owner |
| tool | Should these failed tests block the build? Verdict and reasoning |
| tool | Lint test sources; findings with rule, severity, location, fix |
| tool | Catalogue of linter rules |
| tool | Full documentation of one rule |
| tool | Run a golden set against a prompt version; per-case scores |
| tool | Cases that regressed between two runs |
| resource | The scoring formulas, for citing |
| resource | The rule's documentation page, for citing |
| prompt | Lint, then summarise by rule with fixes |
| prompt | Gate, then explain every failure |
| prompt | Run the golden set, then drift against the baseline |
Inputs, outputs and examples for every tool are in docs/tools.md.
Configuration
Everything is read from environment variables, so it works the same in an MCP client's config block, a shell and a container.
Variable | Default | Meaning |
| current directory | Repository the tools run against when a tool call does not name one. |
|
| Where downloaded jars and cached docs live. |
|
| Java executable; Java 17 or newer is required. |
| download | Path to a local |
| download | Path to a local |
| download | Path to a local |
| download from GitHub | Path to a local checkout's |
| download from GitHub | Path to a local checkout's |
| download from GitHub | Path to a local checkout's |
|
| Release to download jars and docs from, when none is set locally. |
|
| How long one tool invocation may run before it is killed. |
| none | Bearer token required by |
|
| Interface |
|
| Port |
On first use of each tool family the server looks for a jar in TOOLKIT_HOME/jars/, and when
there is none it downloads the CLI asset of the matching GitHub Release. Delete that directory
to pick up a newer release, or pin one with TOOLKIT_TOOLS_VERSION. If Java is missing or older
than 17 every tool call fails with a message that says how to fix it.
The server speaks stdio by default; --http serves Streamable HTTP instead, for sharing one
running server between clients or for a container. See
docs/clients.md for the HTTP transport and
docs/clients.md for running it in Docker.
Building and testing
npm ci # install the pinned dependencies
npm run check # tsc --noEmit, eslint and prettier --check
npm test # vitest with coverage (fails under 85% lines)
npm run build # compile to dist/
npm run format # apply prettierContinuous integration
Every push and pull request runs the GitHub Actions workflow in .github/workflows/ci.yml:
npm ci, npm run check and npm test, with the coverage report uploaded as an artifact.
Releasing
Move the
Unreleasednotes inCHANGELOG.mdunder a new version heading and set that version inpackage.json.Commit, then tag and push:
git tag -a v1.2.3 -m "Release 1.2.3" && git push origin v1.2.3.The release workflow in
.github/workflows/release.ymlchecks the tag matchespackage.json, builds and packs the package, and publishes a GitHub Release with the changelog section as its notes and the tarball attached.
Full steps, including the planned but not yet configured npm publishing, are in docs/releasing.md.
License
Apache License 2.0, see LICENSE.
Available Tools
9 toolsflake.explainExplain a test's flakiness scoreARead-onlyIdempotent
Returns the score of one test with every component that contributed to it (flip rate, rerun recovery, failure-message entropy, confidence interval, correlations with runner and hour) and the explanation flake-detector gives. Test ids look like com.acme.CheckoutTest#appliesCoupon.
Inputs: testId (required), repo. Returns: id, runs, score, failures, +10 more
flake.gateDecide whether failed tests should block the buildARead-onlyIdempotent
Runs flake-detector's gate over a directory of JUnit XML reports (for example target/surefire-reports). Failures of quarantined or known-flaky tests do not block; any other failure does. Returns the verdict, each failure with the decision taken, and the reasoning.
Inputs: repo, reports. Returns: verdict, exitCode, failures, reasoning
flake.quarantine.listList quarantined testsARead-onlyIdempotent
Reads the quarantine ledger (.flake/quarantine.yaml) and returns every entry with its reason, owner, expiry and whether it has expired. Expired entries fail the build until they are renewed or removed.
Inputs: repo. Returns: entries
flake.rankRank tests by flakinessARead-onlyIdempotent
Runs flake-detector's scorer over the ingested run history (.flake/history.db in the repository) and returns the most flaky tests first, each with a 0-1 score, run count, the signals behind the score and a plain-language explanation. Use it before retrying a failing test or deciding whether a red build is a regression.
Inputs: top, repo. Returns: runs, tests, generatedAt
llmeval.driftCompare a run against a baselineARead-onlyIdempotent
Compares two llm-eval-harness result files and returns the cases whose score dropped by more than the threshold or that flipped from pass to fail. Use it after llmeval.run to see whether a prompt change or model upgrade regressed anything.
Inputs: current (required), baseline (required), repo, threshold. Returns: cases, summary, verdict, threshold
llmeval.runRun a golden set against a prompt versionAIdempotent
Runs llm-eval-harness over a golden dataset with one prompt version and returns every case with its checks, score, tokens and latency, plus the pass rate. Mode replay (default) serves recorded responses and needs no API key; record calls the model and saves recordings. The result file path is returned for llmeval.drift.
Inputs: prompt (required), version (required), goldenSet (required), mode, +1 more. Returns: mode, cases, model, prompt, +3 more
tql.explainExplain a test-quality-linter ruleARead-onlyIdempotent
Returns the documentation of one rule: what it catches, a bad example, a fixed example and its options. Rule ids look like TQL003.
Inputs: ruleId (required). Returns: id, doc, name, severity, +1 more
tql.lintLint Java tests for weak assertionsARead-onlyIdempotent
Runs test-quality-linter over test sources and returns findings with rule id, severity, location, message and fix hint. Catches tautological or constant assertions, tests with no assertion, assertions on stubs, hard-coded sleeps, swallowed exceptions, duplicate bodies and more. Paths are relative to the repository.
Inputs: repo, paths, config, failOn. Returns: files, failed, summary, findings
tql.rulesList test-quality-linter rulesARead-onlyIdempotent
Returns the catalogue of rules the linter applies: id, name, default severity and a one-line description. Use tql.explain or the toolkit://tql/rules/{id} resource for the full documentation of one rule.
Inputs: no named parameters. Returns: rules
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool is namespaced by subdomain (tql, flake, llmeval) and has a distinct responsibility: linting, rule docs, flake scoring/explanation/gating, and evaluation/drift comparison. There is no real overlap; even flake.rank and flake.gate are clearly separated as historical scoring vs build-gate decision.
Names follow a consistent lowercase dotted-prefix convention where the first segment identifies the subdomain (tql, flake, llmeval). Minor inconsistency comes from mixing verb segments (lint, run, explain) with noun segments (rules, gate) and one three-part name (flake.quarantine.list), but this remains predictable.
Nine tools is a well-scoped size for a testing toolkit covering three distinct areas: static test analysis, flaky-test detection/gating, and LLM evaluation. Each tool addresses a separate workflow step without bloat.
Core workflows are covered: listing/explaining rules and linting, scoring/explaining flaky tests and applying a gate, plus running evaluations and checking drift. The main gap is that quarantine entries can be listed but not added, renewed, or removed, so managing the quarantine lifecycle requires external edits.
Maintenance
Related MCP Connectors
QA platform for agents: coverage signals, in-repo test plans, verified tests and release governance.
Synthetic checks, nightly regression replay and model-drift alerts for AI agents
Flaky test detection, root cause analysis, and fix suggestions for development teams.
Change-aware CI validation and affected-test guidance for coding agents.
Related MCP Servers
AlicenseNot gradedqualityCmaintenanceConnect AI agents to your test results, insights, and targets. Query test runs, failures, flaky tests, and regressions across frameworks including Playwright, Jest, Pytest, Cypress and more.46 npmMIT- FlicenseNot gradedqualityDmaintenanceProvides MCP tools that give LLM agents a full QA engineer workflow: scanning projects, generating deterministic test suites, executing them across browser/API/mobile, diagnosing failures, and proposing fixes that require human approval.-
- AlicenseNot gradedqualityCmaintenanceEnables evidence-first regression testing for AI agents by turning production traces into reviewed, replayable cases that gate releases. It supports reproducible, auditable agent evaluation with controlled tool execution, evidence-based judging, and versioned quality gates.MIT
- AlicenseAqualityCmaintenanceProvides AI coding agents with reliable root-cause diagnosis and minimal, high-confidence fixes for failing tests.31MIT