npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@gc-mcp/testorchestrator

v1.0.4

Published

MCP Server for Smart Test Orchestration - intelligently determines what tests to run based on changes

Readme

Smart Test Orchestrator MCP Server

An intelligent MCP server that determines what tests to run based on code changes, reducing test execution time by 70%+ while maintaining high confidence levels.

Features

  • Intelligent Test Selection: Automatically determines which tests to run based on code changes
  • Test Optimization: Optimizes test execution order and parallelization
  • Failure Prediction: Predicts which tests are likely to fail based on historical data
  • Coverage Analysis: Identifies gaps in test coverage for changed code
  • Resource Optimization: Efficiently uses testing resources and constraints

MCP Tools

1. determine_test_scope

Intelligently determine what tests to run based on code changes.

Parameters:

  • changes: Array of code changes to analyze
  • context: Development context (task type, affected services, environment)
  • constraints: Optional execution constraints (time, resources, confidence)

2. optimize_test_execution

Optimize test execution order and parallelization.

Parameters:

  • test_plan: Test plan from determine_test_scope
  • optimization_goals: Goals for optimization (minimize time, maximize confidence, etc.)
  • execution_constraints: Resource and execution constraints

3. predict_test_failures

Predict which tests are likely to fail based on changes and historical data.

Parameters:

  • changes: Array of code changes to analyze
  • test_history: Historical test execution data
  • confidence_threshold: Threshold for prediction confidence
  • failure_patterns: Known failure patterns to check

4. suggest_test_data_setup

Suggest optimal test data setup based on changes.

Parameters:

  • changes: Array of code changes to analyze
  • test_plan: Test plan to optimize data for
  • data_constraints: Data size, retention, and privacy requirements

5. analyze_test_coverage_gaps

Analyze gaps in test coverage for changed code.

Parameters:

  • changes: Array of code changes to analyze
  • current_coverage: Current test coverage data
  • coverage_threshold: Target coverage threshold
  • focus_areas: Specific areas to focus analysis on

Installation

npm install

Development

# Install dependencies
npm install

# Build the project
npm run build

# Run tests
npm test

# Run in development mode
npm run dev

Docker

# Build Docker image
npm run docker:build

# Run with Docker
npm run docker:run

# Test Docker functionality
npm run docker:test

# Stop Docker container
npm run docker:stop

Configuration

Set the following environment variables:

# Test Configuration
TEST_OPTIMIZATION_GOALS=minimize_time,maximize_confidence
MAX_PARALLEL_TESTS=4
TEST_CONFIDENCE_THRESHOLD=0.8

# Resource Constraints
MAX_EXECUTION_TIME=300
MAX_MEMORY_USAGE=8192
CPU_CORES=4

# Failure Prediction
ENABLE_FAILURE_PREDICTION=true
HISTORICAL_DATA_RETENTION_DAYS=30
PATTERN_SIMILARITY_THRESHOLD=0.7

Usage

As MCP Server

The server can be used with any MCP-compatible client:

# Start the server
node dist/index.js

# Or use the binary
./bin/mcp-test-orchestrator

With Cursor

Add to your Cursor MCP configuration:

{
  "mcpServers": {
    "smart-test-orchestrator": {
      "command": "node",
      "args": ["/path/to/smart-test-orchestrator/dist/index.js"]
    }
  }
}

Architecture

Core Components

  1. Test Impact Analyzer: Analyzes test impact based on code changes
  2. Test Selector: Selects optimal tests based on impact and constraints
  3. Test Optimization Engine: Optimizes test execution order and parallelization
  4. Failure Predictor: Predicts test failures based on historical data

Data Flow

  1. Input: Code changes and context
  2. Analysis: Test impact analysis and risk assessment
  3. Selection: Optimal test selection based on constraints
  4. Optimization: Test execution optimization and parallelization
  5. Output: Optimized test plan with execution strategy

Testing

# Run unit tests
npm test

# Run end-to-end tests
npm run test:e2e

# Run linting
npm run lint

# Type checking
npm run typecheck

Performance

  • Time Reduction: 70%+ reduction in test execution time
  • Accuracy: 95%+ correct test selection
  • Confidence: 90%+ confidence in test coverage
  • Resource Efficiency: 80%+ resource utilization

License

MIT

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests
  5. Submit a pull request

Support

For issues and questions, please open an issue on GitHub.