testing-mcp

testing-mcp

MCP server that enables AI agents to programmatically run tests, query results, and receive intelligent recommendations about test execution strategy.

Category
Visit Server

README

test-server-mcp

MCP (Model Context Protocol) daemon for intelligent Vitest orchestration.

A single background daemon exposes an MCP server over loopback HTTP. AI agents (or CI) call its tools to run a project's Vitest suite intelligently — running only the tests affected by changed files (git delta ∪ coverage map) and falling back to the full suite whenever selection is uncertain. Each project runs under its own Vitest in a dedicated worker subprocess; the daemon never imports a project's Vitest itself.

Features

  • Incremental selection — run only tests affected by changed files, with a conservative full-suite fallback (never silently skips).
  • Coverage-aware — builds a source→test reverse map from runtime V8 coverage.
  • Watch mode — re-run affected tests as files change.
  • Minimal output — failures first; full stacks fetched on demand.
  • Human monitoring UI — a live status page at /ui.

Quick start

pnpm install                 # install dependencies (pnpm only — never npm/yarn)
pnpm build                   # compile TypeScript to dist/
node ./bin/test-mcp.mjs link # put `test-mcp` on your PATH (optional, see below)

# From inside the project you want to orchestrate:
cd /path/to/your/project
test-mcp register

register scaffolds <git-root>/.test-mcp/, auto-boots the daemon, and registers the project with it — printing the projectId that MCP tool calls use.

To connect an AI agent, generate its MCP client config:

test-mcp mcp-config

This prints two options for pointing a client at http://127.0.0.1:7420/mcp with the bearer token (a per-machine daemon secret, stable across restarts). Because a project .mcp.json is usually committed, it must not contain the token — so you either add the server at local scope (token in your uncommitted client settings) or commit a .mcp.json that uses a headersHelper to read the daemon's local token file (no token or env var in the repo). See docs/usage.md.

→ Full guide: docs/usage.md — CLI commands, the MCP tool catalog, watch mode, the monitoring UI, CI usage, configuration, and troubleshooting.

CLI

test-mcp start      # start the singleton daemon (idempotent)
test-mcp status     # running/stopped, pid, port, registered-project count
test-mcp stop       # graceful shutdown
test-mcp init       # scaffold <git-root>/.test-mcp/ without touching the daemon
test-mcp register   # scaffold + auto-boot daemon + register the current project
test-mcp mcp-config # print MCP client config to connect an agent (two safe options)
test-mcp ui         # print the monitoring UI URL (http://127.0.0.1:<port>/ui)
test-mcp link       # symlink this CLI into a writable dir on your PATH
test-mcp unlink     # remove that symlink

Getting test-mcp on your PATH

test-mcp link symlinks the CLI into a writable directory already on your PATH (auto-detected — e.g. /opt/homebrew/bin — or pass --dir <dir>), so you can call test-mcp from anywhere. test-mcp unlink removes it (it only ever deletes its own symlink, never a real file). Until you link it, invoke the CLI as node ./bin/test-mcp.mjs.

Alternatively, use your package manager's linker: pnpm link --global (after a one-time pnpm setup) or npm link — both rely on the package's bin field.

Documentation

  • Usage — how to build, run, and use it
  • Architecture — components, contracts, invariants
  • PRD — product requirements
  • Patterns — validated implementation patterns

Development

pnpm typecheck      # tsc --noEmit
pnpm build          # compile to dist/
pnpm test           # vitest run (pretest builds first)
pnpm test:watch     # vitest in watch mode

Working on test-mcp? See CONTRIBUTING.md for the dev/BMAD workflow and the optional code-review-graph code-intelligence setup. (That tooling is for contributors only — it's not needed to use test-mcp.)

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured