Skip to main content
Glama

testrun-mcp

Let your AI agent run your tests and read the result without drowning in a 5,000-line log.

testrun-mcp is an MCP server that runs a project's tests and returns a small, structured answer: counts, the failures with only the traceback frames that matter, collection errors kept apart from real failures, the slowest tests, and which Python interpreter was used. It then lets the agent re-run just the failures, explain one in full (with local variables), check whether a test is flaky, and see which lines are not covered.

Running tests executes the project's code. Test files, conftest.py, pytest plugins, fixtures and anything imported at collection time all run with your user's permissions. Only point this server at code you would run yourself. See Security.

What is different from the other test-runner MCP servers

There are already MCP servers that run pytest (for example pytest-evidence-mcp and mcp-pytest-runner). testrun-mcp is built around the parts that go wrong when an agent runs tests in a loop:

  • Four runners, one interface: pytest, unittest, jest and vitest.

  • flaky_check: runs one test N times in fresh processes and gives the pass/fail pattern (PPFPP), a verdict and the failure rate.

  • Hangs and crashes are results, not hangs: a hard timeout kills the whole process tree (a Windows Job Object, or a POSIX process group), and the result names the test that was running. Tests that leave a daemon behind do not leak it.

  • Safe by default for an unattended agent: no shell, stdin closed, output capped, an allow-list for extra_args, selectors confined to the project, secrets scrubbed from the environment, an optional --dir sandbox.

  • Honest about the environment: every result says which interpreter ran the tests; if pytest is missing there, the error says how to point at the project's virtualenv.

  • Collection errors are separate from failures, so an import error never looks like a failing assertion.

Related MCP server: testmcp

Install

Claude Code:

claude mcp add testrun -- uvx testrun-mcp

Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "testrun": {
      "command": "uvx",
      "args": ["testrun-mcp"]
    }
  }
}

With a sandbox and one allowed environment variable:

{
  "mcpServers": {
    "testrun": {
      "command": "uvx",
      "args": ["testrun-mcp", "--dir", "C:/code", "--allow-env", "DATABASE_URL"]
    }
  }
}

Needs Python 3.10+. For jest/vitest you also need node on PATH and the project's node_modules installed (the server never installs packages). coverage_summary needs coverage installed in the project's Python environment.

What it looks like

A project with one failing test, as returned by run_tests (trimmed):

{
  "runner": "pytest",
  "interpreter": "C:\\proj\\.venv\\Scripts\\python.exe (project venv)",
  "outcome": "failed",
  "summary": {"passed": 41, "failed": 1, "error": 0, "skipped": 2, "xfailed": 0, "xpassed": 0,
              "total": 44, "collection_errors": 0},
  "duration_s": 3.1,
  "failures": [{
    "id": "tests/test_cart.py::TestCart::test_total",
    "kind": "failure",
    "message": "assert 19.0 == 20.0\n +  where 19.0 = total()",
    "location": "src/cart.py:27",
    "frames": [
      {"file": "tests/test_cart.py", "line": 14, "in": "test_total", "code": "assert total() == 20.0"},
      {"file": "src/cart.py", "line": 27, "in": "total", "code": "return round(subtotal - discount, 2)"}
    ],
    "stdout": "cart has 3 items"
  }],
  "slowest": [{"id": "tests/test_io.py::test_big_file", "seconds": 1.2}],
  "next": "rerun_failed, or explain_failure(test_id) for the full traceback"
}

When a test hangs:

{"outcome": "timeout", "running_when_stopped": "tests/test_net.py::test_connect",
 "finished_before_stop": {"passed": 12}, "output_tail": "..."}

Tools

Tool

What it does

detect_runner(path)

Which runner the project uses, the evidence, how it would be run, whether it is ready, which interpreter and which pytest/coverage versions it has. Runs none of the tests.

run_tests(path, selector, timeout, extra_args, python, runner)

Run the tests. Counts, failures with trimmed tracebacks, collection errors, slowest tests.

rerun_failed(path)

Re-run only what failed in the last run for that project.

list_tests(path, selector, filter)

Collect without running: ids and collection errors.

flaky_check(path, test_id, n)

