# test-genie [Health: Active]

**Category:** 📂 Browser Automation  
**Repository:** https://github.com/MUSE-CODE-SPACE/test-genie-mcp  
**GitHub Stars:** 0  
**npm Downloads (last month):** 242  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/test-genie

## Description
AI-powered app test automation for iOS, Android, Flutter, React Native, Web

## Tools
Capabilities this server exposes over MCP:

- **analyze_app_structure** — [mode: real] Static analysis of the project: screens, components, APIs, state. Auto-detects platform when not provided.
- **generate_scenarios** — [mode: real] Generate test scenarios from analyzed app structure.
- **create_test_plan** — [mode: real] Build a test plan from stored scenarios with filtering / scheduling.
- **run_scenario_test** — [mode: hybrid] Run a stored scenario; real subprocess where possible, falls back to simulated.
- **run_simulation** — [mode: simulated] Random / sequential user-behavior simulation to find issues.
- **run_stress_test** — [mode: hybrid] Concurrency / load test against an endpoint or UI surface.
- **detect_memory_leaks** — [mode: real] Detect memory leaks, retain cycles, unclosed resources.
- **detect_logic_errors** — [mode: real] Detect race conditions, null refs, state inconsistencies.
- **suggest_fixes** — [mode: real] Generate rule-based fix suggestions for detected issues.
- **confirm_fix** — [mode: real] Confirm / reject / modify a proposed fix prior to apply.
- **apply_fix** — [mode: real] Apply a confirmed fix. backup=true, validate=true by default. Supports dryRun.
- **rollback_fix** — [mode: real] Restore the pre-apply file content from the backup.
- **run_full_automation** — [mode: hybrid] Analyze → plan → execute → detect → suggest in one call.
- **run_iterative_fix_loop** — [mode: hybrid, headline tool] Self-healing test → fix → re-test loop with regression detection, auto-rollback, and resumeToken support. See docs/ITERATE_FIX_LOOP.md.
- **generate_report** — [mode: real] Generate Markdown / HTML / JSON test automation report.
- **get_pending_fixes** — [mode: real] List fixes awaiting confirmation for the project.
- **get_test_history** — [mode: real] Recent test executions for the project.
- **analyze_performance** — [mode: real] Static performance analysis: rendering, computation, bundle.
- **analyze_code_deep** — [mode: real] Deep AST analysis: functions, complexity, hooks, issues.
- **generate_cicd_config** — [mode: real] Generate GitHub Actions / Jenkins / GitLab CI configuration.
- **diagnose_project** — [mode: real, v3.1.0 headline] vibe-check the project — race conditions + security + memory + logic + performance in one parallel sweep. Returns prioritized findings + Markdown summary ready for chat.
- **detect_race_conditions** — [mode: real, v3.1.0] Stand-alone race-condition detector — useState-after-await, missing AbortController, forEach-await, TOCTOU file ops, DispatchQueue races, Flow dispatcher mismatches.
- **detect_security_issues** — [mode: real, v3.1.0] Stand-alone security scanner — hardcoded secrets (AWS/Stripe/GitHub/JWT), SQL/XSS/SSRF/eval injection, weak crypto, CORS misconfig, cookie flags, yaml.load.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "test-genie": {
    "command": "npx",
    "args": ["test-genie-mcp"],
    "env": {
      "TEST_GENIE_ALLOWED_ROOT": ""
    }
  }
}
```

**Requires environment variables:** `TEST_GENIE_ALLOWED_ROOT` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What test-genie MCP server does

The test-genie MCP server connects an MCP client to application projects on the local machine. It supports iOS, Android, Flutter, React Native, and web codebases, with tools for inspecting project structure, generating scenarios, creating test plans, running tests, and producing reports.

Its analysis tools cover memory leaks, logic errors, race conditions, security issues, and performance concerns. The `diagnose_project` tool provides a prioritized project report. Findings can include severity, confidence, location, category, and a suggested remediation. The server also exposes resources for iteration logs, test history, and applied fixes.

## How it works

The main repair workflow is `run_iterative_fix_loop`. It collects or runs tests, checks the pass rate, detects issues, proposes rule-based fixes by default, and optionally uses an LLM-based hybrid mode. Before applying a change, the workflow performs a dry run and syntax validation using an applicable compiler, the TypeScript compiler API, or a brace check.

Applied changes are backed up per file under `.test-genie-backups/`. The workflow reruns tests after a patch and rolls the change back if it causes a regression. It stops when the configured pass threshold is met, the iteration limit or timeout is reached, or no further progress can be made. Pending fixes can require confirmation before they are applied.

`diagnose_project` has a narrower `autoFix` path. In the documented v3.1.1 scope, it can make selected mechanical replacements such as changing weak MD5 or SHA-1 hashing to SHA-256 and replacing standalone security-sensitive `Math.random()` usage. That path backs up and syntax-validates changes but does not rerun tests for regression rollback.

## Setup and configuration

Install the package globally with npm:

```bash
npm install -g test-genie-mcp
```

Configure an MCP client to launch `npx test-genie-mcp` over stdio. Set `TEST_GENIE_ALLOWED_ROOT` to the project directory the server may access. After restarting the client, invoke tools such as `diagnose_project` or `run_iterative_fix_loop` with the project path and the desired options, including whether fixes may be applied automatically.

## Tools and capabilities

The test-genie MCP server provides 23 tools, including:

- `analyze_app_structure`, `generate_scenarios`, and `create_test_plan`
- `run_scenario_test`, `run_simulation`, and `run_stress_test`
- `detect_memory_leaks`, `detect_logic_errors`, `detect_race_conditions`, and `detect_security_issues`
- `suggest_fixes`, `confirm_fix`, `apply_fix`, and `rollback_fix`
- `run_full_automation` and `run_iterative_fix_loop`
- `diagnose_project`, `analyze_code_deep`, and `analyze_performance`
- `generate_report`, `get_pending_fixes`, `get_test_history`, and `generate_cicd_config`

It also provides four resources for logs, history, and applied-fix records, plus three prompts. Tool modes vary: some are real, some simulated, and some hybrid.

## Limitations and notes

Validation depends on the project and tools available on the machine. For example, Swift syntax validation is real when `swiftc` is on `PATH`; otherwise the result is reported as downgraded validation. The iterative loop and `diagnose_project` auto-fix path should not be treated as equivalent: only the iterative loop reruns tests and automatically rolls back a regression.

_Full upstream README: https://allmcps.com/mcp/test-genie/readme_

