MCP Test Runner

io.github.LovRanRanPublished by GitHub account LovRanRanv0.1.0Updated Oct 24, 2026

Local test execution and coverage summaries for onboarding agents.

VerifiedSTDIODesktop onlyDeveloper ToolsData & Analytics

Overview

AI-generated overview

A local MCP server that runs pytest and Jest tests, parses their JSON output, and summarizes pytest coverage so an assistant can verify code claims.

What you can do
Run pytest or Jest in a bounded working directory and return raw command output, with optional timeout, CPU and memory limits, and a health check for smoke testing. Run a single pytest node id or a Jest test-name pattern. Normalize pytest and Jest JSON output into one test result schema. Summarize pytest-cov coverage totals from the coverage JSON file.
When to use it
Useful when an assistant is onboarding onto or reasoning about a codebase and should back its claims with real test execution rather than guesses, for example marking statements as verified, unverified or contradicted. Best suited to Python projects using pytest, or JavaScript projects with Jest available.
Requirements
Runs locally as a Python 3.11+ package installed from PyPI (distribution name lovranran-mcp-test-runner, console script mcp-test-runner) over stdio. The target project needs pytest with pytest-json-report, and pytest-cov for coverage; Jest runs through npx, so Node.js and a resolvable Jest are needed. CPU and memory caps rely on a POSIX platform supporting resource.setrlimit. No authentication, environment variables or headers are declared.
Before you install
The tools execute test commands as subprocesses in the given working directory, so only point them at projects you trust; test code can run arbitrary commands. Jest is invoked through npx, which may download packages if Jest is not already installed. Resource limits are POSIX-only and v1 has no Docker isolation. Coverage summaries are pytest-only, and execution tools return raw output that must be parsed separately.

Installation

In SourceWeft

  1. Open MCP Test Runner in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

mcp-test-runner

MCP server for deterministic local test execution and normalized test result reporting.

mcp-test-runner is the verification layer for codebase onboarding agents. It exposes focused MCP tools for running pytest and Jest, parsing test output, and summarizing coverage so downstream agents can mark claims as verified, unverified, or contradicted by real execution.

Codebase Onboarding Stack

mcp-test-runner is the verification layer in a three-server MCP tool stack for Project 6 wayfinder, a codebase onboarding agent.

  • mcp-repo-mapper maps repository structure, languages, entry points, framework evidence, and Python dependency edges.
  • mcp-ast-explorer provides symbol-grounded Python definition, signature, reference, call-chain, and class-hierarchy lookups.
  • mcp-test-runner runs local pytest/Jest checks and coverage summaries so agent claims can be verified against execution.

In wayfinder, this server turns high-risk code understanding claims into verified, unverified, or contradicted evidence from real test execution.

Status

This repository is a Python-first v1 MCP test runner. It supports bounded pytest execution, Jest command execution, single-test targeting, pytest coverage summaries, and normalized pytest/Jest JSON parsing.

The server does not use an LLM. Test results come from subprocess execution and structured parser output.

Tools

ToolPurpose
health()Returns ok for smoke checks.
run_pytest(path, test_filter?, timeout_seconds?, cpu_seconds?, memory_mb?)Run pytest in a bounded working directory and return raw command output.
run_jest(path, test_filter?, timeout_seconds?, cpu_seconds?, memory_mb?)Run Jest through npx jest and return raw command output.
run_single_test(path, test_id, framework?, timeout_seconds?, cpu_seconds?, memory_mb?)Run one pytest node id or one Jest test-name pattern.
parse_test_output(stdout, framework)Normalize test runner JSON output.
get_coverage_summary(path, framework?, timeout_seconds?, cpu_seconds?, memory_mb?)Return pytest-cov JSON coverage totals.

Supported Scope

  • Python 3.11+ package.
  • FastMCP 2.x server.
  • pytest execution with JSON report output via pytest-json-report.
  • Jest command execution via npx jest --json --outputFile.
  • pytest and Jest JSON normalization into one TestRunResult schema.
  • Single pytest node id execution and Jest test-name targeting.
  • pytest-cov coverage summary from .coverage.json.
  • Subprocess timeout plus POSIX resource.setrlimit CPU / memory caps.

Current Limitations

  • v1 does not use Docker. It uses cwd validation, subprocess timeouts, and POSIX resource limits.
  • Resource limits require a POSIX platform that supports resource.setrlimit.
  • Jest execution expects Node.js plus project-local or npx-resolvable Jest.
  • Jest single-test targeting uses --testNamePattern; it does not parse Jest file-specific node ids.
  • Coverage summary is pytest-only in v1.
  • Tools return raw command output for execution; call parse_test_output to normalize framework JSON.

Local Development

Install dependencies:

bash
uv sync --extra dev

The PyPI distribution name is lovranran-mcp-test-runner because mcp-test-runner is already taken on PyPI. The installed console script remains mcp-test-runner.

Run the MCP server:

bash
uv run mcp-test-runner

Run verification:

bash
uv run ruff check .uv run mypyuv run pytest

License

MIT

Source: README.md at commit e24d639

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.1.0LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts