AI QA Agent MCP

AI QA Agent MCP

Enables MCP-compatible clients to execute Playwright-based UI and API test suites (login, inventory, checkout, API, regression) and receive structured JSON test results.

Category
访问服务器

README

AI QA Agent MCP

An MCP-enabled QA automation framework built with Playwright and Node.js for executing UI and API automated tests through a Model Context Protocol (MCP) server.

The project demonstrates how traditional test automation can be exposed as reusable MCP tools, allowing an MCP-compatible client to trigger test suites and receive structured test results.

🚀 Features

  • Playwright UI automation
  • API testing with Playwright
  • Page Object Model (POM)
  • MCP server integration
  • MCP tool-based test execution
  • Structured JSON test results
  • Login, inventory and checkout test coverage
  • Positive and negative test scenarios
  • Regression test execution
  • Environment-based configuration
  • HTML test reporting
  • Screenshots on failure
  • GitHub Actions CI/CD
  • Automated execution on push and pull requests

🧰 Tech Stack

  • JavaScript
  • Node.js
  • Playwright
  • Model Context Protocol (MCP)
  • MCP Inspector
  • Git
  • GitHub
  • GitHub Actions

🏗️ Architecture

                MCP Client / Inspector
                         |
                         v
                    MCP Server
                  (mcp/server.js)
                         |
                         v
                   run_tests Tool
                         |
             +-----------+-----------+
             |                       |
             v                       v
       Test Tool Layer          Suite Selection
       (tools/*.js)        login / inventory /
                           checkout / api /
                           regression
             |
             v
        testRunner.js
             |
             v
          Playwright
         /          \
        v            v
    UI Tests      API Tests
       |
       v
  Page Objects

📁 Project Structure

my-ai-qa-agent/
│
├── .github/
│   └── workflows/
│       └── playwright.yml
│
├── data/
│   ├── customer.js
│   └── users.js
│
├── mcp/
│   └── server.js
│
├── pages/
│   ├── LoginPage.js
│   ├── InventoryPage.js
│   ├── CartPage.js
│   └── CheckoutPage.js
│
├── tests/
│   ├── api/
│   │   └── users.api.spec.js
│   ├── login.spec.js
│   ├── inventory.spec.js
│   └── checkout.spec.js
│
├── tools/
│   ├── testRunner.js
│   ├── runLoginTests.js
│   ├── runInventoryTests.js
│   ├── runCheckoutTests.js
│   ├── runApiTests.js
│   └── runRegressionTests.js
│
├── .env.example
├── .gitignore
├── package.json
├── playwright.config.js
└── README.md

pages/

Contains reusable Page Object Model classes that encapsulate UI locators and user actions.

tests/

Contains Playwright UI and API test specifications.

tools/

Acts as the bridge between MCP requests and Playwright test execution. Individual tools select test suites while testRunner.js executes Playwright and summarizes the results.

mcp/

Contains the MCP server that exposes QA automation capabilities as MCP tools.

.github/workflows/

Contains the GitHub Actions workflow used to execute the automated test suite in CI.

⚙️ Installation

Clone the repository:

git clone https://github.com/bisminizzar84/ai-qa-agent-mcp
cd ai-qa-agent-mcp

Install dependencies:

npm install

Install Playwright browsers:

npx playwright install

Create a local .env file based on .env.example:

BASE_URL=https://www.saucedemo.com

🧪 Running Tests

Run the complete test suite:

npm test

Run tests with a visible browser:

npx playwright test --headed

Run only login tests:

npx playwright test tests/login.spec.js

Run API tests:

npx playwright test tests/api/users.api.spec.js

Open the Playwright HTML report:

npx playwright show-report

🤖 MCP Integration

The project exposes QA automation through an MCP server.

Start the server through MCP Inspector:

npx -y @modelcontextprotocol/inspector@latest node mcp/server.js

The run_tests MCP tool supports multiple suites:

  • login
  • inventory
  • checkout
  • api
  • regression

Example request:

{
  "suite": "api"
}

Example response:

{
  "suite": "api",
  "status": "passed",
  "total": 1,
  "passed": 1,
  "failed": 0,
  "skipped": 0,
  "durationMs": 1841
}

The MCP layer converts test execution into structured results that can be consumed by MCP-compatible clients.

🔄 CI/CD

GitHub Actions automatically executes the Playwright test suite when code is pushed to main or when a pull request targets main.

The pipeline performs:

  1. Repository checkout
  2. Node.js setup
  3. Dependency installation
  4. Playwright browser installation
  5. Automated test execution
  6. Playwright report upload

This provides automated regression feedback for every code change.

🔮 Future Enhancements

  • Connect an LLM to the MCP server for natural-language test execution
  • AI-assisted failure analysis
  • Automatic defect summaries
  • Test generation from natural-language requirements
  • Additional API coverage
  • Parallel and cross-browser execution
  • Dockerized test execution
  • Test result notifications

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选