mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
Signed-off-by: Pavel Feldman <pavel.feldman@gmail.com> Co-authored-by: Yury Semikhatsky <yurys@chromium.org>
1.1 KiB
1.1 KiB
Playwright MCP
This package is experimental and not yet ready for production use. It is a subject to change and will not respect semver versioning.
Example config
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": [
"@playwright/mcp",
"--headless"
]
}
}
}
Running headed browser (Browser with GUI).
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": [
"@playwright/mcp"
]
}
}
}
Running headed browser on Linux
When running headed browser on system w/o display or from worker processes of the IDEs, you can run Playwright in a client-server manner. You'll run the Playwright server from environment with the DISPLAY
npx playwright run-server
And then in MCP config, add following to the env:
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": [
"@playwright/mcp"
],
"env": {
// Use the endpoint from the output of the server above.
"PLAYWRIGHT_WS_ENDPOINT": "ws://localhost:<port>/"
}
}
}
}