Home / MCP / Playwright MCP Server
Provides browser automation via Playwright for page navigation, screenshots, and JavaScript in a real browser context.
Configuration
View docs{
"mcpServers": {
"playwright": {
"command": "npx",
"args": [
"-y",
"@automatalabs/mcp-server-playwright"
]
}
}
}MCP Server Playwright enables automated browser interactions through Playwright, letting you control a real browser from your MCP client. You can navigate pages, capture screenshots, fill forms, click elements, and run JavaScript in the browser context, all driven by your AI workflows or automation scripts.
You connect to the Playwright MCP server from your MCP client and call the available browser actions as tools. Use these capabilities to automate web tasks in a real browser environment, capture results like screenshots, and inspect console output to debug scripts.
Prerequisites you need installed before starting are Node.js and npm (or npx). Ensure npx is available in your system PATH.
Option 1: Install via Smithery for Claude Desktop. Run the following command to install the MCP Server Playwright package for Claude:
npx -y @smithery/cli install @automatalabs/mcp-server-playwright --client claudeOption 2: Install directly with npx. This will set up the server and create or update the Claude configuration file automatically.
npx @automatalabs/mcp-server-playwright install
```
This command also configures the server integration and creates the configuration at the following path:
- Windows: %APPDATA%\Claude\claude_desktop_config.json
- macOS: ~/Library/Application Support/Claude/claude_desktop_config.jsonOption 3: Install via MCP Get (mcp-get). Use this to install the MCP Server Playwright package:
npx @michaellatman/mcp-get@latest install @automatalabs/mcp-server-playwrightConfiguration file update happens automatically when using these installation methods. The following MCP server entry is created to enable the Playwright server.
After installation, the MCP configuration includes a server entry named playground (or playwright) with the following runtime configuration.
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": ["-y", "@automatalabs/mcp-server-playwright"]
}
}
}Navigate to a URL in the browser and load the target page.
Capture a screenshot of the full page or a specific element by selector.
Click an element on the page using a CSS selector.
Click an element by its visible text content.
Hover the cursor over an element identified by a CSS selector.
Hover over an element by its visible text content.
Fill an input field identified by a selector with a value.
Select an option in a SELECT element by CSS selector.
Select an option in a SELECT element by its visible text.
Execute JavaScript in the browser context and return the result.