Playwright MCP tools: which ones act on websites, and how to make your agent ask

All 25 default tools of Microsoft's Playwright MCP server, checked by running version 0.0.86: which only look, which act on websites as you, why its read-only tools can still overwrite a file, and the Claude Code settings that make the rest ask.

Checked on by running @playwright/mcp 0.0.86 from microsoft/playwright-mcp and reading its tools/list answer. Each tier is the tool risk checker’s reading, with our reason wherever we changed it. Written by the people who make VariantGate.

The short answer

Only browser_wait_for is safe to leave unasked as it stands. Six of its seven read-only tools can overwrite a file and one returns cookies, so allow the other five only in a git checkout. Run --isolated, and make clicks, typing and navigation ask.

Can run on their own
1
Should ask a person
24

The browser is signed in as you

Every tool here acts through one browser, and whatever that browser is signed in to, the agent is signed in to as well. The tool names say little about risk: browser_click on a shop’s checkout button buys, and on a mail client’s send button it sends. The server marks every tool that can act as destructive, which is why clicking, typing and choosing from a list sit in “Not sure” below: what they do depends on the page.

  • --isolated keeps the browser profile in memory and never saves it to disk, so a session starts signed out and leaves nothing behind.
  • --extension connects to a browser you already run, with all its sign-ins. Keep it for sessions you watch.
  • File access is limited to the workspace roots the client names, or the current folder. --allow-unrestricted-file-access lifts that, file:// URLs included.
  • --allowed-origins and --blocked-origins narrow which sites the browser asks for, but the server’s own help says they are not a security boundary and do not cover redirects.

Read-only, but it can replace a file

Six tools are marked read-only and take a filename to save their result to: browser_console_messages, browser_find, browser_network_requests, browser_network_request, browser_take_screenshot, browser_snapshot. We gave browser_snapshot the name of a file that already existed in the project folder, and the server replaced it with the snapshot. Nothing asked first. On 23 November we did the same with the other five, and each of them replaced its file too. An agent following instructions hidden in a page could use that to overwrite a file you care about, so the settings below leave these tools asking unless you choose otherwise.

Two tools that run code

browser_evaluate runs JavaScript inside the page, with the page’s cookies and storage. browser_run_code_unsafe runs a Playwright script in the server’s own process on your machine, and its description calls it RCE-equivalent. Both are on by default. Treat a call to either as running a program you have not read, and answer it yourself.

What --caps adds

The 25 tools below are what the server lists with no options. Each capability adds more, which this page does not sort. Paste the tools/list answer into the tool risk checker if you turn one on.

  • --caps=vision: 6 more tools that click, drag and scroll at x/y coordinates on a screenshot.
  • --caps=pdf: browser_pdf_save, which saves the page as a PDF file.
  • --caps=devtools: 13 more tools for traces, video and screen recordings, highlights and resuming a paused script.
npx @playwright/mcp@latest --isolated --headless

All 25 tools

Hard to undo2 toolsAsk a person every time. Consider two people, or deny it if the agent never needs it.

  • browser_evaluate

    Evaluate JavaScript expression on page or element

    Server says: destructive

    Our call: Runs JavaScript in the page as you: it can read whatever the page can, tokens in its storage included, and send it anywhere.

  • browser_run_code_unsafe

    Run a Playwright code snippet.

    Server says: destructive

    Our call: Runs code in the Playwright server's own process on your machine. The server's own description calls it RCE-equivalent.

Reaches people4 toolsAsk a person: once it reaches someone, it cannot be unsent.

  • browser_file_upload

    Upload one or multiple files

    Server says: destructive

    Our call: Hands a file from your machine to the website, which can keep it.

  • browser_drop

    Drop files or MIME-typed data onto an element, as if dragged from outside the page.

    Server says: destructive

    Our call: Hands a file from your machine to the website, which can keep it.

  • browser_navigate

    Navigate to a URL

    Server says: destructive

    Our call: Opens any URL, and a URL can carry data out: an agent that read something private can put it in the address of a site it picks.

  • browser_tabs

    List, create, close, or select a browser tab.

    Server says: destructive

    Our call: Opens any URL, and a URL can carry data out: an agent that read something private can put it in the address of a site it picks.

