Playwright MCP Server
Mentioned as a planned future support for browser automation, alongside other browser engines (currently appears to use Chromium)
Enables execution of custom JavaScript in the browser context to manipulate web pages or extract data that requires client-side scripting
Required as a prerequisite for the Playwright browser installation, enabling the browser automation capabilities
Provides package distribution for easy installation of the playwright-mcp-server using pip
Used for testing the MCP server functionality and ensuring reliability
The primary language for the MCP server implementation, required in version 3.8 or higher
Mentioned as a planned future support for browser automation, alongside other browser engines (currently appears to use Chromium)
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., "@Playwright MCP Servergo to example.com and take a screenshot of the homepage"
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 MCP Server
A powerful Model Context Protocol (MCP) server that provides comprehensive browser automation capabilities using Playwright. This server enables AI assistants to interact with web pages, perform automated testing, web scraping, and complex browser-based workflows.
🚀 Quick Install for VSCode
Install this MCP server directly in VSCode with one click:
Related MCP server: MCP Browser Server
✨ Features
🌐 Complete Browser Control: Navigate, click, type, and interact with any web element
📸 Screenshot & Visual Testing: Capture full pages or specific elements
🔄 Tab Management: Open, close, and switch between multiple browser tabs
📝 Form Automation: Fill forms, select options, handle checkboxes and radio buttons
⏳ Smart Waiting: Wait for elements, network requests, or specific page states
🔍 Content Extraction: Get text, attributes, and data from web pages
💻 JavaScript Execution: Run custom JavaScript in the browser context
🛡️ Robust Error Handling: Comprehensive error handling with meaningful messages
📦 Installation
Prerequisites
Python 3.8 or higher
Node.js (required for Playwright browser installation)
Install from PyPI
pip install playwright-mcp-server
playwright install chromiumInstall from Source
git clone https://github.com/nolecram/Build_MCP_Server.git
cd Build_MCP_Server
pip install -e .
playwright install chromium🔧 Configuration
For MCP Clients
Add to your MCP client configuration:
{
"mcpServers": {
"playwright": {
"command": "playwright-mcp-server",
"args": []
}
}
}For VSCode MCP Extension
Add to your VSCode settings:
{
"mcp.servers": {
"playwright": {
"command": "playwright-mcp-server"
}
}
}🛠️ Available Tools
Tool | Description | Parameters |
| Navigate to a URL |
|
| Click on an element |
|
| Type text into an element |
|
| Take a screenshot |
|
| Extract text from an element |
|
| Wait for element to appear |
|
| Execute JavaScript |
|
| Open a new tab |
|
| Close current tab | - |
| Get page title | - |
| Get current URL | - |
💡 Usage Examples
Web Scraping
# Navigate to a website
browser_navigate {"url": "https://example.com"}
# Wait for content to load
browser_wait_for_selector {"selector": ".content"}
# Extract information
browser_get_text {"selector": ".price"}
# Take a screenshot
browser_screenshot {"full_page": true}Form Automation
# Fill out a form
browser_type {"selector": "#email", "text": "user@example.com"}
browser_type {"selector": "#password", "text": "secretpassword"}
browser_click {"selector": "#login-button"}Testing Workflows
# Multi-step testing
browser_navigate {"url": "https://app.example.com"}
browser_click {"selector": "#feature-button"}
browser_wait_for_selector {"selector": ".success-message"}
browser_screenshot {"path": "test-result.png"}🧪 Testing
Run the test suite:
# Install test dependencies
pip install pytest pytest-asyncio
# Run tests
pytest tests/
# Run with coverage
pytest --cov=playwright_mcp_server tests/📚 Documentation
Comprehensive documentation is available in the docs directory:
🔒 Security
Runs in headless mode by default
Isolated browser contexts for each session
Automatic resource cleanup
Configurable timeout limits
No sensitive data logging
🤝 Contributing
We welcome contributions! Please see our contributing guidelines:
Fork the repository
Create a feature branch
Add tests for your changes
Ensure all tests pass
Submit a pull request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
Built with Playwright for reliable browser automation
Implements the Model Context Protocol specification
Inspired by the need for robust browser automation in AI workflows
📈 Roadmap
Support for multiple browser engines (Firefox, Safari)
Advanced element selection strategies
Built-in visual regression testing
Performance monitoring and metrics
Browser extension interaction
Mobile browser simulation
⭐ Star this repository if you find it useful!
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
- Alicense-qualityDmaintenanceA Model Context Protocol server that provides browser automation capabilities using Playwright, enabling LLMs to interact with web pages, take screenshots, and execute JavaScript in a real browser environment.Last updated18Apache 2.0
- FlicenseBqualityCmaintenanceA Model Context Protocol server that enables AI assistants to interact with web browsers through Playwright, providing automation capabilities for navigation, interaction, and screenshots.Last updated143
- FlicenseAqualityCmaintenanceA Model Context Protocol server that provides browser automation capabilities using Playwright, enabling AI assistants to interact with web pages through a standardized interface.Last updated143
- FlicenseAqualityDmaintenanceA Model Context Protocol server that enables AI assistants to perform web automation tasks by connecting to remote Playwright/browserless instances, supporting navigation, screenshots, HTML extraction, and element interaction.Last updated104
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
AI-powered browser automation — navigate, click, fill forms, and extract data from any website.
A Model Context Protocol server for Wix AI tools
Appeared in Searches
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/nolecram/Build_MCP_Server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server