mcp-playwright
mcp-playwright copied to clipboard
Add policy enforcement for browser automation and HTTP request tools
This server exposes ~34 tools including full browser automation and arbitrary HTTP request capabilities:
playwright_evaluate-- executes arbitrary JavaScript on any pageplaywright_fill-- submits form data to any websiteplaywright_post,playwright_put,playwright_patch,playwright_delete-- arbitrary HTTP requests to any endpointplaywright_upload_file-- uploads local filesplaywright_click-- triggers UI actions
The HTTP request tools (post/put/patch/delete) mean an agent can make API calls to any endpoint, not just browser interactions. Combined with playwright_evaluate, this is effectively unrestricted access to the web.
Suggestion: Consider documenting support for PolicyLayer/Intercept, an open-source MCP proxy that enforces policies on tool calls before execution.
Example policy:
version: "1"
default: allow
tools:
playwright_evaluate:
rules:
- action: require_approval
playwright_delete:
rules:
- action: deny
playwright_post:
rules:
- rate_limit: 10/minute
playwright_fill:
rules:
- rate_limit: 5/minute
hide:
- playwright_delete
One line to set up: npx -y @policylayer/intercept init