Playwright MCP Agents
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Playwright MCP Agentsgenerate Playwright tests for the shopping cart checkout flow"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
๐ญ Playwright AI Agentic Testing Framework
A production-ready Quality Engineering test framework leveraging Playwright, Model Context Protocol (MCP), VS Code, and GitHub Copilot AI Agents for unified UI and REST API automation.
๐๏ธ Architecture & Core Components
Agentic Loop (Plan โ Generate โ Heal): Autonomous test creation, specification generation, and self-healing broken locators via MCP.
Hybrid Test Capabilities: Cross-browser UI automation + Schema-validated REST API contract testing via
Zod.VS Code Native MCP Integration: Connects Copilot Chat directly to Playwright's local browser runtime context via standard I/O.
Related MCP server: RunAutomation MCP Server
๐ Quickstart Guide
Prerequisites
Node.js 18+ installed
VS Code with GitHub Copilot & Playwright extensions enabled
Setup Commands
# 1. Install dependencies & browsers
npm install
npx playwright install
# 2. Initialize Playwright MCP Agents
npm run agents:init๐ค Using Playwright AI Agents
In VS Code Copilot Chat, interact with the agentic loop:
Planner Agent:
@playwright-test-planner draft test specs for specs/ui-shopping-flow.md using tests/seed/seed.spec.tsGenerator Agent:
@playwright-test-generator write TypeScript tests for specs/ui-shopping-flow.md into tests/ui/checkout.spec.tsHealer Agent:
@playwright-test-healer diagnose and repair failing tests in tests/ui/checkout.spec.ts
๐งช Running Tests
# Run all tests (UI + API)
npm run test
# Run UI tests only
npm run test:ui
# Run API tests only
npm run test:api
# View HTML Report
npm run test:reportThis server cannot be deployed
Maintenance
Related MCP Connectors
Browser-based QA for AI-built software. Test pages with real browsers via agents.
Debug, build, and manage Power Automate cloud flows with AI agents
Agentic testing: HyperExecute jobs, test failure triage, SmartUI visual diffs, a11y audits
Browser-backed QA with evidence and fix-ready reports for coding agents.
Related MCP Servers
- AlicenseAqualityDmaintenanceGenerates intelligent Playwright locators with reliability rankings, creates Page Object Models, and runs test automation scripts directly from your IDE or AI assistant.56 npm1MIT
- FlicenseNot gradedqualityCmaintenanceEnables AI assistants to execute browser automation, perform QA tasks, and generate test code through natural language commands using Playwright.5-
- AlicenseNot gradedqualityDmaintenanceEnables AI models (Claude, ChatGPT, GitHub Copilot) to run and analyze local tests, rerun failures, and orchestrate QA workflows using existing UI and API test frameworks.6 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to drive Playwright-based browser automation for UI testing, returning JSON/HTML reports with screenshots without server-side LLM or test scripts.1MIT