MCP Playwright Server
Provides comprehensive browser automation capabilities within Firefox, enabling tasks such as navigation, element interaction, text extraction, and screenshot capture.
Click on "Install 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., "@MCP Playwright ServerGo to news.ycombinator.com and summarize the top 5 stories."
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.
MCP Playwright Server
🚀 AI-Powered Browser Automation for Claude Desktop
Bridge the gap between AI and web automation with this revolutionary MCP server
🎯 What is MCP Playwright?
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.
🌟 Why Choose MCP Playwright?
🤖 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
Related MCP server: PlayMCP Browser Automation Server
Features
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
Available Tools
launch_browser- Launch a new browser instancenew_page- Create a new page in an existing browsernavigate- Navigate to a URLclick- Click on an elementtype_text- Type text into input fieldsget_text- Extract text content from elementsscreenshot- Take screenshots of pageswait_for_selector- Wait for elements to appearclose_page- Close a pageclose_browser- Close a browser and all its pages
🚀 Quick Start
One-Line Installation
npm install -g mcp-playwright && mcp-playwright startInstallation
Local Development
Install dependencies:
npm installInstall Playwright browsers:
npm run install:browsersStart the MCP server:
npm startDocker Deployment
Build the Docker image:
npm run docker:buildRun the container:
npm run docker:runConfiguration for Claude Desktop
To use this MCP server with Claude Desktop, add the following to your Claude Desktop configuration file:
macOS Configuration
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"
}
}
}
}Docker Configuration
If running in Docker, use:
{
"mcpServers": {
"playwright": {
"command": "docker",
"args": ["run", "--rm", "-i", "mcp-playwright"],
"env": {
"PLAYWRIGHT_HEADLESS": "true"
}
}
}
}💡 Real-World Use Cases
🧪 AI-Powered Testing
// Let AI write and execute tests naturally
"Test the login flow with invalid credentials and verify error messages"📊 Data Collection
// Automated data extraction from complex SPAs
"Navigate to the dashboard, extract all user metrics, and save as JSON"🔍 Quality Assurance
// Visual regression testing with AI assistance
"Compare the current homepage with the baseline and highlight differences"Usage Examples
Basic Web Testing
// 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' });Running Tests
Run the included Playwright tests:
# Run all tests
npm test
# Run tests in headed mode (visible browser)
npm run test:headed
# Debug tests
npm run test:debugDevelopment
Watch Mode
For development with automatic restarts:
npm run devAdding New Tools
To add new MCP tools, edit src/index.js and:
Add the tool definition to the
toolsarray inListToolsRequestSchemahandlerAdd a case in the
CallToolRequestSchemahandlerImplement the tool method in the
PlaywrightMCPServerclass
Environment Variables
PLAYWRIGHT_HEADLESS: Set tofalseto run browsers in headed modePLAYWRIGHT_SLOWMO: Add delay between operations (milliseconds)
Docker Environment
The Docker container includes:
Node.js 18
All Playwright browsers pre-installed
System dependencies for browser operation
Optimized for headless operation
Troubleshooting
Browser Installation Issues
npx playwright install --with-depsPermission Issues (Linux/Docker)
# Add to Dockerfile if needed
RUN groupadd -r pwuser && useradd -r -g pwuser -G audio,video pwuser
USER pwuserMemory Issues
For large-scale testing, increase Docker memory limits:
docker run --memory=2g --cpus=2 mcp-playwright🎥 Demo & Tutorials
📺 Getting Started Video - 5-minute setup guide
📖 Complete Tutorial Series - From basics to advanced
🎮 Interactive Playground - Try it live
🏆 Success Stories
"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
🤝 Contributing
We love contributions! See our Contributing Guide for details.
🎯 Ways to Contribute
🐛 Bug Reports: Help us squash bugs
💡 Feature Requests: Share your ideas
📝 Documentation: Improve our docs
🧪 Testing: Add test coverage
🎨 Examples: Create usage examples
📈 Project Stats
⭐ GitHub Stars: 150+ (and growing!)
📦 NPM Downloads: 1000+ monthly
🧪 Test Coverage: 95%
🏢 Enterprise Users: 50+
🌍 Global Community: 25+ countries🌟 What's Next?
🤖 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
💖 Support the Project
If MCP Playwright helps your team, consider:
⭐ Starring this repository
🐦 Sharing on social media
💬 Joining our Discord community
☕ Sponsoring development
License
MIT License - see LICENSE file for details.
Built with ❤️ by Mostafa Raafat
Making AI-powered automation accessible to everyone
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBquality-maintenanceA MCP server that provides browser automation tools, allowing users to navigate websites, take screenshots, click elements, fill forms, and execute JavaScript through Playwright.Last updated82
- AlicenseCqualityDmaintenanceA comprehensive MCP server that provides powerful web automation tools using Playwright, enabling web scraping, testing, and browser interaction through natural language commands.Last updated3815MIT
- Alicense-qualityDmaintenanceA powerful MCP server for browser automation that supports both Playwright and Chrome DevTools Protocol (CDP) with intelligent preprocessing, comprehensive logging, and remote browser management capabilities. Enables users to perform web automation tasks like navigation, content extraction, form interactions, and screenshot capture through natural language.Last updated526MIT
- Flicense-qualityCmaintenanceAn MCP server that enables AI assistants to perform web automation tasks like navigation, typing, and clicking using Playwright on Cloudflare Workers. It allows models to interact with websites and capture screenshots directly through a set of integrated browser tools.Last updated10,751
Related MCP Connectors
AI-powered browser automation — navigate, click, fill forms, and extract data from any website.
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/MostafaRaafat91/MCP-Playwright-Server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server