{
  "markdown": "# mcp-test-runner\n\n<!-- mcp-name: io.github.LovRanRan/mcp-test-runner -->\n\nMCP server for deterministic local test execution and normalized test result reporting.\n\n`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.\n\n## Codebase Onboarding Stack\n\n`mcp-test-runner` is the verification layer in a three-server MCP tool stack for Project 6 `wayfinder`, a codebase onboarding agent.\n\n- [`mcp-repo-mapper`](https://github.com/LovRanRan/mcp-repo-mapper) maps repository structure, languages, entry points, framework evidence, and Python dependency edges.\n- [`mcp-ast-explorer`](https://github.com/LovRanRan/mcp-ast-explorer) provides symbol-grounded Python definition, signature, reference, call-chain, and class-hierarchy lookups.\n- [`mcp-test-runner`](https://github.com/LovRanRan/mcp-test-runner) runs local pytest/Jest checks and coverage summaries so agent claims can be verified against execution.\n\nIn `wayfinder`, this server turns high-risk code understanding claims into `verified`, `unverified`, or `contradicted` evidence from real test execution.\n\n## Status\n\nThis 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.\n\nThe server does not use an LLM. Test results come from subprocess execution and structured parser output.\n\n## Tools\n\n| Tool | Purpose |\n| --- | --- |\n| `health()` | Returns `ok` for smoke checks. |\n| `run_pytest(path, test_filter?, timeout_seconds?, cpu_seconds?, memory_mb?)` | Run pytest in a bounded working directory and return raw command output. |\n| `run_jest(path, test_filter?, timeout_seconds?, cpu_seconds?, memory_mb?)` | Run Jest through `npx jest` and return raw command output. |\n| `run_single_test(path, test_id, framework?, timeout_seconds?, cpu_seconds?, memory_mb?)` | Run one pytest node id or one Jest test-name pattern. |\n| `parse_test_output(stdout, framework)` | Normalize test runner JSON output. |\n| `get_coverage_summary(path, framework?, timeout_seconds?, cpu_seconds?, memory_mb?)` | Return pytest-cov JSON coverage totals. |\n\n## Supported Scope\n\n- Python 3.11+ package.\n- FastMCP 2.x server.\n- pytest execution with JSON report output via `pytest-json-report`.\n- Jest command execution via `npx jest --json --outputFile`.\n- pytest and Jest JSON normalization into one `TestRunResult` schema.\n- Single pytest node id execution and Jest test-name targeting.\n- pytest-cov coverage summary from `.coverage.json`.\n- Subprocess timeout plus POSIX `resource.setrlimit` CPU / memory caps.\n\n## Current Limitations\n\n- v1 does not use Docker. It uses cwd validation, subprocess timeouts, and POSIX resource limits.\n- Resource limits require a POSIX platform that supports `resource.setrlimit`.\n- Jest execution expects Node.js plus project-local or `npx`-resolvable Jest.\n- Jest single-test targeting uses `--testNamePattern`; it does not parse Jest file-specific node ids.\n- Coverage summary is pytest-only in v1.\n- Tools return raw command output for execution; call `parse_test_output` to normalize framework JSON.\n\n## Local Development\n\nInstall dependencies:\n\n```bash\nuv sync --extra dev\n```\n\nThe 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`.\n\nRun the MCP server:\n\n```bash\nuv run mcp-test-runner\n```\n\nRun verification:\n\n```bash\nuv run ruff check .\nuv run mypy\nuv run pytest\n```\n\n## License\n\nMIT\n",
  "bytes": 3732,
  "sha": "cd4508d9520f46e90e595ce4867a697b5f3afdd61771870f7fdb117a06cb35ed",
  "repo_slug": "lovranran/mcp-test-runner",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_lovranran_mcp_test_runner_146abc62/readme"
}