mcp-playwright icon indicating copy to clipboard operation
mcp-playwright copied to clipboard

Add policy enforcement for browser automation and HTTP request tools

Open L1AD opened this issue 7 months ago • 0 comments

This server exposes ~34 tools including full browser automation and arbitrary HTTP request capabilities:

  • playwright_evaluate -- executes arbitrary JavaScript on any page
  • playwright_fill -- submits form data to any website
  • playwright_post, playwright_put, playwright_patch, playwright_delete -- arbitrary HTTP requests to any endpoint
  • playwright_upload_file -- uploads local files
  • playwright_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

L1AD avatar Apr 12 '26 22:04 L1AD