Skip to main content
Glama
lucascortazz

Krayin5 Automated Tests MCP Server

by lucascortazz
README.md
# Krayin5 Automated Tests MCP Server

A Model Context Protocol (MCP) server that connects to and manages the parent Krayin5 automated testing infrastructure.

## Overview

This MCP server provides a bridge to the parent `krayin5-automated-tests` project, offering tools for:

- **Real Test Execution**: Run actual Cucumber.js + Playwright tests
- **Live Status Monitoring**: Check current test status and reports
- **Feature Discovery**: Browse actual .feature files and test scenarios
- **Coverage Analysis**: Analyze test reports and coverage data

## Connection to Parent Project

This MCP server is connected to: `../krayin5-automated-tests`

**Parent Project Structure:**
- **Framework**: Cucumber.js + Playwright + TypeScript
- **Features**: Authentication, Contact Management, Organization Management
- **Test Types**: Smoke, Contact, Organization, Auth, Headless
- **Reports**: JSON reports generated in `reports/` directory
- **Screenshots**: Debug screenshots saved in `screenshots/` directory

## Features

### Available Tools

1. **`get_test_status`** - Get real-time status of the parent test project
2. **`run_test_suite`** - Execute actual test suites from parent project
3. **`get_test_coverage`** - Analyze actual test reports and coverage
4. **`list_krayin_test_cases`** - Browse real feature files and available test suites

### Real Test Suites Available

- **`all`**: Run all tests (`npm test`)
- **`smoke`**: Run smoke tests (`npm run test:smoke`)
- **`contacts`**: Run contact management tests (`npm run test:contacts`)
- **`organization`**: Run organization tests (`npm run test:organization`) 
- **`auth`**: Run authentication tests (`npm run test:auth`)
- **`headless`**: Run tests in headless mode (`npm run test:headless`)

## Installation

1. Clone this repository
2. Install dependencies:
   ```bash
   npm install
   ```
3. Build the project:
   ```bash
   npm run build
   ```

## Usage

### With Claude Desktop

Add this server to your Claude Desktop configuration (`~/Library/Application Support/Claude/claude_desktop_config.json`):

```json
{
  "mcpServers": {
    "krayin5-automated-tests": {
      "command": "node",
      "args": ["/Users/lucascortazzo/code/mcp-krayin5-automated-tests/build/index.js"]
    }
  }
}
```

### Direct Usage

Run the server directly:

```bash
npm start
```

## Development

- **Build**: `npm run build`
- **Development**: `npm run dev` (builds and runs)
- **Start**: `npm start` (runs pre-built version)

## MCP Integration

This server implements the Model Context Protocol specification and can be used with any MCP-compatible client, including:

- Claude Desktop
- VS Code with MCP extensions
- Custom MCP clients

## Project Structure

```
├── src/
│   └── index.ts          # Main MCP server implementation
├── build/                # Compiled JavaScript (generated)
├── .github/
│   └── copilot-instructions.md
├── .vscode/
│   └── mcp.json         # VS Code MCP configuration
├── package.json
├── tsconfig.json
└── README.md
```

## Contributing

1. Make changes to TypeScript source files in `src/`
2. Build the project with `npm run build`
3. Test with your MCP client
4. Ensure all TypeScript compilation passes without errors

## License

ISC