qa-ai-agents

qa-ai-agents

Enables automated QA testing by running a pipeline of AI agents that generate test scenarios, architect test layers, write Playwright tests, and review code, all grounded in feature requirements and API contracts.

Category
访问服务器

README

QA AI Agents

An AI-powered QA automation pipeline built with TypeScript, Claude API, and the Model Context Protocol (MCP).

Architecture

Four specialised agents run in sequence, each grounded in feature requirements, business rules, and API contracts:

  1. Agent 1 — Functional Tester: Generates test scenarios across happy path, negative, security, edge cases, UI states, and business rules
  2. Agent 2 — Test Architect: Assigns each scenario to the correct test pyramid layer (unit / API / component / E2E)
  3. Agent 3 — Test Engineer: Writes production-grade Playwright tests using Page Object Model (POM)
  4. Agent 4 — Code Reviewer: Audits generated tests for selector quality, assertion completeness, and Playwright best practices

MCP Server

Exposes the pipeline as 4 MCP tools callable from Claude Desktop or Claude Code:

  • run_qa_pipeline — full 4-agent pipeline
  • generate_test_scenarios — Agent 1 only
  • set_feature_input — write to input/feature.md
  • get_pipeline_report — read last pipeline report

Tech Stack

  • TypeScript + Node.js
  • Anthropic Claude API (Sonnet 4.6 + Haiku 4.5)
  • Ollama (local LLM support — toggle via USE_OLLAMA)
  • Playwright (generated test output)
  • Model Context Protocol (MCP) SDK

Setup

git clone https://github.com/abchahal/qa-ai-agents.git
cd qa-ai-agents
npm install
cp .env.example .env
# Add your ANTHROPIC_API_KEY to .env

Running the pipeline

# Via terminal
npm run pipeline

# Via Claude Desktop / Claude Code
# Type: "Run the full QA pipeline using input/feature.md"

Input files

File Purpose
input/feature.md Feature requirements, business rules, UI selectors
input/api-contract.json API schema (optional)
input/source.js Source code context (optional)

Output

output/
├── pages/             ← Page Object classes
├── tests/             ← Playwright spec files
└── pipeline_report.md

Model Strategy

Agent Model Reason
Agent 1 Haiku 4.5 Structured JSON output
Agent 2 Haiku 4.5 Classification task
Agent 3 Haiku 4.5 Code generation
Agent 4 Haiku 4.5 Analysis and scoring

MCP Setup via CLI

Step 1 — Create the batch file

Create start-mcp.bat in the project root:

@echo off
cd /d "C:\path\to\qa-ai-agents"
node --loader ts-node/esm src/server.ts

Replace C:\path\to\qa-ai-agents with your actual project path.

Step 2 — Register the MCP server

claude mcp add -s user qa-ai-agents "C:\path\to\qa-ai-agents\start-mcp.bat"

Step 3 — Verify connection

# List all MCP servers and their status
claude mcp list

# Check your server specifically
claude mcp get qa-ai-agents

Expected output:

qa-ai-agents:
  Scope: User config (available in all your projects)
  Status: ✔ Connected
  Type: stdio
  Command: C:\path\to\qa-ai-agents\start-mcp.bat

Step 4 — Remove the server (if needed)

claude mcp remove qa-ai-agents -s user

Switching between Ollama and Claude API

Ollama → Claude API

Step 1 — Update .env:

USE_OLLAMA=false
ANTHROPIC_API_KEY=sk-ant-your-actual-key-here

Step 2 — Restart the MCP server to pick up new env:

claude mcp remove qa-ai-agents -s user
claude mcp add -s user qa-ai-agents "C:\path\to\qa-ai-agents\start-mcp.bat"

Step 3 — Verify correct provider is loaded:

npm run agent1

You should see:

Using Claude API: claude-sonnet-4-6

Claude API → Ollama

Step 1 — Make sure Ollama is running and model is pulled:

ollama list
# Should show qwen2.5-coder:7b or your preferred model

If model is not pulled yet:

ollama pull qwen2.5-coder:7b

Step 2 — Update .env:

USE_OLLAMA=true
OLLAMA_MODEL=qwen2.5-coder:7b

Step 3 — Restart the MCP server:

claude mcp remove qa-ai-agents -s user
claude mcp add -s user qa-ai-agents "C:\path\to\qa-ai-agents\start-mcp.bat"

Step 4 — Verify correct provider is loaded:

npm run agent1

You should see:

Using Ollama local model: qwen2.5-coder:7b

Provider comparison

Ollama (local) Claude API (cloud)
Cost Free ~$0.18 per pipeline run
Speed 15–25 minutes 45–90 seconds
Quality Good Best
Internet required No Yes
Best for Development and debugging Production runs and demos

Tip: Use USE_OLLAMA=true while writing and debugging agent code to avoid burning API credits. Switch to USE_OLLAMA=false for actual pipeline runs and portfolio demos.


Environment variables

Variable Required Description
ANTHROPIC_API_KEY Yes (if USE_OLLAMA=false) Your Anthropic API key from console.anthropic.com
USE_OLLAMA Yes true for local Ollama, false for Claude API
OLLAMA_MODEL No Ollama model name. Default: qwen2.5-coder:7b

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选