Run one test 2-20 times, report the pattern and a verdict.

explain_failure(path, test_id)

Re-run one test with the long traceback and --showlocals; the full detail.

coverage_summary(path, files, selector)

Per-file percent and uncovered line ranges (Python, needs coverage).

Test ids are what the tools print: pytest tests/test_a.py::TestX::test_y[param], unittest pkg.test_mod.Class.test_name, jest/vitest path/to/file.test.js::full test name.

extra_args accepts only an allow-list of flags (for pytest: -x, --maxfail=N, -k, -m, --deselect, --ignore, --runxfail, --strict-markers, -l, --durations=N, -W, --import-mode, --disable-warnings). Anything else is refused with the list of what is allowed.

Try asking

  • "Run the tests in C:/code/myapp and tell me what is broken."

  • "Which tests are failing? Show me only the first one in detail, with local variables."

  • "Fix that, then re-run only the failures."

  • "Is tests/test_sync.py::test_retry flaky? Run it 10 times."

  • "The test run hangs. Which test is it?"

  • "List the tests whose name contains parser."

  • "What lines of src/parser.py are not covered by the tests?"

  • "What test runner does this project use and is it set up?"

Which Python runs the tests

The server's own interpreter almost never has your project's dependencies, so for Python projects the order is: the python= argument (a path to an interpreter, or uv, which runs uv run --frozen python), then a virtualenv inside the project (.venv, venv, env, .env), then the interpreter the server itself runs on. The result always says which one was used. If pytest is not installed there you get an error that names the interpreter and what to do, rather than a confusing failure.

Security