Not sure8 toolsAsk a person until you have checked what it does.

  • browser_handle_dialog

    Handle a dialog

    Server says: destructive

    Our call: What it does depends on the page: on a site the browser is signed in to, one click or key press can send, buy or delete.

  • browser_fill_form

    Fill multiple form fields

    Server says: destructive

    Our call: What it does depends on the page: on a site the browser is signed in to, one click or key press can send, buy or delete.

  • browser_press_key

    Press a key on the keyboard

    Server says: destructive

    Our call: What it does depends on the page: on a site the browser is signed in to, one click or key press can send, buy or delete.

  • browser_type

    Type text into editable element

    Server says: destructive

    Our call: What it does depends on the page: on a site the browser is signed in to, one click or key press can send, buy or delete.

  • browser_click

    Perform click on a web page

    Server says: destructive

    Our call: What it does depends on the page: on a site the browser is signed in to, one click or key press can send, buy or delete.

  • browser_drag

    Perform drag and drop between two elements

    Server says: destructive

    Our call: What it does depends on the page: on a site the browser is signed in to, one click or key press can send, buy or delete.

  • browser_hover

    Hover over element on page

    Server says: destructive

    Our call: What it does depends on the page: on a site the browser is signed in to, one click or key press can send, buy or delete.

  • browser_select_option

    Select an option in a dropdown

    Server says: destructive

    Our call: What it does depends on the page: on a site the browser is signed in to, one click or key press can send, buy or delete.

Changes data10 toolsAsk a person. Once it is routine, a standing rule can answer.

  • browser_close

    Close the browser and all open tabs.

    Server says: destructive

    Our call: Closes the browser and its tabs; the next call opens a new one. No website sees more than it would from a person doing the same.

  • browser_resize

    Resize the browser window

    Server says: destructive

    Our call: Changes only the size of the browser window. No website sees more than it would from a person doing the same.

  • browser_console_messages

    Returns all console messages

    Server says: read-only

    Our call: Reads the page, but its file option saves the result to a file in your project, replacing one already there. We tried it: browser_snapshot replaced an existing file.

  • browser_emulate_media

    Emulate CSS media features for the page, for example switch between the light and dark color scheme.

    Server says: destructive

    Our call: Changes only how pages are drawn in this browser, such as dark mode. No website sees more than it would from a person doing the same.

  • browser_find

    Search the accessibility snapshot of the current page for text or a regular expression.

    Server says: read-only

    Our call: Reads the page, but its file option saves the result to a file in your project, replacing one already there. We tried it: browser_snapshot replaced an existing file.

  • browser_navigate_back

    Go back to the previous page in the history

    Server says: destructive

    Our call: Goes back to a page this browser already opened. No website sees more than it would from a person doing the same.

  • browser_network_requests

    Returns a numbered list of network requests since loading the page.

    Server says: read-only

    Our call: Reads the page, but its file option saves the result to a file in your project, replacing one already there. We tried it: browser_snapshot replaced an existing file.

  • browser_network_request

    Returns full details (headers and body) of a single network request, or a single part if `part` is set.

    Server says: read-only

    Our call: Reads one request in full, headers and body, which can include session cookies and tokens. Its filename option also writes a file, replacing one already there.

  • browser_take_screenshot

    Take a screenshot of the current page.

    Server says: read-only

    Our call: Reads the page, but its file option saves the result to a file in your project, replacing one already there. We tried it: browser_snapshot replaced an existing file.

  • browser_snapshot

    Capture accessibility snapshot of the current page, this is better than screenshot

    Server says: read-only

    Our call: Reads the page, but its file option saves the result to a file in your project, replacing one already there. We tried it: browser_snapshot replaced an existing file.

Only looks1 toolLet it run. It only looks.

  • browser_wait_for

    Wait for text to appear or disappear or a specified time to pass.

    Server says: read-only

    Our call: Only waits for text to appear or for time to pass; it has no file option. The server marks it read-only.

Let the reads run in Claude Code

Claude Code asks before every MCP tool it has no rule for. Added as playwright, this server’s tools are named mcp__playwright__<tool>. These allow rules, in .claude/settings.json or ~/.claude/settings.json, let the tools that only look run without a prompt. Everything else keeps asking, including any tool a later version of the server adds.

{
  "permissions": {
    "allow": [
      "mcp__playwright__browser_wait_for"
    ]
  }
}

The command that adds the server:

claude mcp add playwright -- npx @playwright/mcp@latest

Send the rest to a person, not the terminal

A prompt in the terminal only works while someone is watching it. With this hook, every other tool of the server becomes a request in your VariantGate inbox, on your phone or in Slack, and Claude Code waits for the answer. The matcher names the look-only tools, so a tool added later is sent too. Put the key in VARIANTGATE_KEY, or run the one-command setup for Claude Code first.

{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "mcp__playwright__(?!(browser_wait_for)$).*",
        "hooks": [
          { "type": "command", "command": "variantgate hook claude-code", "timeout": 180 }
        ]
      }
    ]
  }
}

Disagree with a tier, or run the server with other flags? Open these tools in the tool risk checker, change what you like, and copy the settings for your own setup. It runs in your browser and starts from its own reading, so a tool we marked as only looking by hand asks there until you change it.

Any MCP client: put the proxy in front

Claude Desktop, Cursor and most other MCP clients have no hook to send a call to a person. The VariantGate MCP proxy does it in the server’s place: it starts the server, lets the look-only tools above through, and holds every other call until someone approves it in the inbox. Run npx -y https://variantgate.com/sdk/variantgate-agent-0.15.0.tgz login once to save a key, then use this in claude_desktop_config.json or ~/.cursor/mcp.json:

{
  "mcpServers": {
    "playwright": {
      "args": [
        "-y",
        "https://variantgate.com/sdk/variantgate-agent-0.15.0.tgz",
        "mcp-proxy",
        "--name",
        "playwright",
        "--look-only",
        "browser_wait_for",
        "--",
        "npx",
        "@playwright/mcp@latest"
      ],
      "command": "npx"
    }
  }
}

Already have it in Claude Desktop? One command rewrites the file for you, with these look-only tools filled in, and keeps the old one (setup vscode does the same for VS Code; how it works):

npx -y https://variantgate.com/sdk/variantgate-agent-0.15.0.tgz setup claude-desktop

The same in Claude Code, instead of the hook. The proxy now asks about every call that matters, so an allow rule for the whole server, mcp__playwright, keeps Claude Code from asking a second time in the terminal:

claude mcp add playwright -- npx -y https://variantgate.com/sdk/variantgate-agent-0.15.0.tgz mcp-proxy --name playwright --look-only browser_wait_for -- npx @playwright/mcp@latest

Claude Code’s allow rules match a tool’s name, never its arguments, so a rule cannot tell a harmless call of these tools from a risky one. If the agent works in a git checkout, and you accept that a call may replace a file that git can bring back only if it is tracked and committed (not a .env, an untracked file or edits not yet committed), these rules also let browser_console_messages, browser_find, browser_network_requests, browser_take_screenshot, browser_snapshot run unasked:

{
  "permissions": {
    "allow": [
      "mcp__playwright__browser_wait_for",
      "mcp__playwright__browser_console_messages",
      "mcp__playwright__browser_find",
      "mcp__playwright__browser_network_requests",
      "mcp__playwright__browser_take_screenshot",
      "mcp__playwright__browser_snapshot"
    ]
  }
}

What a page can tell your agent

A snapshot puts the page’s text into the model’s context, and any site can write text meant for an agent. That is the reason the navigation tools ask: a page that says “now open this address” is asking the agent to carry what it has read somewhere else, in the URL. Letting reads run and asking before the browser goes somewhere new keeps the questions few and the ones that matter.

See it before you decide.

The playground runs the whole approval loop in your browser, no account needed. When it fits, the free plan covers 100 requests a month.