testmcp
Lists and parses GitHub Actions artifacts containing test logs, extracting structured test results from CI pipelines.
Executes Jest tests and returns structured results with summary, failure details, and source context.
Executes Pytest tests using a layered fallback strategy (reportlog, JUnit XML, or verbose stdout parsing) and returns structured results.
Executes Vitest tests and returns structured results with summary, failure details, and source context.
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., "@testmcp run tests affected by my recent changes"
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.
testmcp
An MCP server that wraps existing test frameworks (Jest, Vitest, Pytest) and exposes structured, LLM-optimized results via MCP tools.
Why?
Test frameworks were designed for humans. LLMs get ANSI escape codes, watch mode prompts, and 5000-line outputs that blow up context windows. testmcp fixes this with:
Progressive disclosure — Get a summary first, drill into failures on demand
Structured output — JSON, not terminal formatting
Diff-aware testing — Run only tests affected by your git changes
Time-budgeted execution — Set a timeout, get partial results
Source enrichment — Failure reports include the relevant source code around each assertion
Watch mode protection — Impossible to accidentally enter interactive mode
Related MCP server: Autonomous QA Engineer MCP
Installation
git clone https://github.com/r-marques/testmcp.git
cd testmcp
yarn install
yarn buildConfigure as MCP server
Claude Code (recommended):
claude mcp add testmcp -- node /absolute/path/to/testmcp/dist/index.jsThis registers testmcp as a local stdio MCP server. Restart Claude Code after adding.
Other MCP clients (Cursor, Windsurf, etc.):
Add to your MCP configuration file:
{
"mcpServers": {
"testmcp": {
"command": "node",
"args": ["/absolute/path/to/testmcp/dist/index.js"]
}
}
}Verify it works
After restarting your MCP client, the testmcp tools should be available. In Claude Code you can verify with:
claude mcp list
# Should show: testmcp: node /path/to/testmcp/dist/index.js - ✓ ConnectedTools
Test Execution
Tool | Purpose |
| Auto-detect test frameworks in a project |
| Execute tests, return a compact summary |
| Git-aware: only run tests affected by changes |
| Drill into failures with source context |
| Single test deep-dive with full stack trace |
| Re-execute only previously failed tests |
| Coverage data from a previous run |
| List recent test run summaries |
CI Log Parsing
Tool | Purpose |
| Parse raw CI/test log text and extract structured test results. Auto-detects framework. |
| List artifacts from a GitHub Actions run |
| Download a GitHub Actions artifact and parse it as test results |
The CI tools enable a workflow where the LLM reads a CI workflow file to identify the right artifact, then uses parse_artifact to get structured results — no manual log parsing needed.
How It Works
The Progressive Disclosure Flow
Instead of dumping thousands of lines of test output, testmcp gives you information in layers:
Step 1: Run tests — Get a compact summary
run_tests({ projectDir: "/app" })
→ { total: 200, passed: 197, failed: 3, failedTests: ["auth > login > rejects expired token", ...] }Step 2: Drill into failures — Get failure details with source context
get_failures({ runId: "abc-123" })
→ For each failure:
- Concise error message
- 7 lines of source code around the assertion
- Test file and line numberStep 3: Deep dive — Full stack trace for a single test (only when needed)
get_test_detail({ runId: "abc-123", testName: "auth > login > rejects expired token" })
→ Complete error output with full stack traceThis approach uses 4-5x fewer tokens compared to raw test output in typical failure scenarios, because you never pay for the 197 passing tests you don't care about.
Diff-Aware Test Selection
run_affected analyzes your git changes through three layers:
Direct changes — Test files you modified are included
Naming conventions — Changed
src/api/client.ts? Looks fortests/api/client.test.tsImport scanning — Greps test files for imports of changed source files
Each selected test includes a reason explaining why it was chosen.
Time-Budgeted Execution
run_tests({ projectDir: "/app", timeout: 30000 })If the suite takes longer than 30 seconds, the process is killed and partial results are recovered. The response includes timedOut: true so you know results are incomplete.
Supported Frameworks
Framework | Detection | Output Parsing |
Jest |
|
|
Vitest |
|
|
Pytest |
| Layered fallback: |
testmcp auto-detects the framework and package manager (npm, yarn, pnpm, poetry). No configuration needed.
Pytest Fallback Chain
Pytest has no built-in JSON reporter, so testmcp uses a three-layer fallback strategy:
pytest-reportlog(primary) — JSONL format via--report-log. Streaming-friendly, survives timeouts. Requirespip install pytest-reportlog.--junitxml(fallback) — Built into pytest, zero dependencies. Standard JUnit XML format.Verbose stdout (last resort) — Parses
-v --tb=shortoutput with regex. Works everywhere.
The server automatically falls through the chain if a plugin isn't installed — no configuration needed.
Architecture
src/
├── index.ts # Entry: McpServer + StdioServerTransport
├── server.ts # 11 MCP tool registrations & handlers
├── types.ts # Core types
├── store.ts # In-memory test run storage (LRU, 50 runs)
├── adapters/
│ ├── base.ts # Abstract adapter interface
│ ├── jest.ts # Jest adapter
│ ├── vitest.ts # Vitest adapter (v1.x + v2+ formats)
│ └── pytest.ts # Pytest adapter (reportlog → junitxml → verbose)
├── ci/
│ ├── log-parser.ts # Framework detection + raw CI log parsing
│ └── artifacts.ts # GitHub Actions artifact listing + download + parsing
├── git/
│ └── diff-analyzer.ts # Git diff → affected test files
├── enrichment/
│ └── source-context.ts # Stack trace parser + source snippets
└── utils/
├── process.ts # Child process runner with timeout
└── detect.ts # Framework auto-detectionKey Design Decisions
Stdio transport only — No HTTP server, no ports. Works as a local subprocess for Claude Code and IDE integrations.
Subprocess isolation — Frameworks are spawned as child processes with
CI=true,TERM=dumb. Zero coupling to framework versions.In-memory store — Test runs stored by UUID with LRU eviction at 50 runs. Enables progressive drill-down without re-running tests.
Minimal dependencies — Only
@modelcontextprotocol/sdkandzod. Everything else uses Node.js built-ins.
Development
yarn build # Compile TypeScript
yarn dev # Run in dev mode (tsx)
yarn test # Run test suite (Vitest)
yarn test:watch # Run tests in watch modeLicense
MIT
Available Tools
11 toolsdiscoverC
Auto-detect test frameworks configured in a project directory
Inputs: projectDir (required).
get_coverageB
Get coverage data from a previous test run.
Inputs: runId (required), files.
get_failuresB
Get detailed failure information for a test run, including source context around each failure.
Inputs: runId (required).
get_test_detailB
Get complete details for a single test, including full stack trace.
Inputs: runId (required), testName (required).
list_artifactsB
List artifacts from a GitHub Actions run. Use with parse_artifact to download and parse test result artifacts.
Inputs: repo (required), runId (required).
list_runsC
List recent test run summaries.
Inputs: limit.
parse_artifactB
Download a GitHub Actions artifact and parse it as test results. Supports JUnit XML, Jest JSON, Vitest JSON, and pytest-reportlog JSONL.
Inputs: repo (required), runId (required), artifactName (required).
parse_logA
Parse raw CI/test log text and extract structured test results. Auto-detects framework (Jest, Vitest, Pytest) from the log content.
Inputs: text (required), framework.
rerun_failedB
Re-execute only the tests that failed in a previous run.
Inputs: runId (required), timeout.
run_affectedA
Run only tests affected by git changes. Analyzes diff to find related test files.
Inputs: projectDir (required), base, timeout, coverage.
run_testsA
Run tests and return a compact summary. Use get_failures to drill into failures.
Inputs: projectDir (required), timeout, coverage, fileGlob, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Most tools have distinct resource+action targets: run_tests vs run_affected, list_runs vs list_artifacts, and get_failures vs get_test_detail are separable. However, get_failures and get_test_detail both surface failure detail, and parse_log and parse_artifact both 'parse' test data, creating mild potential for misselection.
Nearly all names follow a consistent snake_case verb_noun pattern (list_runs, run_tests, get_failures, parse_artifact, rerun_failed). The lone outlier is 'discover', a bare verb with no noun object, which is a minor deviation from the otherwise uniform convention.
11 tools is well-scoped for a test-runner server, with each tool covering a distinct facet (discovery, execution, failure drill-down, coverage, artifact parsing). No redundant or filler tools appear.
The surface covers the full test lifecycle: discovery, running (full and affected), failure inspection, reruns, coverage, and CI log/artifact parsing. Minor gaps exist (e.g., no config/watch or artifact listing beyond GitHub Actions), but core workflows are complete.
Maintenance
Related MCP Connectors
Test analytics for AI agents: test history, flaky tests, failure clusters, coverage.
Writes adversarial test suites for AI-built code. Your agent's test engineer.
Run, debug, and triage tests from your IDE using natural language, no dashboard switching, no manual data transfers. The TestMu AI (formerly LambdaTest) MCP Server is a single remote server exposing four tool suites: HyperExecute — analyze your project, generate YAML configs and test runner commands, then monitor jobs and sessions. Automation — pull a TestID's details plus command, network, and console logs into one chat for instant root-cause analysis. Includes mobile app upload. SmartUI — explain pixel, layout, DOM, and perceptual changes in a visual regression run, with context-aware React/HTML/CSS fixes. Accessibility — audit any public URL or a local React app against WCAG and get ready-to-apply remediation steps. Connects over https://mcp.lambdatest.com/mcp using OAuth 2.1 — no API keys in your config. One-click install in Cursor; works with Claude, GitHub Copilot, Cline, and any MCP client. Tests execute on the TestMu AI cloud: 3,000+ browsers and 10,000+ real devices.
Approved test intent, reviewed Playwright automation and run evidence, inside your editor.
Related MCP Servers
AlicenseAqualityDmaintenanceContract-driven test enforcement and reporting for LLM-generated code via MCP, VS Code, Copilot CLI, Claude, Cursor, or Python SDK.14MIT- 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 gradedqualityBmaintenanceEnables MCP-compatible AI coding agents to obtain clean failing-test context, ranked suspect lines, runtime value comparisons, bounded code search, and patch verification so they can fix Python test failures with fewer tokens.MIT

TestMu AI MCP Serverofficial
AlicenseNot gradedqualityBmaintenanceEnables MCP-compatible editors to orchestrate test runs, debug failures, analyze visual regressions, run accessibility audits, and manage test cases through natural language.MIT