Basic information
About MCP Playwright Test Server
A Model Context Protocol (MCP) server for automating Playwright tests
MCP Playwright Test is a MCP server in the Browser Automation category listed in the AddMCP.net directory, published by w1561778301. Supported transport: stdio. Runtime: node. The repository has 1 GitHub stars. Source code is hosted on github.com.
Setup
{
"mcpServers": {
"mcp-playwright-test": {
"command": "npx",
"args": [
"ts-node",
"src/test-mcp.ts"
]
}
}
}
{
"mcpServers": {
"mcp-playwright-test": {
"command": "npx",
"args": [
"ts-node",
"src/test-mcp.ts"
]
}
}
}
{
"servers": {
"mcp-playwright-test": {
"command": "npx",
"args": [
"ts-node",
"src/test-mcp.ts"
]
}
}
}
MCP Playwright Test config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mcp-playwright-test": {
"command": "npx",
"args": [
"ts-node",
"src/test-mcp.ts"
]
}
}
}
MCP Playwright Test tools
Tool list not available yet
This listing does not currently have a tool list to display. This does not mean the server has no tools; check its documentation for supported capabilities.
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
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
Frequently asked questions
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.
Comments
No comments yet
Be the first to share feedback about this listing. Sign in to leave a comment.
Sign In