MCP Playwright Server is an MCP server that provides browser automation capabilities using the Playwright framework. It connects Model Context Protocol clients like Claude Desktop directly to headless or headed browser engines including Chromium, Firefox, and WebKit. Built for QA engineers, software developers, and automated workflow designers, it enables AI assistants to execute structured web operations through standard model function calls. Users can launch dedicated browser instances, open new tabs or pages, navigate to target URLs, interact with web elements via clicks and text input, and extract plain text from document nodes. The server also supports taking visual screenshots for interface verification, waiting for dynamic DOM selectors, and managing browser lifecycle events like closing pages or instances. Running locally or inside a preconfigured Docker container, it allows external AI agents to perform automated regression testing, verify web application state, and gather data from complex single-page applications without manual intervention.
Category: Browser & Web Automation
Tags: automation, headless browser, playwright, testing, web scraping
bash npm install -g mcp-playwright Alternatively, clone the repository, run npm install, and execute npm run install:browsers to set up Playwright binaries. 2. Open your Claude Desktop configuration file (such as ~/Library/Application Support/Claude/claude_desktop_config.json on macOS). 3. Register the server under mcpServers using Node.js: json { "mcpServers": { "playwright": { "command": "node", "args": ["/path/to/your/mcpplaywright/src/index.js"], "env": { "PLAYWRIGHT_HEADLESS": "true" } } } } Or configure it to run via Docker using "command": "docker" with "args": ["run", "--rm", "-i", "mcp-playwright"]. 4. Restart Claude Desktop to activate the Playwright tools.Part of MCP Servers
You can install it globally via npm using the command npm install -g mcp-playwright and start it with mcp-playwright start. Alternatively, you can clone the repository, install dependencies with npm install, fetch browser dependencies via npm run install:browsers, or build and run the provided Docker image using npm run docker:build and npm run docker:run.
MCP Playwright Server provides tools to control Chromium, Firefox, and WebKit browsers. It allows AI clients to launch browsers, create new pages, navigate to URLs, click elements, type text into inputs, retrieve rendered text, capture screenshots, wait for DOM selectors, and terminate browser processes.
The server works with Claude Desktop and any client supporting the Model Context Protocol. Configuration can be completed by updating the MCP settings file to run the server script directly via Node or through an interactive Docker container.
Yes, MCP Playwright Server is open source and distributed under the MIT license. You can review the source code, contribute enhancements, and inspect implementation details directly on its GitHub repository.
Yes, you can control browser visibility by setting the PLAYWRIGHT_HEADLESS environment variable to false in your MCP configuration. You can also configure the PLAYWRIGHT_SLOWMO environment variable to add a delay in milliseconds between automated actions.