Skip to main content
Glama
gits5213
by gits5213

qa-ai-mcp-server-gits

MCP server for end-to-end QA automation: test scenario generation, Playwright locator discovery, TypeScript test codegen, test execution, and GitHub issue creation for failures.

Features

Tool

Description

generate_test_scenarios

Derives positive, negative, boundary, validation, role-based, accessibility, security, and E2E scenarios from user stories

generate_test_cases

Converts scenarios into detailed, automation-ready test cases

discover_stable_locators

Opens the app in Playwright and recommends stable locators (role → label → placeholder → text → testId → CSS → XPath)

generate_playwright_test

Scaffolds a Page Object Model Playwright TypeScript framework

run_playwright_test

Runs Playwright tests and captures results, screenshots, traces, and videos

create_bug

Creates GitHub issues from failed tests (dry-run or live)

Related MCP server: MCP Cypress Page Object Generator

Prerequisites

  • Node.js 18+

  • npm

  • Playwright browsers (npx playwright install chromium)

Setup

cd qa-ai-mcp-server-gits
npm install
npx playwright install chromium
cp .env.example .env
# Edit .env with your GitHub token, owner, and repo
npm run build

Environment Variables

Variable

Required

Description

GITHUB_TOKEN

For live bugs

GitHub PAT with repo scope

GITHUB_OWNER

For live bugs

GitHub org or username

GITHUB_REPO

For live bugs

Target repository

GITHUB_DEFAULT_LABELS

No

Comma-separated labels (default: bug,automated-test,qa)

ALLOW_PRODUCTION_URLS

No

Set true to allow production-like URLs

LOG_LEVEL

No

debug, info, warn, error

PLAYWRIGHT_HEADLESS

No

Default headless mode for locator discovery

PLAYWRIGHT_TIMEOUT_MS

No

Default Playwright timeout

Cursor / VS Code MCP Configuration

Add to .vscode/mcp.json (included in this repo):

{
  "mcpServers": {
    "qa-ai-mcp-server-gits": {
      "command": "node",
      "args": ["${workspaceFolder}/dist/server.js"],
      "env": {
        "LOG_LEVEL": "info"
      }
    }
  }
}

For development with auto-reload:

{
  "mcpServers": {
    "qa-ai-mcp-server-gits": {
      "command": "npx",
      "args": ["tsx", "src/server.ts"],
      "cwd": "/absolute/path/to/qa-ai-mcp-server-gits"
    }
  }
}

Restart Cursor after changing MCP settings.

Security

  • Secrets are loaded from .env and never logged (tokens and credentials are masked)

  • File writes are restricted to the project directory

  • Only npx playwright test commands are allowed (no arbitrary shell)

  • Production URLs are blocked unless ALLOW_PRODUCTION_URLS=true

  • Bug creation defaults to dry-run; live creation requires confirmed=true or autoCreateBug=true

Project Structure

qa-ai-mcp-server-gits/
├── src/
│   ├── server.ts              # MCP entry point
│   ├── tools/                 # MCP tool handlers
│   ├── services/              # Business logic
│   ├── prompts/               # QA templates
│   ├── utils/                 # File, log, mask, command helpers
│   ├── config/env.ts          # Environment configuration
│   └── output/                # Generated artifacts
│       ├── test-cases/
│       ├── locators/
│       ├── generated-tests/
│       └── reports/
├── .env.example
├── package.json
├── tsconfig.json
└── .vscode/mcp.json

Usage Workflow

1. Generate test scenarios

{
  "userStory": "As a user, I want to login with valid credentials so that I can access my dashboard.",
  "acceptanceCriteria": [
    "User can login with valid username and password.",
    "After successful login, URL should contain app.html.",
    "Invalid login should show an error message."
  ],
  "featureName": "UserLogin",
  "priority": "high"
}

2. Generate test cases

Pass the scenarios object from step 1 as generatedScenarios.

3. Discover stable locators

{
  "applicationUrl": "https://demo.applitools.com/",
  "pageName": "LoginPage",
  "scenarioSteps": [
    "Enter username",
    "Enter password",
    "Click Sign in"
  ]
}

4. Generate Playwright tests

{
  "testCases": ["..."],
  "locators": ["..."],
  "applicationUrl": "https://demo.applitools.com/",
  "frameworkConfiguration": {
    "featureName": "UserLogin",
    "allureReporting": true,
    "screenshotOnFailure": true,
    "traceOnFailure": true
  }
}

Generated output lands in src/output/generated-tests/<feature>/.

5. Run Playwright tests

Before running, install Playwright test in the generated folder:

cd src/output/generated-tests/user-login
npm init -y
npm install @playwright/test
npx playwright install

Then call run_playwright_test:

{
  "testFilePath": "src/output/generated-tests/user-login/tests/user-login.spec.ts",
  "projectName": "user-login-chromium",
  "headed": false
}

6. Create bug (dry-run)

{
  "failedTestResult": { "testStatus": "failed", "errorMessage": "...", "executionSummary": "..." },
  "testCaseDetails": { "testCaseId": "TC-USERLOGIN-001", "..." },
  "applicationUrl": "https://demo.applitools.com/",
  "environment": "test",
  "browser": "chromium",
  "dryRun": true
}

For live GitHub issue creation:

{
  "dryRun": false,
  "confirmed": true
}

Future Extensions

  • Jira issue creation (JIRA_* env vars stubbed in .env.example)

  • Azure DevOps work items (AZURE_DEVOPS_* env vars stubbed)

  • Custom locator strategies per application

Scripts

Command

Description

npm run build

Compile TypeScript to dist/

npm start

Run compiled MCP server

npm run dev

Run server with tsx (development)

License

MIT

F
license - not found
-
quality - not tested
-
maintenance - not tested

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gits5213/qa-ai-mcp-server-gits'

If you have feedback or need assistance with the MCP directory API, please join our Discord server