MCP Test Runner logo

MCP Test Runner

Runs bounded pytest and Jest checks locally, parses results, and reports pytest coverage for code verification.

Install MCP Test Runner

Run the project’s own setup commands, in order.

Setup steps from the project

MCP Test Runner installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Start the server
    uv run mcp-test-runner
    

Overview

The MCP Test Runner MCP server executes local pytest and Jest tests with subprocess limits, then returns raw output or normalized results. It supports single-test targeting, pytest coverage summaries, and a shared JSON result schema for both frameworks. Reach for it when an onboarding or analysis agent needs execution-based evidence for code claims rather than static inspection. It requires Python 3.11+, and Jest runs require Node.js with a project-local or npx-resolvable Jest installation.

Use cases

  • Run bounded pytest checks during codebase onboarding
  • Execute Jest tests from a local project
  • Target one test by pytest node ID or Jest name pattern
  • Normalize pytest and Jest results for agent verification
  • Summarize pytest coverage totals

Key features

  • Bounded pytest execution
  • Jest execution through npx
  • Single-test targeting
  • Normalized pytest and Jest JSON results
  • Pytest coverage summaries
  • POSIX CPU and memory limits

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

21/22 checks healthy over the last 117d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

Last commit5mo agoMost recent push to the default branch.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

How MCP Test Runner works

What MCP Test Runner MCP server does

The MCP Test Runner MCP server provides a verification layer for agents that need to check claims against real test execution. It runs tests in a selected working directory, captures the command result, and can convert pytest or Jest JSON output into a normalized TestRunResult structure.

The server is intended for local codebase workflows, including onboarding systems that classify findings as verified, unverified, or contradicted. It does not use an LLM; execution and reporting come from subprocesses and parsers. The implementation is Python-first and supports Python 3.11 or newer.

How it works

Execution tools launch the selected framework as a subprocess. Pytest uses JSON reporting through pytest-json-report. Jest is invoked through npx jest --json --outputFile, so the project must provide Jest locally or make it resolvable through npx.

Runs can be bounded by a timeout, CPU limit, and memory limit. CPU and memory controls use POSIX resource.setrlimit, while timeout handling limits how long the subprocess may run. This means resource controls depend on a POSIX platform that supports that API; the server does not isolate tests with Docker.

Raw execution output remains available from the test-running tools. A separate parser converts framework JSON into the common result format, so callers should invoke parsing when they need structured cross-framework data.

Setup and configuration

Install the package dependencies with:

bash
uv sync --extra dev

Start the server locally with:

bash
uv run mcp-test-runner

The PyPI package is named lovranran-mcp-test-runner, while the installed command is mcp-test-runner. The project verification commands use Ruff, mypy, and pytest.

Jest use additionally requires Node.js and either a project-local Jest installation or a version that npx can resolve.

Tools and capabilities

The MCP Test Runner MCP server exposes these operations:

  • health() returns ok for smoke checks.
  • run_pytest() runs pytest in a bounded directory and returns raw command output.
  • run_jest() runs Jest through npx and returns raw command output.
  • run_single_test() targets one pytest node ID or one Jest test-name pattern.
  • parse_test_output() normalizes pytest or Jest JSON output.
  • get_coverage_summary() returns pytest-cov JSON totals.

Single-test Jest execution uses --testNamePattern; it does not accept Jest file-specific node IDs. Coverage summaries are limited to pytest in this version and rely on .coverage.json.

Limitations and notes

The runner is bounded but not containerized. Its CPU and memory restrictions are unavailable on platforms without the required POSIX resource interface. Jest execution is dependent on the local Node.js and Jest setup. Test execution returns raw output by design, so structured consumers must make a separate parsing call. The supported coverage summary is pytest-only, even though test execution and output normalization cover both pytest and Jest.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about MCP Test Runner

MCP Test Runner is an MCP server that connects AI agents to local codebases for pytest and Jest execution. Its main tools run complete or single tests, parse framework JSON into normalized results, and report pytest coverage totals. It uses subprocesses rather than an LLM and supports bounded execution with time, CPU, and memory controls.

Install it with `uv sync --extra dev`, then start it with `uv run mcp-test-runner`. The PyPI distribution is named `lovranran-mcp-test-runner`, while the installed console command remains `mcp-test-runner`.

Yes, it runs Jest through `npx jest --json --outputFile`. Node.js and a project-local or npx-resolvable Jest installation are required. Single-test Jest targeting uses a test-name pattern rather than a file-specific node ID.

Yes, it provides pytest coverage summaries from `.coverage.json`. Coverage reporting is pytest-only in the current version; Jest execution is supported, but a Jest coverage summary is not described.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMCP Test Runner AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/mcp-test-runner?style=directory)](https://allmcps.com/mcp/mcp-test-runner)
HTML Embed
<a href="https://allmcps.com/mcp/mcp-test-runner"><img src="https://allmcps.com/api/badge/mcp-test-runner?style=directory" alt="MCP Test Runner on AllMCPs" /></a>