Loading...
npx @playwright/mcp@latest --config path/to/config.json{
"mcpServers": {
"playwright": {
"type": "stdio",
"command": "npx",
"timeout": 30,
"args": [
"-y",
"@playwright/mcp@latest"
],
"disabled": false
}
}
}navigateNavigates the browser to a specified URL.
Navigating to untrusted URLs can expose the agent to malicious content.
clickClicks on a specified element on the web page.
Clicking on the wrong element can trigger unintended actions.
fillFills a specified input field with a given value.
Filling input fields with incorrect data can lead to errors or security vulnerabilities.
textContentRetrieves the text content of a specified element.
Read-only operation, no side effects.
accessibilitySnapshotRetrieves the accessibility tree of the current web page.
Read-only operation, no side effects.
Playwright MCP is relatively safe when used with carefully defined allowed origins and restricted file access. Risks increase if unrestricted access is granted, potentially leading to unintended actions on web pages or unauthorized file access. Ensure proper configuration to mitigate these risks.