MCP Playwright Server
About
Automate web testing and tasks by connecting Claude Desktop with Playwright.
Details
- Author
- mostafaraafat91
- Categories
- Developer Tools, Automation, Other
- Tags
- #playwright
Jump to
Setup
Install MCP Playwright Server in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/mostafaraafat91/MCP-Playwright-Server
Follow the installation instructions in the repository README, then restart your MCP client.
Automate web testing and tasks by connecting Claude Desktop with Playwright.
๐ AI-Powered Browser Automation for Claude Desktop
Bridge the gap between AI and web automation with this revolutionary MCP server
A Model Context Protocol (MCP) server that provides browser automation capabilities using Playwright. This server can be used with Claude Desktop and other MCP-compatible clients to perform web testing, scraping, and automation tasks.
- ๐ค AI-First Design: Built specifically for AI agents and natural language automation
- ๐ญ Multi-Browser Support: Chromium, Firefox, and WebKit out of the box
- ๐ณ Production Ready: Docker support for consistent, scalable deployments
- โก Lightning Fast: Optimized for enterprise-grade testing workflows
- ๐ง Developer Friendly: Comprehensive tooling and extensive documentation
- Multi-browser support: Chromium, Firefox, and WebKit
- Comprehensive automation: Navigate, click, type, screenshot, and more
- Docker support: Run in containers for consistent environments
- Testing framework: Built-in Playwright test configuration
- MCP integration: Compatible with Claude Desktop and other MCP clients
- launch_browser- Launch a new browser instance
- new_page- Create a new page in an existing browser
- navigate- Navigate to a URL
- click- Click on an element
- type_text- Type text into input fields
- get_text- Extract text content from elements
- screenshot- Take screenshots of pages
- wait_for_selector- Wait for elements to appear
- close_page- Close a page
- close_browser- Close a browser and all its pages
npm install -g mcp-playwright && mcp-playwright start
To use this MCP server with Claude Desktop, add the following to your Claude Desktop configuration file:
Edit~/Library/Application Support/Claude/claude_desktop_config.json:
{ "mcpServers": { "playwright": { "command": "node", "args": ["/path/to/your/mcpplaywright/src/index.js"], "env": { "PLAYWRIGHT_HEADLESS": "true" } } } }
{ "mcpServers": { "playwright": { "command": "docker", "args": ["run", "--rm", "-i", "mcp-playwright"], "env": { "PLAYWRIGHT_HEADLESS": "true" } } } }
// Let AI write and execute tests naturally "Test the login flow with invalid credentials and verify error messages"
// Automated data extraction from complex SPAs "Navigate to the dashboard, extract all user metrics, and save as JSON"
// Visual regression testing with AI assistance "Compare the current homepage with the baseline and highlight differences"
// Launch a browser const browser = await launchBrowser({ browserType: 'chromium', headless: true }); // Create a new page const page = await newPage({ browserId: browser.id, url: 'https://example.com' }); // Take a screenshot await screenshot({ pageId: page.id, path: 'example.png' }); // Click on an element await click({ pageId: page.id, selector: 'button#submit' }); // Type text await typeText({ pageId: page.id, selector: 'input[name="email"]', text: 'test@example.com' }); // Get text content const text = await getText({ pageId: page.id, selector: 'h1' });
# Run all tests npm test # Run tests in headed mode (visible browser) npm run test:headed # Debug tests npm run test:debug
For development with automatic restarts:
To add new MCP tools, editsrc/index.jsand:
- Add the tool definition to thetoolsarray inListToolsRequestSchemahandler
- Add a case in theCallToolRequestSchemahandler
- Implement the tool method in thePlaywrightMCPServerclass
- PLAYWRIGHT_HEADLESS: Set tofalseto run browsers in headed mode
- PLAYWRIGHT_SLOWMO: Add delay between operations (milliseconds)
- Node.js 18
- All Playwright browsers pre-installed
- System dependencies for browser operation
- Optimized for headless operation
# Add to Dockerfile if needed RUN groupadd -r pwuser && useradd -r -g pwuser -G audio,video pwuser USER pwuser
For large-scale testing, increase Docker memory limits:
docker run --memory=2g --cpus=2 mcp-playwright
- ๐บ Getting Started Video- 5-minute setup guide
- ๐ Complete Tutorial Series- From basics to advanced
- ๐ฎ Interactive Playground- Try it live
"MCP Playwright reduced our testing automation setup time from weeks to hours. The AI integration is game-changing!"
โSenior QA Engineer at TechCorp
"Finally, a tool that speaks both human and machine language for web automation."
โDevOps Lead at StartupXYZ
We love contributions! See ourContributing Guidefor details.
- ๐Bug Reports: Help us squash bugs
- ๐กFeature Requests: Share your ideas
- ๐Documentation: Improve our docs
- ๐งชTesting: Add test coverage
- ๐จExamples: Create usage examples
โญ GitHub Stars: 150+ (and growing!) ๐ฆ NPM Downloads: 1000+ monthly ๐งช Test Coverage: 95% ๐ข Enterprise Users: 50+ ๐ Global Community: 25+ countries
- ๐คEnhanced AI Integration: GPT-4 powered test generation
- ๐ฑMobile Testing: React Native and Flutter support
- ๐CI/CD Plugins: GitHub Actions, Jenkins, GitLab
- ๐Advanced Analytics: Test insights and reporting dashboard
If MCP Playwright helps your team, consider:
- โญStarringthis repository
- ๐ฆSharingon social media
- ๐ฌJoiningourDiscord community
- โSponsoringdevelopment
MIT License - see LICENSE file for details.
Making AI-powered automation accessible to everyone
This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.
An AI agent for the Playwright MCP server, enabling automated web testing and interaction.
Generate Playwright BDD tests, GitHub Actions and Azure Pipelines with business-rule traceability, focused CodeGraph context and persistent Engram memory.
Autonomous QA MCP that tests web and macOS apps like a real engineer and verifies every bug.
A Playwright-based MCP server that exposes a live browser as a traceable, inspectable, debuggable and controllable execution environment for AI agents.
Browser automation via Chrome DevTools Protocol
Drive, inspect, and assert on real Electron desktop apps from an AI agent โ agent-native, Playwright-style automation with accessibility refs, stable error codes, and retrying assertions
Playwright MCP for Godot, screenshots, SceneTree manipulation, and arbitrary GDScript execution at runtime through a local UDP bridge.
A lightweight, AI-powered end-to-end testing framework for CI workflows. Requires an OpenAI API key.
Create and manage end-to-end tests using the Octomind platform.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.


