MCP.so
ログイン

MCP Playwright Test

@w1561778301

基本情報

カテゴリ

ブラウザ自動化

ライセンス

NOASSERTION

トランスポート

stdio

作者

w1561778301

MCP Playwright Test について

A Model Context Protocol (MCP) server for automating Playwright tests

MCP Playwright Test の設定

以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。

{
  "mcpServers": {
    "mcp-playwright-test": {
      "command": "npx",
      "args": [
        "ts-node",
        "src/test-mcp.ts"
      ]
    }
  }
}

MCP Playwright Test のツール

ツール一覧はまだありません

この掲載には表示できるツール一覧がまだありません。サーバーにツールがないという意味ではありません。対応機能はプロジェクトのドキュメントをご確認ください。

上のボタンで一時的なサンドボックスでこのサーバーを実行し、ツール一覧を取得できます。

概要

What is MCP Playwright Test?

MCP Playwright Test is a Model Context Protocol (MCP) server for Playwright test automation. It automatically fetches project code (from Git or local), sets up Playwright environments, generates test cases from requirements, executes UI and API tests, and captures network requests and console logs. It is designed for developers using AI tools like Claude Desktop and Cursor.

How to use MCP Playwright Test?

Install via npm/yarn/pnpm (npm install mcp-playwright-test). Set the required ANTHROPIC_API_KEY environment variable (for test case generation). Start the server with npm run start or npx ts-node src/test-mcp.ts. Configure via .playwright-mcp.json for integration with Claude Desktop and Cursor.

Key features of MCP Playwright Test

  • Clones Git repositories or uses local projects for testing
  • Launches browsers (Chromium, configurable) with headless mode
  • Generates test cases from natural language requirements
  • Executes both UI and API test suites
  • Captures network requests and console logs
  • Supports OpenAPI 3.0, Swagger 2.0, and Apifox API specs
  • Provides test execution reports and test case resources
  • Configurable via environment variables or .playwright-mcp.json

Use cases of MCP Playwright Test

  • Automatically generate and run UI tests for a frontend project
  • Create API tests from an OpenAPI specification document
  • Run combined UI and API regression tests with a single MCP server
  • Integrate test automation into AI-assisted development workflows

よくある質問

1

What environment variables are required?

At minimum, `ANTHROPIC_API_KEY` must be set to generate test cases. Optional variables include `MCP_PORT` (default 8931), `CODE_PATH`, `SIMPLE_GIT_*` (for remote repos), `API_URL`, `API_KEY`, `BROWSER_TYPE` (default chromium), `BROWSER_HEADLESS` (default true), and `TEST_STORAGE_DIR` (default ./test-results).

2

What testing modes are supported?

Three modes: UI testing only, API testing only, or both UI and API testing simultaneously. Configure the relevant environment variables accordingly.

3

How to configure for Claude Desktop or Cursor?

Create a `.playwright-mcp.json` file in your project root with the MCP server definition. Then add the configuration in Claude Desktop or Cursor’s MCP settings, selecting the server name as defined in the file.

4

Which API specification formats are supported?

OpenAPI 3.0, Swagger 2.0, and Apifox. The server automatically detects the format, or you can specify it via the `format` parameter.

5

What are the dependencies and runtime requirements?

Requires Node.js and Playwright. For test case generation, an Anthropic API key is needed. No other external services are mandatory; Git files can be cloned locally or used from an existing directory.

コメント

「ブラウザ自動化」の他のコンテンツ