This server runs arbitrary project code by nature. What it does and does not do:

  • No shell. Every process is started from an argument list; nothing is interpreted by cmd.exe or sh. Stdin is closed, so a test cannot wait for input.

  • Hard timeout with process-tree kill. On Windows the test process is placed in a Job Object (KILL_ON_JOB_CLOSE), so every descendant dies at the timeout, at the end of the run, and if the server itself dies. On Linux and macOS it runs in its own session and the whole process group gets SIGKILL. A descendant that deliberately calls setsid() escapes the POSIX kill, and on POSIX test processes are not stopped if the server is killed outright.

  • Output caps. At most 32 KiB from the start and 96 KiB from the end of the output are kept in memory; the rest is counted and dropped. The result text is bounded too (20 failures, 1.5 KB of output each, 5 traceback frames each).

  • extra_args allow-list and selector checks. Flags such as -p, -c, --rootdir, --junitxml, --config and --setupFiles are refused because they load code or move results. A selector may not start with - and, for pytest, may not point outside the project.

  • Environment scrubbing (on by default). Test processes get only a short list of basics (PATH, HOME, TEMP, SYSTEMROOT, locale, ...). API keys and tokens in the server's environment do not reach the tests. The operator opens variables with --allow-env NAME (repeatable) or turns scrubbing off with --inherit-env. These are server flags, not tool arguments, so an agent cannot widen them.

  • --dir DIR sandbox. Only projects inside DIR can be tested. This is a path check on the path argument. It is not a container: the tests themselves can read and write anywhere your user can. Use a VM, container or separate account for code you do not trust.

  • python= must name an existing interpreter (python* or pypy*) so the option cannot be used to launch arbitrary programs.

  • The server never installs packages and never writes into the project (reports go to a temporary directory; pytest's cache plugin is disabled).

Not covered: tests that deliberately escape (network access, writing files, setsid), and code that runs at import time in conftest.py before any of this matters.

Limitations

  • pytest ids and counts come from JUnit XML. A project whose addopts makes pytest quieter (-q) can hide the per-test lines used to name a hung test; the timeout still works.

  • list_tests ignores the project's addopts so the output format is predictable.

  • jest and vitest can only be listed per file; a test id is file::full name.

  • coverage_summary is Python only and runs the tests under coverage run.

  • flaky_check runs a test in isolation; ordering- or parallelism-dependent flakiness needs run_tests on the surrounding module.

  • The "last run" that rerun_failed uses lives in the server's memory, per project.

Development

uv sync --extra test
uv run pytest tests
uv run --with ruff==0.16.0 --with mypy==2.3.0 ruff check src tests
uv run --with ruff==0.16.0 --with mypy==2.3.0 mypy --strict src

The tests build real temporary projects (passing, failing, flaky via a counter file, hanging, import errors, huge output) and run real pytest, unittest and node against them, including a proof that a grandchild process is dead after a timeout. Real jest and vitest run when you npm ci in tests/fixtures/js_jest and tests/fixtures/js_vitest (the real-js CI job).

Want to build this yourself? testrun-mcp-the-hard-way is a seven-module tutorial that builds a minimal version from scratch.

MIT licensed.

Available Tools

7 tools
coverage_summaryA

Run the Python tests under coverage.py and report per-file percent and the uncovered line ranges (e.g. "12-15, 20"). Needs coverage installed in the project's interpreter (the error says which). Data goes to a temp dir; nothing is written into the project.

files: optional list of paths or globs relative to the project (src/app.py, src/*.py) to report; default is the 30 least-covered project files plus the total percent. selector: run only part of the suite. Python projects only.

NameRequiredDescriptionDefault
pathNo.
filesNo
pythonNo
runnerNo
timeoutNo
selectorNo

Output Schema

NameRequiredDescription

No output parameters

TDQS

A3.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are supplied, so the description carries the full behavioral burden, and it does meaningful work: it states the external dependency ('coverage' installed in the project's interpreter, with the error naming it), and that coverage data goes to a temp dir and nothing is written into the project. It omits runtime cost and side effects of actually executing the test suite (the 600s default timeout hints at this but is not explained).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The output shape and dependency requirement are front-loaded, followed by per-parameter notes. Prose is tight with no filler; the only weakness is that the parameter notes are not labeled for the two undocumented parameters, so the reader cannot tell whether they are intentionally omitted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be explained, and the description covers the key dependency and write-safety behavior. But for a six-parameter test-execution tool with zero annotation coverage, leaving four parameters (including python, runner, and timeout) unexplained means an agent cannot confidently control the run.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It explains two of six parameters well -- 'files' (formats and globs, plus the surprising default of 30 least-covered files) and 'selector' (partial suite). 'path', 'python', 'runner', and 'timeout' receive no explanation at all, leaving a substantial gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb and resource: run Python tests under coverage.py and report per-file percent plus uncovered line ranges, with an example format ('12-15, 20'). It is clear what the tool produces, though it never names or contrasts itself with the sibling run_tests, so an agent must infer the difference.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage context is implied by 'Python projects only' and by the selector note ('run only part of the suite'), and the default behavior (30 least-covered files plus total percent) tells the agent what happens if it omits files. However, there is no explicit when-to-use vs run_tests / rerun_failed guidance, which matters given six sibling tools in the same suite.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

detect_runnerA

Detect which test runner a project uses, without running any of its tests.

Looks for pytest (config, conftest.py, dependencies), unittest, jest and vitest (package.json, config files). For each candidate: the evidence, the exact way it would be run, and whether it is ready (pytest importable, node_modules present). For Python it also reports which interpreter would be used (project .venv, else the server's own) and the versions of pytest/coverage found there. Returns test directories too.

path: project root (absolute is safest). python: optional interpreter path, or 'uv'.

NameRequiredDescriptionDefault
pathNo.
pythonNo

Output Schema

NameRequiredDescription

No output parameters

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does substantial work: it declares the read-only nature, enumerates what evidence is gathered per candidate, and explains that readiness depends on pytest being importable or node_modules existing. It stops short of saying what happens when nothing is detected or how costly the scan is.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The key scoping claim is front-loaded in the first sentence, followed by supporting detail about what is inspected and returned. It is slightly long and the trailing parameter lines are terse fragments, but no sentence is padding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter, read-only detection tool with an output schema, this covers what it inspects, how readiness is judged, interpreter resolution, and even test directories. The only real gap is the no-runner-detected case, a minor omission given the return schema exists.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate, and it does: 'path' is described as the project root with the advice that absolute is safest, and 'python' is described as an optional interpreter path or the literal 'uv'. Both parameters get meaning the bare schema lacks, though the exact 'uv' behavior is left implicit.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource — 'Detect which test runner a project uses' — and immediately scopes it with 'without running any of its tests', which cleanly separates it from run_tests and rerun_failed. An agent can pick this out of the sibling list without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'without running any of its tests' implies a pre-flight/inspection use, and the readiness checks hint that this precedes actual execution. However, no sibling is named, no explicit when-to-use or when-not-to-use rule is given, and the agent must infer the relationship to run_tests or list_tests.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

explain_failureB

Full detail for one failing test: re-runs just that test with the long traceback and (for pytest) --showlocals, and returns the complete traceback text (capped at 20k chars) with local variable values, the assertion message, and captured stdout/stderr. If the test passes when run alone, it says so (flaky or order-dependent).

NameRequiredDescriptionDefault
pathYes
pythonNo
runnerNo
test_idYes
timeoutNo

Output Schema

NameRequiredDescription

No output parameters

TDQS

B3.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden well: it discloses that the tool re-executes the test (a real side effect with cost), enables --showlocals for pytest, caps output at 20k chars, and reports when a test passes in isolation. That 'passes alone' behavior is exactly the kind of non-obvious trait an agent needs. It omits permission/environment requirements and how long an isolated run may take beyond the schema's timeout default.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the core action and output shape, with no filler. The mid-sentence parenthetical about --showlocals interrupts flow slightly but adds real information rather than padding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so explaining return values is optional — the description does so anyway and adds value with the 20k cap and pass-alone case. What's missing is parameter guidance for a five-parameter tool with zero schema descriptions, which leaves a real gap before the agent can call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and there are five parameters, so the description must compensate — it does not. path, python, runner, test_id, and timeout are never explained; only a passing parenthetical ('for pytest') hints that runner relates to the test framework. An agent must guess formats for test_id and how python/runner interact with autodetection.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and narrow scope: 'Full detail for one failing test' with a re-run under extended tracing. An agent can tell this is a deep-dive single-test diagnostic rather than a suite run. However, it never names or contrasts with siblings such as rerun_failed or flaky_check, which overlap on the 'rerun and detect flakiness' angle.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the phrasing 'one failing test' — call it when you already have a known failure and need detail. There is no explicit when-not guidance or statement of which sibling to use first (e.g. run_tests vs rerun_failed vs this). The flaky/order-dependent clause hints at a related use case but doesn't route the agent between this and flaky_check.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

flaky_checkA

Run ONE test n times (2-20, each a fresh process) and report the pass/fail pattern.

Returns pattern like "PPFPP" (P pass, F fail, S skipped, T timeout), counts, a verdict (flaky | stable_pass | consistently_failing | inconclusive), the failure rate, and the first failure's details. Worst case it takes n x timeout seconds. A test that is only flaky when run with others (ordering, parallelism, shared state) can pass here; check that with run_tests on the surrounding file.

test_id: exact id from run_tests/list_tests (pytest: path::Class::test[param]; jest/vitest: path/file.test.js::full test name; unittest: dotted name).

NameRequiredDescriptionDefault
nNo
pathYes
pythonNo
runnerNo
test_idYes
timeoutNo

Output Schema

NameRequiredDescription

No output parameters

TDQS

A4.3/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are supplied, so the description carries the full burden and does it well: it discloses process isolation per run, the n range (2-20), the worst-case cost ('n x timeout seconds'), the verdict taxonomy (flaky | stable_pass | consistently_failing | inconclusive), and that failure details for the first failure are included. It also warns about a false-negative mode (passing here despite order-dependent flakiness).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the action and the return shape, then cost, then the false-negative caveat, then the id format. Dense but nearly every sentence earns its place; the verdict enumeration is slightly redundant with the output schema but still aids interpretation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 6-parameter test-execution tool with an output schema, the description covers the essential contract: what it runs, how many times, what it returns, and how long it can take. The remaining gap is what 'path' and 'runner'/'python' mean operationally (project root vs file path, runner override semantics).

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate; it does so strongly for test_id (exact id formats for pytest, jest/vitest, unittest) and gives the n range plus the timeout relationship implicitly via the cost formula. However, path, python, and runner are never explained, leaving half the parameters undocumented in both schema and description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and scope: 'Run ONE test n times... and report the pass/fail pattern', with 'ONE' and 'fresh process' making it distinct from suite-level siblings. The named alternative (run_tests) further separates it from run_tests/rerun_failed.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly routes an important adjacent case: a test that is only flaky under ordering/parallelism/shared state 'can pass here; check that with run_tests on the surrounding file.' That is real when-to-use-which guidance. It stops short of stating hard preconditions (e.g., when to skip flaky_check entirely), so not a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_testsA

List the tests without running them (collect-only). Returns ids (max 500) and any collection errors (import errors in test modules or conftest.py), reported separately.

filter: pytest -k expression / unittest name pattern / substring of a jest or vitest file name. For jest and vitest only test FILES can be listed. Use the ids as run_tests selectors and as flaky_check / explain_failure test_id.

NameRequiredDescriptionDefault
pathNo.
filterNo
pythonNo
runnerNo
timeoutNo
selectorNo

Output Schema

NameRequiredDescription

No output parameters

TDQS

A3.9/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does real work: nothing is executed, output is capped at 500 ids, and collection errors (import errors in test modules or conftest.py) are reported separately rather than as failures. It leaves timeout behavior and failure modes on bad paths unexplained.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the collect-only distinction and the return shape, then a compact block on filter and consumer wiring. Dense but every sentence contributes; no marketing filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The existence of an output schema reduces the need to describe return values, and what's said about ids and errors is adequate. But for a six-parameter tool with zero schema descriptions and no annotations, the unexplained `selector`, `runner` and `timeout` leave the definition short of what an agent needs.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across six parameters, yet only `filter` is explained (per-runner semantics: -k expression, unittest name pattern, file-name substring). path, runner, python, timeout and especially `selector` receive no meaning at all beyond their bare titles.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource plus the crucial negative scope: "List the tests without running them (collect-only)". That single clause separates it unambiguously from the sibling run_tests, and it also names what comes back (ids, collection errors).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives forward routing explicitly: use the returned ids as run_tests selectors and as flaky_check / explain_failure test_id, and warns that for jest/vitest only test FILES can be listed. It stops short of saying when to call detect_runner first or when a list is unnecessary.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

rerun_failedA

Re-run only the tests that failed or errored in the last run_tests/rerun_failed for this project (same server session). Returns the same structure as run_tests, plus how many ids were rerun (at most 100). The failure list is replaced by what still fails.

NameRequiredDescriptionDefault
pathNo.
pythonNo
timeoutNo

Output Schema

NameRequiredDescription

No output parameters

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden and does reasonably well: it discloses the at-most-100 rerun cap, that the returned structure matches run_tests plus a rerun count, and that the stored failure list is replaced by remaining failures (a state mutation). It omits error behavior when no prior failure list exists and any permission/execution side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight sentences, front-loaded with the core action, then return shape, then the 100-cap and failure-list replacement. No redundant or filler wording.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The output schema and the description cover return values well, and the prerequisite of a prior run in the same session is stated. However, for a three-parameter tool with zero schema documentation, the absence of any parameter guidance leaves the definition only partially complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across three parameters (path, python, timeout), and the description does not mention any of them. The phrase 'this project' hints at path scoping, but there is no guidance on what python or timeout control, so the description fails to compensate for the coverage gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a precise verb and resource ('Re-run only the tests that failed or errored') and constrains it to the last run_tests/rerun_failed in the same server session, which cleanly separates it from the sibling run_tests (full run) and list_tests.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It implies the when: after a prior run_tests/rerun_failed has produced failures, within the same server session. That is a clear trigger context, but it never explicitly says when to prefer run_tests instead of this tool or what happens if there is no recorded failure list.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

run_testsA

Run the tests and return counts plus only the useful details of each failure.

EXECUTES THE PROJECT'S CODE. Result: outcome (passed | failed | no_tests | timeout | crashed | startup_error), summary counts (passed/failed/error/skipped/xfailed/xpassed), failures (id, message, file:line of the innermost project frame, the relevant traceback frames only, trimmed stdout/stderr), collection_errors listed separately from failures (import errors never hide as test failures), the 5 slowest tests, and which interpreter was used. On timeout or crash it names the test that was running. The whole process tree is killed at the timeout.

selector: a file, directory or node id (pytest: tests/test_a.py::TestX::test_y; unittest: dotted name; jest/vitest: file path pattern). Default: everything. timeout: seconds, 1-3600. extra_args: only allow-listed flags, e.g. ["-x"], ["-k", "login"], ["-m", "not slow"], ["--maxfail=3"]; anything else is refused. python: interpreter path or 'uv'. runner: force pytest/unittest/jest/vitest (default: auto-detected, see detect_runner).

NameRequiredDescriptionDefault
pathNo.
pythonNo
runnerNo
timeoutNo
selectorNo
extra_argsNo

Output Schema

NameRequiredDescription

No output parameters

TDQS

A4.2/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations supplied, the description assumes the full disclosure burden and does it well. It prominently warns that project code executes, enumerates possible outcomes, explains failure and collection-error reporting, identifies the active test on timeout or crash, states that the entire process tree is killed at timeout, and discloses refusal of non-allow-listed extra arguments.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose and code-execution warning are front-loaded, and the parameter guidance is compact and easy to scan. The long output catalog is somewhat dense and partly unnecessary because an output schema exists, although most of its details convey useful behavioral distinctions rather than filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a six-parameter tool that executes arbitrary project code, this provides nearly enough operational, safety, and result-interpretation context to invoke it correctly, with the output schema supplementing the return-value details. The unexplained path parameter and lack of guidance about non-executing or more specialized siblings remain meaningful but limited gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Despite 0% schema description coverage, it documents selector with framework-specific syntax and a default, timeout with units and bounds, extra_args with examples and its allow-list restriction, python with accepted interpreter forms, and runner with supported values and auto-detection. The path parameter is not explained, leaving its relationship to the project, selector, and working directory unclear.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence clearly states the verb and resource: run tests and return counts plus focused failure details. The supported runners and selectors further clarify scope, but the description does not explicitly distinguish this tool from execution-related siblings such as rerun_failed or flaky_check.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives practical invocation guidance: run everything by default, select files, directories, node IDs, or framework-specific patterns, force a runner when needed, and consult detect_runner for auto-detection. It does not explain when not to execute tests or when siblings such as list_tests, coverage_summary, or rerun_failed are preferable.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 7 tool updatesv0.1.0
    • First observedcoverage_summary
    • First observeddetect_runner
    • First observedexplain_failure
    • First observedflaky_check
    • First observedlist_tests
    • First observedrerun_failed
    • First observedrun_tests

TDQS

A3.9/5.0

Scored across 7 tools

Disambiguation4/5

The tools mostly have distinct purposes: detection, listing, running, coverage, rerunning failures, flaky checks, and failure explanation. There is some overlap among run_tests, rerun_failed, flaky_check, and explain_failure because all execute tests, but the descriptions make their boundaries reasonably clear.

Naming Consistency4/5

Most names follow a verb_noun pattern (detect_runner, run_tests, rerun_failed, list_tests, explain_failure), and all use snake_case consistently. coverage_summary and flaky_check are noun-phrase deviations, but they remain readable and predictable.

Tool Count5/5

Seven tools is well-scoped for a test-runner MCP server. Each tool covers a distinct part of the test workflow without obvious redundancy.

Completeness4/5

The surface covers detection, listing, running, rerunning failures, coverage, flaky detection, and failure explanation, which is strong lifecycle coverage. Minor gaps include coverage being Python-only and no equivalent coverage or profiling support for JavaScript runners.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI models (Claude, ChatGPT, GitHub Copilot) to run and analyze local tests, rerun failures, and orchestrate QA workflows using existing UI and API test frameworks.
    3 npm
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Wraps existing test frameworks (Jest, Vitest, Pytest) and exposes structured, LLM-optimized results via MCP tools with progressive disclosure and diff-aware execution.
    11
    1
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    Enables AI agents to run, debug, and inspect Playwright end-to-end tests, returning structured pass/fail stats, failure diagnostics with actionable fix hints, live DOM inspection, selector validation, visual diffs, and flakiness verdicts instead of raw test output.
    11
    2,464 npm
    MIT