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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@eden_qu/ut-automation-mcp

v1.4.1

Published

UT Automation MCP Server - Deterministic unit test generation based on rules

Downloads

670

Readme

UT Automation MCP Server

A deterministic unit test automation service based on Model Context Protocol (MCP).

Features

  • Deterministic: Same input always produces same output (no AI randomness)
  • Rule-based: Reads rules from .cursor/rules/unit-test/*.mdc
  • Multi-platform: Supports iOS (Swift), Android (Kotlin/Java), C++
  • 100% Coverage: Generates tests for all branches
  • Auto-fix: Automatically fixes common compilation errors
  • Configurable: Supports external workflow configuration

Installation

npm install @eden_qu/ut-automation-mcp

Or install globally:

npm install -g @eden_qu/ut-automation-mcp

Usage

As MCP Server

Add to your Cursor MCP configuration:

{
  "mcpServers": {
    "ut-automation": {
      "command": "npx",
      "args": ["@eden_qu/ut-automation-mcp"]
    }
  }
}

Environment Variables

| Variable | Description | Default | |----------|-------------|---------| | UT_WORKSPACE_PATH | Override the workspace root directory | process.cwd() |

Using UT_WORKSPACE_PATH

When running the MCP server, you can set the workspace path via environment variable:

{
  "mcpServers": {
    "ut-automation": {
      "command": "npx",
      "args": ["@eden_qu/ut-automation-mcp"],
      "env": {
        "UT_WORKSPACE_PATH": "/path/to/your/project"
      }
    }
  }
}

This is useful when:

  • The MCP server is started from a different directory than your project
  • You want to run the server in a CI/CD environment
  • Cursor doesn't support the cwd configuration option

Commands

The MCP server recognizes these commands:

| Command | Description | Example | |---------|-------------|---------| | ut_changed | Generate UT for git changed files | ut_changed platform=ios | | ut_all | Generate UT for all source files | ut_all platform=android | | ut_path | Generate UT for files in path | ut_path path=common/ios | | ut_files | Generate UT for specific files | ut_files files=A.swift,B.swift |

Parameters

  • platform: Target platform (ios, android, cpp, all)
  • base: Base branch for git diff (default: develop)
  • path: Path to scan for files
  • files: Comma-separated list of files

Architecture

┌─────────────────────────────────────────────────────────────────┐
│                      ut_automation_mcp                          │
├─────────────────────────────────────────────────────────────────┤
│                                                                   │
│  Tools (exposed):                                                 │
│  ┌─────────────────────────────────────────────────────────────┐ │
│  │ execute(command, workflow?, config?)                         │ │
│  │ get_commands()                                               │ │
│  │ get_rules(platform)                                          │ │
│  └─────────────────────────────────────────────────────────────┘ │
│                                                                   │
│  Workflow Engine:                                                 │
│  ┌─────────────────────────────────────────────────────────────┐ │
│  │ load_rules → detect_files → analyze → generate → compile →  │ │
│  │ → test → coverage → report                                   │ │
│  └─────────────────────────────────────────────────────────────┘ │
│                                                                   │
│  Skills (internal):                                               │
│  ┌────────┐ ┌────────┐ ┌────────┐ ┌────────┐ ┌────────┐         │
│  │Command │ │Rule    │ │File    │ │Source  │ │UT      │         │
│  │Parser  │ │Loader  │ │Detector│ │Analyzer│ │Generator│        │
│  └────────┘ └────────┘ └────────┘ └────────┘ └────────┘         │
│  ┌────────┐ ┌────────┐ ┌────────┐                               │
│  │Build   │ │Test    │ │Report  │                               │
│  │Manager │ │Runner  │ │Generator│                              │
│  └────────┘ └────────┘ └────────┘                               │
│                                                                   │
└─────────────────────────────────────────────────────────────────┘

Workflow

Default Workflow

steps:
  1. load_rules      # Load .cursor/rules/unit-test/*.mdc
  2. detect_files    # Detect source files
  3. analyze_source  # Parse AST, extract branches
  4. generate_ut     # Generate test code
  5. compile_and_fix # Compile with auto-fix
  6. run_tests       # Execute tests
  7. collect_coverage # Collect coverage data
  8. generate_reports # Output reports

Custom Workflow

Create .cursor/ut-automation/workflow.yaml:

name: custom_workflow
version: "1.0.0"

# Override config
config:
  coverage_threshold:
    line: 80
    branch: 80

# Custom steps
steps:
  - id: load_rules
    action: load_rules
  - id: detect
    action: detect_files
  # ... more steps

Output

Reports are generated in .cursor/ut-reports/:

  • coverage-report.json - Line and branch coverage
  • branch-coverage.json - Detailed branch coverage
  • rule-references.json - Applied rules
  • ut-summary.md - Human-readable summary

Rules

The MCP reads rules from:

  • .cursor/rules/unit-test/ios-unit-test.mdc
  • .cursor/rules/unit-test/android-unit-test.mdc
  • .cursor/rules/unit-test/cpp-unit-test.mdc
  • .cursor/rules/unit-test/unit-testing-principles.mdc

Determinism

This MCP guarantees deterministic output:

  1. Command parsing: Regex-based, no AI
  2. Rule loading: Direct file reading
  3. File detection: Git commands, file system
  4. AST analysis: Pattern-based parsing
  5. UT generation: Template rendering
  6. All steps: Reproducible

Development

# Install dependencies
npm install

# Build
npm run build

# Run locally
npm run dev

# Test
npm test

# Publish
npm run publish:npm

License

MIT