playwright-mcp-server
This is an experimental project to integrate Playwright with MCP. My plan is to conduct in-depth research, understand the intricacies of the integration, and review the best articles on the web to create the optimal version of a project using both technologies.
Documentation
E-commerce Test Automation with Cypress
This project contains end-to-end tests for a mock e-commerce application using Cypress with TypeScript and the Page Object Model pattern.
Overview
The tests automate two main flows:
1. Successful order flow - a user who can complete a purchase successfully
2. Failed order flow - a user whose payments are always declined
Project Structure
cypress/
├── e2e/ # Test files
│ ├── successful-order-flow.cy.ts
│ └── failed-order-flow.cy.ts
├── fixtures/ # Test data
│ ├── users.json
│ ├── products.json
│ └── payment.json
├── pages/ # Page Objects
│ ├── LoginPage.ts
│ ├── ProductsPage.ts
│ ├── CartPage.ts
│ └── CheckoutPage.ts
└── support/ # Support files
├── commands.ts
└── e2e.tsSetup
1. Clone the repository
2. Install dependencies:
npm install3. Set up environment variables:
Running the Tests
Run all tests:
npm testRun tests in headless mode:
npm run test:headlessRun specific test flow:
npm run test:success # Successful order flow
npm run test:failure # Failed order flowOpen Cypress GUI:
npm run cypress:openEnvironment Variables
The following environment variables are used:
- `CYPRESS_USERNAME`: Username for successful login
- `CYPRESS_PASSWORD`: Password for both users
- `CYPRESS_FAILURE_USERNAME`: Username for the user with failed payments
These can be set in:
1. `cypress.env.json` file (for local development)
2. `.env` file
3. CI/CD pipeline environment variables
Test Application
The tests are designed for the mock e-commerce application located at:
https://v0-imagine-deals.vercel.app
Notes
- This is a demo project for testing purposes only
- The application simulates payment scenarios:
- Any total ending in .99 will simulate a declined payment
- Any total ending in .88 will simulate a network error
Frequently asked questions
What is playwright-mcp-server?
playwright-mcp-server is This is an experimental project to integrate Playwright with MCP. My plan is to conduct in-depth research, understand the intricacies of the integration, and review the best articles on the web to create the optimal version of a project using both technologies.
How do I install playwright-mcp-server?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is playwright-mcp-server open source?
Yes — it is hosted on GitHub at https://github.com/JoanEsquivel/playwright-mcp-server and has 11 stars.
Related MCP tools
Playwright Model Context Protocol Server - Tool to automate Browsers and APIs in Claude Desktop, Cline, Cursor IDE and More 🔌
MCP server for fetch web page content using Playwright headless browser. TypeScript-based implementation. Trusted by 800+ developers.
A Playwright-based Node.js tool that bypasses search engine anti-scraping mechanisms to execute Google searches. Built for the Model Context Protocol to...
This MCP server provides browser automation capabilities through Puppeteer, allowing interaction with both new browser instances and existing Chrome windows.
🍒 Cherry Studio is a desktop client that supports for multiple LLM providers. Built for the Model Context Protocol to enhance AI capabilities.
Enhanced ChatGPT Clone: Features Agents, MCP, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini...
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP