Mobile Testing AI Agent MCP Server

Mobile Testing AI Agent MCP Server

Enables AI-driven mobile test automation through planning, generation, and self-healing agents for Android and iOS, exposed as callable MCP tools.

Category
访问服务器

README

Mobile Testing and Mobile Automation AI Agent MCP Server

Mobile testing, mobile automation, mobile QA, and mobile test automation framework powered by AI agents and MCP tooling.

Project Overview: Mobile Testing, Mobile Automation, and Mobile QA

This repository provides an AI-powered framework for mobile testing and mobile test automation (plus web validation) using:

  • Planner Agent: explores a target app or site and generates a structured Markdown test plan for mobile QA.
  • Generator Agent: converts the Markdown test plan into executable Playwright or Mobilewright tests for mobile automation workflows.
  • Healer Agent: runs tests, detects failures, and attempts automated repair cycles to improve mobile test automation stability.
  • Android and iOS Orchestrators: run Planner -> Generator -> Healer as end-to-end pipelines for each platform and mobile testing lifecycle.
  • MCP Server: exposes the framework as callable MCP tools over stdio for AI clients and automation platforms.

The framework is designed to accelerate mobile test authoring, improve test stability, and provide an extensible baseline for AI-assisted mobile QA workflows.

Quick Setup for Mobile Test Automation (One Command)

For a fast web-ready setup:

npm install && npx playwright install chromium

Then run the default web test:

npm run test:web

Optional environment setup:

cp .env.example .env

On Windows PowerShell:

Copy-Item .env.example .env

Dependencies for Mobile Automation and Mobile QA

Required

  • Node.js 18+
  • npm 9+
  • Playwright Chromium browser

Core NPM packages

  • mobilewright
  • @playwright/test
  • playwright
  • @modelcontextprotocol/sdk
  • zod
  • openai
  • dotenv
  • fs-extra
  • chalk
  • axios
  • cheerio

Platform prerequisites

Web

  • No additional setup after installing dependencies and Chromium.

Android

  • Android SDK installed
  • ADB available on PATH
  • ANDROID_HOME configured
  • At least one connected Android device or emulator

Useful checks:

npm run doctor
npm run devices

iOS

  • macOS host for local iOS automation
  • Xcode + Command Line Tools
  • Booted iOS Simulator (or compatible cloud/mobile device provider)

Repository Structure for Mobile Testing Projects

Mobile-App-Testing-AI-Agent-MCP-Server/
├── agents/
│   ├── planner.js
│   ├── generator.js
│   └── healer.js
├── mcp/
│   └── server.js
├── orchestrators/
│   ├── android-orchestrator.js
│   └── ios-orchestrator.js
├── tests/
│   ├── generated/
│   └── uselessweb/
│       ├── uselessweb.spec.js
│       ├── uselessweb-android.test.js
│       └── uselessweb-ios.test.js
├── plans/
│   └── uselessweb-org--web-test-plan.md
├── reports/
├── mobilewright.config.js
├── playwright.config.js
├── .env.example
└── package.json

What each area does for mobile testing and automation

  • agents: AI agent implementations for planning, generation, and healing in mobile test automation pipelines.
  • mcp: stdio MCP server exposing planner, generator, healer, and orchestrator tools.
  • orchestrators: platform-specific pipeline runners for Android and iOS mobile automation.
  • tests: executable specs, including generated tests and curated examples for mobile QA.
  • plans: Markdown test plans used as source input for code generation.
  • reports: mobile testing and healing run artifacts.

Usage Guide for Mobile Testing and Mobile QA

1. Run web test suite

npm run test:web

2. Run mobile viewport projects in Playwright (mobile testing)

npm run test:mobile-chrome
npm run test:mobile-safari

3. Run Android or iOS Mobilewright tests for mobile automation

npm run test:android
npm run test:ios

4. Use individual AI agents

Planner

npm run agent:planner
npm run agent:planner:android
npm run agent:planner:ios

Direct CLI example:

node agents/planner.js --url=https://uselessweb.org/ --platform=web --out=plans/

Generator

npm run agent:generator
npm run agent:generator:android
npm run agent:generator:ios

Direct CLI example:

node agents/generator.js --plan=plans/uselessweb-org--web-test-plan.md --platform=web --out=tests/generated/

Healer

npm run agent:healer
npm run agent:healer:android
npm run agent:healer:ios

Direct CLI example:

node agents/healer.js --spec=tests/uselessweb/uselessweb.spec.js --platform=web --retries=3

5. Add a new test with Android and iOS agents (mobile test automation flow)

Use this flow when you want to create tests for a new target URL in your mobile QA process.

Android agent flow (plan -> generate -> run -> heal)

  1. Generate an Android test plan:
node agents/planner.js --url=https://uselessweb.org --platform=android --out=plans/
  1. Generate Android tests from the plan:
node agents/generator.js --plan=plans/example-com-android-test-plan.md --platform=android --out=tests/generated/
  1. Run the generated Android test:
npx mobilewright test tests/generated/example-com-android-test-plan.test.js
  1. Auto-heal failing Android tests:
node agents/healer.js --spec=tests/generated/example-com-android-test-plan.test.js --platform=android --retries=3

iOS agent flow (plan -> generate -> run -> heal)

  1. Generate an iOS test plan:
node agents/planner.js --url=https://uselessweb.org --platform=ios --out=plans/
  1. Generate iOS tests from the plan:
node agents/generator.js --plan=plans/example-com-ios-test-plan.md --platform=ios --out=tests/generated/
  1. Run the generated iOS test:
npx mobilewright test tests/generated/example-com-ios-test-plan.test.js
  1. Auto-heal failing iOS tests:
node agents/healer.js --spec=tests/generated/example-com-ios-test-plan.test.js --platform=ios --retries=3

Optional: use orchestrators instead of running each step manually

npm run orchestrate:android -- --url=https://uselessweb.org --retries=3
npm run orchestrate:ios -- --url=https://uselessweb.org --retries=3

6. Run orchestration pipelines for mobile automation

Android pipeline

npm run orchestrate:android

iOS pipeline

npm run orchestrate:ios

7. Run complete web AI pipeline

npm run pipeline:web

This executes Planner -> Generator -> Healer for web.

7b. Run complete mobile QA pipelines

For end-to-end mobile test automation on each platform:

npm run orchestrate:android
npm run orchestrate:ios

8. Start the MCP server

npm run mcp:start

The server runs on stdio and exposes tools including:

  • health_check
  • run_planner
  • run_generator
  • run_healer
  • run_orchestrator
  • list_repo_commands

9. Inspect MCP tools locally

npm run mcp:inspect

10. Example MCP client configuration

Use this in an MCP-capable client configuration file:

{
   "mcpServers": {
      "mobile-testing-ai-agent": {
         "command": "node",
         "args": ["mcp/server.js"],
         "cwd": "."
      }
   }
}

11. CI/CD pipeline (GitHub Actions)

This repository now includes a CI/CD workflow at .github/workflows/ci-cd.yml.

CI behavior:

  • Runs on pushes to main and pull requests targeting main.
  • Installs dependencies with npm ci.
  • Installs Playwright Chromium.
  • Executes the web suite with npm run test:web.
  • Uploads Playwright report artifacts when available.

CD behavior:

  • Runs after CI on pushes to main.
  • Triggers deployment only if DEPLOY_WEBHOOK_URL is configured as a repository secret.
  • Safely skips deployment when the secret is not set.

To enable deployment, add this repository secret:

  • DEPLOY_WEBHOOK_URL

Contributing to Mobile Testing and Mobile Automation

Contributions are welcome. Please follow the workflow below:

  1. Fork the repository.
  2. Create a feature branch from main.
  3. Keep changes focused and well-scoped.
  4. Add or update tests for new behavior.
  5. Run relevant checks before opening a PR:
    • npm run test:web
    • npm run test:all
    • npm run doctor (for mobile environments)
  6. Open a pull request with:
    • clear problem statement
    • implementation summary
    • validation evidence (logs, test output, screenshots where useful)

Contribution guidelines

  • Prefer small, reviewable pull requests.
  • Avoid unrelated refactors in the same PR.
  • Preserve script and folder naming conventions.
  • Document new commands and agent behaviors in this README.

Acknowledgements

This project is built on top of the excellent Mobilewright ecosystem.

  • Mobilewright framework: https://github.com/mobile-next/mobilewright
  • Mobilewright documentation: https://mobilewright.dev

Special thanks to the Mobilewright maintainers and contributors for enabling practical mobile automation workflows across Android and iOS.

License

ISC

Mobile Testing FAQ (SEO)

What is mobile test automation?

Mobile test automation is the practice of using tools and scripts to validate mobile apps and mobile web experiences automatically across Android and iOS.

How does this repository help with mobile QA?

This project supports mobile QA with AI-driven planning, test generation, and self-healing execution, plus Android and iOS orchestration flows.

Is this suitable for mobile automation teams?

Yes. It is built for teams that need scalable mobile automation, repeatable test pipelines, and faster feedback cycles for releases.

Which mobile testing keywords does this framework target?

This framework focuses on practical workflows for mobile testing, mobile automation, mobile QA, and mobile test automation.

Questions?

If you have any questions:

Response time: Typically 24-48 hours


First-Time Contributors Welcome! 👋

New to open source? No problem! Look for issues tagged with good-first-issue or help-wanted. We provide mentorship and guidance to help you succeed.

Thank you for making test automation better for everyone! 🚀

推荐服务器

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

官方
精选