Home · Skills · Development · Agent

Playwright MCP

Microsoft's browser automation server: your AI opens pages, clicks, fills forms and reads the page through the accessibility tree.

How to install

How to install

  1. Runs on your computer — needs Node. Works in Claude Code, Claude Desktop and Cursor.
  2. Run the Claude Code line, or paste the JSON into your app's MCP config.
  3. Restart the app, then ask something that needs the tool.
Claude Code
claude mcp add playwright -- npx @playwright/mcp@latest
Claude Desktop (claude_desktop_config.json) · Cursor (~/.cursor/mcp.json)
{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": [
        "@playwright/mcp@latest"
      ]
    }
  }
}

Opens its own browser window. Needs Node 18+.

This one runs on your machine and can reach your files. Read the README below before you connect it.

Not working?
  • Check which app you pasted it into — the steps above name the right one.
  • Some skills need the paid tier of Claude or ChatGPT.
Step-by-step guide with screenshots · Ask in the forum

Paste into Claude, ChatGPT or Cursor.

Show the full text1662 lines
playwright/README.md1662 lines65.1 KBpushed 3d agoRawView on GitHub

Playwright MCP

A Model Context Protocol (MCP) server that provides browser automation capabilities using Playwright. This server enables LLMs to interact with web pages through structured accessibility snapshots, bypassing the need for screenshots or visually-tuned models.

Playwright MCP vs Playwright CLI

This package provides MCP interface into Playwright. If you are using a coding agent, you might benefit from using the CLI+SKILLS instead.

  • CLI: Modern coding agents increasingly favor CLI–based workflows exposed as SKILLs over MCP because CLI invocations are more token-efficient: they avoid loading large tool schemas and verbose accessibility trees into the model context, allowing agents to act through concise, purpose-built commands. This makes CLI + SKILLs better suited for high-throughput coding agents that must balance browser automation with large codebases, tests, and reasoning within limited context windows.Learn more about Playwright CLI with SKILLS.

  • MCP: MCP remains relevant for specialized agentic loops that benefit from persistent state, rich introspection, and iterative reasoning over page structure, such as exploratory automation, self-healing tests, or long-running autonomous workflows where maintaining continuous browser context outweighs token cost concerns.

Key Features

  • Fast and lightweight. Uses Playwright's accessibility tree, not pixel-based input.
  • LLM-friendly. No vision models needed, operates purely on structured data.
  • Deterministic tool application. Avoids ambiguity common with screenshot-based approaches.

Requirements

  • Node.js 18 or newer
  • VS Code, Cursor, Windsurf, Claude Desktop, Goose, Grok, Junie or any other MCP client
<!-- // Generate using: node utils/generate-links.js -->

Getting started

First, install the Playwright MCP server with your client.

Standard config works in most of the tools:

{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": [
        "@playwright/mcp@latest"
      ]
    }
  }
}

Amp

Add via the Amp VS Code extension settings screen or by updating your settings.json file:

"amp.mcpServers": {
  "playwright": {
    "command": "npx",
    "args": [
      "@playwright/mcp@latest"
    ]
  }
}

Amp CLI Setup:

Add via the amp mcp add command below

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

Antigravity

Add via the Antigravity settings or by updating your configuration file:

{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": [
        "@playwright/mcp@latest"
      ]
    }
  }
}

Claude Code

Use the Claude Code CLI to add the Playwright MCP server:

claude mcp add playwright npx @playwright/mcp@latest

Claude Desktop

Follow the MCP install guide, use the standard config above.

Cline

Follow the instruction in the section Configuring MCP Servers

Example: Local Setup

Add the following to your cline_mcp_settings.json file:

{
  "mcpServers": {
    "playwright": {
      "type": "stdio",
      "command": "npx",
      "timeout": 30,
      "args": [
        "-y",
        "@playwright/mcp@latest"
      ],
      "disabled": false
    }
  }
}

Codex

Use the Codex CLI to add the Playwright MCP server:

codex mcp add playwright npx "@playwright/mcp@latest"

Alternatively, create or edit the configuration file ~/.codex/config.toml and add:

[mcp_servers.playwright]
command = "npx"
args = ["@playwright/mcp@latest"]

For more information, see the Codex MCP documentation.

Copilot

Use the Copilot CLI to interactively add the Playwright MCP server:

/mcp add

Alternatively, create or edit the configuration file ~/.copilot/mcp-config.json and add:

{
  "mcpServers": {
    "playwright": {
      "type": "local",
      "command": "npx",
      "tools": [
        "*"
      ],
      "args": [
        "@playwright/mcp@latest"
      ]
    }
  }
}

For more information, see the Copilot CLI documentation.

Cursor

Click the button to install:

Or install manually:

Go to Cursor Settings -> MCP -> Add new MCP Server. Name to your liking, use command type with the command npx @playwright/mcp@latest. You can also verify config or add command like arguments via clicking Edit.

Factory

Use the Factory CLI to add the Playwright MCP server:

droid mcp add playwright "npx @playwright/mcp@latest"

Alternatively, type /mcp within Factory droid to open an interactive UI for managing MCP servers.

For more information, see the Factory MCP documentation.

Gemini CLI

Follow the MCP install guide, use the standard config above.

Goose

Click the button to install:

Install in Goose

Or install manually:

Go to Advanced settings -> Extensions -> Add custom extension. Name to your liking, use type STDIO, and set the command to npx @playwright/mcp. Click "Add Extension".

Grok

Use the Grok CLI to add the Playwright MCP server:

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

Alternatively, create or edit the configuration file ~/.grok/config.toml and add:

[mcp_servers.playwright]
command = "npx"
args = ["@playwright/mcp@latest"]

For more information, see the Grok MCP documentation.

Junie

To add the Playwright MCP server in Junie CLI:

  1. Type /mcp
  2. Press Ctrl+A to add a new MCP server
  3. Select Playwright from the list

Alternatively, add to .junie/mcp/mcp.json:

{
  "mcpServers": {
    "Playwright": {
      "command": "npx",
      "args": [
        "-y",
        "@playwright/mcp@latest"
      ]
    }
  }
}

For more information, see the Junie MCP configuration documentation.

Kiro

Add to Kiro

Follow the MCP Servers documentation. For example in .kiro/settings/mcp.json:

{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": [
        "@playwright/mcp@latest"
      ]
    }
  }
}

LM Studio

Click the button to install:

Add MCP Server playwright to LM Studio

Or install manually:

Go to Program in the right sidebar -> Install -> Edit mcp.json. Use the standard config above.

opencode

Follow the MCP Servers documentation. For example in ~/.config/opencode/opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "playwright": {
      "type": "local",
      "command": [
        "npx",
        "@playwright/mcp@latest"
      ],
      "enabled": true
    }
  }
}

Qodo Gen

Open Qodo Gen chat panel in VSCode or IntelliJ → Connect more tools → + Add new MCP → Paste the standard config above.

Click <code>Save</code>.

VS Code

Click the button to install:

Or install manually:

Follow the MCP install guide, use the standard config above. You can also install the Playwright MCP server using the VS Code CLI:

# For VS Code
code --add-mcp '{"name":"playwright","command":"npx","args":["@playwright/mcp@latest"]}'

After installation, the Playwright MCP server will be available for use with your GitHub Copilot agent in VS Code.

Warp

Go to Settings -> AI -> Manage MCP Servers -> + Add to add an MCP Server. Use the standard config above.

Alternatively, use the slash command /add-mcp in the Warp prompt and paste the standard config from above:

{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": [
        "@playwright/mcp@latest"
      ]
    }
  }
}

Windsurf

Follow Windsurf MCP documentation. Use the standard config above.

Configuration

Playwright MCP server supports following arguments. They can be provided in the JSON configuration above, as a part of the "args" list:

<!--- Options generated by update-readme.js -->
Option Description
--allowed-hosts <hosts...> comma-separated list of hosts this server is allowed to serve from. Defaults to the host the server is bound to. Pass '*' to disable the host check.env PLAYWRIGHT_MCP_ALLOWED_HOSTS
--allowed-origins <origins> semicolon-separated list of TRUSTED origins to allow the browser to request. Default is to allow all. Important: does not serve as a security boundary and does not affect redirects.env PLAYWRIGHT_MCP_ALLOWED_ORIGINS
--allow-unrestricted-file-access allow access to files outside of the workspace roots. Also allows unrestricted access to file:// URLs. By default access to file system is restricted to workspace root directories (or cwd if no roots are configured) only, and navigation to file:// URLs is blocked.env PLAYWRIGHT_MCP_ALLOW_UNRESTRICTED_FILE_ACCESS
--blocked-origins <origins> semicolon-separated list of origins to block the browser from requesting. Blocklist is evaluated before allowlist. If used without the allowlist, requests not matching the blocklist are still allowed. Important: does not serve as a security boundary and does not affect redirects.env PLAYWRIGHT_MCP_BLOCKED_ORIGINS
--block-service-workers block service workersenv PLAYWRIGHT_MCP_BLOCK_SERVICE_WORKERS
--browser <browser> browser or chrome channel to use, possible values: chrome, firefox, webkit, msedge.env PLAYWRIGHT_MCP_BROWSER
--caps <caps> comma-separated list of additional capabilities to enable, possible values: vision, pdf, devtools.env PLAYWRIGHT_MCP_CAPS
--cdp-endpoint <endpoint> CDP endpoint to connect to.env PLAYWRIGHT_MCP_CDP_ENDPOINT
--cdp-header <headers...> CDP headers to send with the connect request, multiple can be specified.env PLAYWRIGHT_MCP_CDP_HEADERS
--cdp-timeout <timeout> timeout in milliseconds for connecting to CDP endpoint, defaults to 30000msenv PLAYWRIGHT_MCP_CDP_TIMEOUT
--codegen <lang> specify the language to use for code generation, possible values: "typescript", "python", "java", "csharp", "none". Default is "typescript".env PLAYWRIGHT_MCP_CODEGEN
--config <path> path to the configuration file.env PLAYWRIGHT_MCP_CONFIG
--console-level <level> level of console messages to return: "error", "warning", "info", "debug". Each level includes the messages of more severe levels.env PLAYWRIGHT_MCP_CONSOLE_LEVEL
--device <device> device to emulate, for example: "iPhone 15"env PLAYWRIGHT_MCP_DEVICE
--mobile emulate a generic mobile device (Pixel 10 for Chromium, iPhone 17 for WebKit). Mobile pages are usually lighter, which saves tokens. Cannot be combined with --device.env PLAYWRIGHT_MCP_MOBILE
--executable-path <path> path to the browser executable.env PLAYWRIGHT_MCP_EXECUTABLE_PATH
--extension Connect to a running browser instance (Edge/Chrome only). Requires the "Playwright Extension" to be installed.env PLAYWRIGHT_MCP_EXTENSION
--endpoint <endpoint> Bound browser endpoint to connect to.env PLAYWRIGHT_MCP_ENDPOINT
--file-paths <mode> how file paths are rendered in tool results, "relative" to the workspace root or "absolute". Default is "relative".env PLAYWRIGHT_MCP_FILE_PATHS
--grant-permissions <permissions...> List of permissions to grant to the browser context, for example "geolocation", "clipboard-read", "clipboard-write".env PLAYWRIGHT_MCP_GRANT_PERMISSIONS
--headless run browser in headless mode, headed by defaultenv PLAYWRIGHT_MCP_HEADLESS
--host <host> host to bind server to. Default is localhost. Use 0.0.0.0 to bind to all interfaces.env PLAYWRIGHT_MCP_HOST
--idle-timeout <timeout> close the browser after this many milliseconds without a completed tool call, the next tool call relaunches it. Defaults to one hour for headless browsers, never for headed ones, 0 disables.env PLAYWRIGHT_MCP_IDLE_TIMEOUT
--ignore-https-errors ignore https errorsenv PLAYWRIGHT_MCP_IGNORE_HTTPS_ERRORS
--init-page <path...> path to TypeScript file to evaluate on Playwright page objectenv PLAYWRIGHT_MCP_INIT_PAGE
--init-script <path...> path to JavaScript file to add as an initialization script. The script will be evaluated in every page before any of the page's scripts. Can be specified multiple times.env PLAYWRIGHT_MCP_INIT_SCRIPT
--isolated keep the browser profile in memory, do not save it to disk.env PLAYWRIGHT_MCP_ISOLATED
--image-responses <mode> whether to send image responses to the client. Can be "allow", "omit" or "only". With "only", a response that carries an image consists of the image parts alone, without the text part. Defaults to "allow".env PLAYWRIGHT_MCP_IMAGE_RESPONSES
--no-sandbox disable the sandbox for all process types that are normally sandboxed.env PLAYWRIGHT_MCP_NO_SANDBOX
--no-webmcp do not collect or expose the tools that a page registers through the WebMCP API.env PLAYWRIGHT_MCP_WEBMCP=false
--output-dir <path> path to the directory for automatically named output files, for example a screenshot taken without an explicit file name. Files with an explicit name are resolved against the workspace root instead and are not affected by this option.env PLAYWRIGHT_MCP_OUTPUT_DIR
--output-max-size <bytes> Threshold for evicting old output files, in bytes.env PLAYWRIGHT_MCP_OUTPUT_MAX_SIZE
--port <port> port to listen on for SSE transport.env PLAYWRIGHT_MCP_PORT
--profile-dir-name <name> name of the profile directory in the user data dir to connect to with --extension, for example "Profile 1". Defaults to the last used profile that has the extension installed.env PLAYWRIGHT_MCP_PROFILE_DIR_NAME
--proxy-bypass <bypass> comma-separated domains to bypass proxy, for example ".com,chromium.org,.domain.com"env PLAYWRIGHT_MCP_PROXY_BYPASS
--proxy-server <proxy> specify proxy server, for example "http://myproxy:3128" or "socks5://myproxy:8080"env PLAYWRIGHT_MCP_PROXY_SERVER
--sandbox enable the sandbox for all process types that are normally not sandboxed.env PLAYWRIGHT_MCP_SANDBOX
--save-session Whether to save the Playwright MCP session into the output directory.env PLAYWRIGHT_MCP_SAVE_SESSION
--secrets <path> path to a file containing secrets in the dotenv formatenv PLAYWRIGHT_MCP_SECRETS_FILE
--shared-browser-context reuse the same browser context between all connected HTTP clients.env PLAYWRIGHT_MCP_SHARED_BROWSER_CONTEXT
--snapshot-boxes include each element's bounding box as [box=x,y,width,height] in snapshots. Coordinates are viewport-relative, in CSS pixels.env PLAYWRIGHT_MCP_SNAPSHOT_BOXES
--snapshot-mode <mode> when taking snapshots for responses, specifies the mode to use. Can be "full" or "none". Default is "full".env PLAYWRIGHT_MCP_SNAPSHOT_MODE
--storage-state <path> path to the storage state file for isolated sessions.env PLAYWRIGHT_MCP_STORAGE_STATE
--test-id-attribute <attribute> specify the attribute to use for test ids, defaults to "data-testid"env PLAYWRIGHT_MCP_TEST_ID_ATTRIBUTE
--timeout-action <timeout> specify action timeout in milliseconds, defaults to 5000msenv PLAYWRIGHT_MCP_TIMEOUT_ACTION
--timeout-navigation <timeout> specify navigation timeout in milliseconds, defaults to 60000msenv PLAYWRIGHT_MCP_TIMEOUT_NAVIGATION
--timeout-settle <timeout> how long to wait after each action for triggered work to settle, in milliseconds, defaults to 500msenv PLAYWRIGHT_MCP_TIMEOUT_SETTLE
--user-agent <ua string> specify user agent stringenv PLAYWRIGHT_MCP_USER_AGENT
--user-data-dir <path> path to the user data directory. If not specified, a temporary directory will be created.env PLAYWRIGHT_MCP_USER_DATA_DIR
--viewport-size <size> specify browser viewport size in pixels, for example "1280x720"env PLAYWRIGHT_MCP_VIEWPORT_SIZE
<!--- End of options generated section -->

User profile

You can run Playwright MCP with persistent profile like a regular browser (default), in isolated contexts for testing sessions, or connect to your existing browser using the browser extension.

Persistent profile

All the logged in information will be stored in the persistent profile, you can delete it between sessions if you'd like to clear the offline state. Persistent profile is located at the following locations and you can override it with the --user-data-dir argument.

# Windows
%USERPROFILE%\AppData\Local\ms-playwright\mcp-{channel}-{workspace-hash}

# macOS
- ~/Library/Caches/ms-playwright/mcp-{channel}-{workspace-hash}

# Linux
- ~/.cache/ms-playwright/mcp-{channel}-{workspace-hash}

{workspace-hash} is derived from the MCP client's workspace root, so different projects get separate profiles automatically.

[!IMPORTANT] A persistent profile can only be used by one browser instance at a time, so concurrent MCP clients sharing the same workspace will conflict. To run several clients in parallel, start each additional client with --isolated or point it at a distinct --user-data-dir.

Isolated

In the isolated mode, each session is started in the isolated profile. Every time you ask MCP to close the browser, the session is closed and all the storage state for this session is lost. You can provide initial storage state to the browser via the config's contextOptions or via the --storage-state argument. Learn more about the storage state here.

{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": [
        "@playwright/mcp@latest",
        "--isolated",
        "--storage-state={path/to/storage.json}"
      ]
    }
  }
}

Browser Extension

The Playwright MCP Chrome Extension allows you to connect to existing browser tabs and leverage your logged-in sessions and browser state. See microsoft/playwright › packages/extension for installation and setup instructions.

Initial state

There are multiple ways to provide the initial state to the browser context or a page.

For the storage state, you can either:

  • Start with a user data directory using the --user-data-dir argument. This will persist all browser data between the sessions.
  • Start with a storage state file using the --storage-state argument. This will load cookies and local storage from the file into an isolated browser context.

For the page state, you can use:

  • --init-page to point to a TypeScript file that will be evaluated on the Playwright page object. This allows you to run arbitrary code to set up the page.
// init-page.ts
export default async ({ page }) => {
  await page.context().grantPermissions(['geolocation']);
  await page.context().setGeolocation({ latitude: 37.7749, longitude: -122.4194 });
  await page.setViewportSize({ width: 1280, height: 720 });
};
  • --init-script to point to a JavaScript file that will be added as an initialization script. The script will be evaluated in every page before any of the page's scripts. This is useful for overriding browser APIs or setting up the environment.
// init-script.js
window.isPlaywrightMCP = true;

Configuration file

The Playwright MCP server can be configured using a JSON configuration file. You can specify the configuration file using the --config command line option:

npx @playwright/mcp@latest --config path/to/config.json

Configuration file schema

<!--- Config generated by update-readme.js -->
{
  /**
   * The browser to use.
   */
  browser?: {
    /**
     * The type of browser to use.
     */
    browserName?: 'chromium' | 'firefox' | 'webkit';

    /**
     * Keep the browser profile in memory, do not save it to disk.
     */
    isolated?: boolean;

    /**
     * Path to a user data directory for browser profile persistence.
     * Temporary directory is created by default.
     */
    userDataDir?: string;

    /**
     * Launch options passed to
     * @see https://playwright.dev/docs/api/class-browsertype#browser-type-launch-persistent-context
     *
     * This is useful for settings options like `channel`, `headless`, `executablePath`, etc.
     */
    launchOptions?: playwright.LaunchOptions;

    /**
     * Context options for the browser context.
     *
     * This is useful for settings options like `viewport`.
     */
    contextOptions?: playwright.BrowserContextOptions;

    /**
     * Chrome DevTools Protocol endpoint to connect to an existing browser instance in case of Chromium family browsers.
     */
    cdpEndpoint?: string;

    /**
     * CDP headers to send with the connect request.
     */
    cdpHeaders?: Record<string, string>;

    /**
     * Timeout in milliseconds for connecting to CDP endpoint. Defaults to 30000 (30 seconds). Pass 0 to disable timeout.
     */
    cdpTimeout?: number;

    /**
     * Remote endpoint to connect to an existing Playwright server. May be a
     * WebSocket URL string, or a [ConnectOptions] object that mirrors the
     * `connectOptions` shape used by the test runner. When passed as an object,
     * `exposeNetwork`, `headers`, `slowMo`, and `timeout` are forwarded to the
     * underlying connect call.
     */
    remoteEndpoint?: string | playwright.ConnectOptions & { endpoint: string };

    /**
     * Paths to TypeScript files to add as initialization scripts for Playwright page.
     */
    initPage?: string[];

    /**
     * Paths to JavaScript files to add as initialization scripts.
     * The scripts will be evaluated in every page before any of the page's scripts.
     */
    initScript?: string[];
  },

  /**
   * Connect to a running browser instance (Edge/Chrome only). If specified, `browser`
   * config is ignored.
   * Requires the "Playwright Extension" to be installed.
   */
  extension?: boolean;

  server?: {
    /**
     * The port to listen on for SSE or MCP transport.
     */
    port?: number;

    /**
     * The host to bind the server to. Default is localhost. Use 0.0.0.0 to bind to all interfaces.
     */
    host?: string;

    /**
     * The hosts this server is allowed to serve from. Defaults to the host server is bound to.
     * This is not for CORS, but rather for the DNS rebinding protection.
     */
    allowedHosts?: string[];
  },

  /**
   * List of enabled tool capabilities. Possible values:
   *   - 'core': Core browser automation features.
   *   - 'pdf': PDF generation and manipulation.
   *   - 'vision': Coordinate-based interactions.
   *   - 'devtools': Developer tools features.
   */
  capabilities?: ToolCapability[];

  /**
   * Whether to save the Playwright session into the output directory.
   */
  saveSession?: boolean;

  /**
   * Whether to collect and expose the tools that a page registers through the
   * experimental WebMCP API. Enabled by default.
   */
  webmcp?: boolean;

  /**
   * Reuse the same browser context between all connected HTTP clients.
   */
  sharedBrowserContext?: boolean;

  /**
   * Secrets are used to replace matching plain text in the tool responses to prevent the LLM
   * from accidentally getting sensitive data. It is a convenience and not a security feature,
   * make sure to always examine information coming in and from the tool on the client.
   */
  secrets?: Record<string, string>;

  /**
   * The directory for automatically named output files, for example a screenshot taken without an
   * explicit file name. Files with an explicit name are resolved against the workspace root instead
   * and are not affected by this option.
   */
  outputDir?: string;

  /**
   * Threshold for evicting old output files, in bytes.
   */
  outputMaxSize?: number;

  console?: {
    /**
     * The level of console messages to return. Each level includes the messages of more severe levels. Defaults to "info".
     */
    level?: 'error' | 'warning' | 'info' | 'debug';
  },

  network?: {
    /**
     * List of origins to allow the browser to request. Default is to allow all. Origins matching both `allowedOrigins` and `blockedOrigins` will be blocked.
     *
     * Supported formats:
     * - Full origin: `https://example.com:8080` - matches only that origin
     * - Wildcard port: `http://localhost:*` - matches any port on localhost with http protocol
     */
    allowedOrigins?: string[];

    /**
     * List of origins to block the browser to request. Origins matching both `allowedOrigins` and `blockedOrigins` will be blocked.
     *
     * Supported formats:
     * - Full origin: `https://example.com:8080` - matches only that origin
     * - Wildcard port: `http://localhost:*` - matches any port on localhost with http protocol
     */
    blockedOrigins?: string[];
  };

  /**
   * Specify the attribute to use for test ids, defaults to "data-testid".
   */
  testIdAttribute?: string;

  timeouts?: {
    /*
     * Configures default action timeout: https://playwright.dev/docs/api/class-page#page-set-default-timeout. Defaults to 5000ms.
     */
    action?: number;

    /*
     * Configures default navigation timeout: https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout. Defaults to 60000ms.
     */
    navigation?: number;

    /**
     * Configures default expect timeout: https://playwright.dev/docs/test-timeouts#expect-timeout. Defaults to 5000ms.
     */
    expect?: number;

    /**
     * How long to wait after each action for triggered work (navigations, requests) to settle before responding. Defaults to 500ms.
     */
    settle?: number;

    /**
     * Close the browser after this many milliseconds without a tool call, and relaunch it on the next one.
     * Defaults to one hour for headless browsers Playwright launched, and to no timeout for headed or attached ones. Pass 0 to disable.
     * The CLI shuts the whole session down instead of relaunching.
     */
    idle?: number;
  };

  /**
   * Whether to send image responses to the client. Can be "allow", "omit", or "only". Defaults to "allow".
   * With "only", a response that carries an image consists of the image parts alone, without the text part.
   */
  imageResponses?: 'allow' | 'omit' | 'only';

  /**
   * How file paths are rendered in tool results. Can be "relative" to the workspace root or "absolute". Defaults to "relative".
   */
  filePaths?: 'relative' | 'absolute';

  snapshot?: {
    /**
     * When taking snapshots for responses, specifies the mode to use.
     */
    mode?: 'full' | 'none';

    /**
     * Whether to include each element's bounding box as [box=x,y,width,height] in snapshots.
     * Coordinates are viewport-relative, in CSS pixels (Element.getBoundingClientRect).
     */
    boxes?: boolean;
  };

  /**
   * allowUnrestrictedFileAccess acts as a guardrail to prevent the LLM from accidentally
   * wandering outside its intended workspace. It is a convenience defense to catch unintended
   * file access, not a secure boundary; a deliberate attempt to reach other directories can be
   * easily worked around, so always rely on client-level permissions for true security.
   */
  allowUnrestrictedFileAccess?: boolean;

  /**
   * Specify the language to use for code generation.
   */
  codegen?: 'typescript' | 'python' | 'java' | 'csharp' | 'none';
}
<!--- End of config generated section -->

Standalone MCP server

When running headed browser on system w/o display or from worker processes of the IDEs, run the MCP server from environment with the DISPLAY and pass the --port flag to enable HTTP transport.

npx @playwright/mcp@latest --port 8931

And then in MCP client config, set the url to the HTTP endpoint:

{
  "mcpServers": {
    "playwright": {
      "url": "http://localhost:8931/mcp"
    }
  }
}

Security

Playwright MCP is not a security boundary. See MCP Security Best Practices for guidance on securing your deployment.

Docker

NOTE: The Docker implementation only supports headless chromium at the moment.

{
  "mcpServers": {
    "playwright": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "--init", "--pull=always", "mcr.microsoft.com/playwright/mcp"]
    }
  }
}

Or If you prefer to run the container as a long-lived service instead of letting the MCP client spawn it, use:

docker run -d -i --rm --init --pull=always \
  --entrypoint node \
  --name playwright \
  -p 8931:8931 \
  mcr.microsoft.com/playwright/mcp \
  /app/cli.js --headless --browser chromium --no-sandbox --port 8931 --host 0.0.0.0

The server will listen on host port 8931 and can be reached by any MCP client.

You can build the Docker image yourself.

docker build -t mcr.microsoft.com/playwright/mcp .

Programmatic usage

import http from 'http';

import { createConnection } from '@playwright/mcp';
import { SSEServerTransport } from '@modelcontextprotocol/sdk/server/sse.js';

http.createServer(async (req, res) => {
  // ...

  // Creates a headless Playwright MCP server with SSE transport
  const connection = await createConnection({ browser: { launchOptions: { headless: true } } });
  const transport = new SSEServerTransport('/messages', res);
  await connection.connect(transport);

  // ...
});

Tools

<!--- Tools generated by update-readme.js -->

Core automation

<!-- NOTE: This has been generated via update-readme.js -->
  • browser_click
    • Title: Click
    • Description: Perform click on a web page
    • Parameters:
      • element (string, optional): Human-readable element description used to obtain permission to interact with the element
      • target (string): Exact target element reference from the page snapshot, or a unique element selector
      • doubleClick (boolean, optional): Whether to perform a double click instead of a single click
      • button (string, optional): Button to click, defaults to left
      • modifiers (array, optional): Modifier keys to press
    • Read-only: false
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_close
    • Title: Close browser
    • Description: Close the page
    • Parameters: None
    • Read-only: false
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_console_messages
    • Title: Get console messages
    • Description: Returns all console messages
    • Parameters:
      • level (string): Level of the console messages to return. Each level includes the messages of more severe levels. Defaults to "info".
      • all (boolean, optional): Return all console messages since the beginning of the session, not just since the last navigation. Defaults to false.
      • filename (string, optional): File name to save the console messages to. Relative file names are resolved against the workspace root. If not provided, messages are returned as text.
    • Read-only: true
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_drag
    • Title: Drag mouse
    • Description: Perform drag and drop between two elements
    • Parameters:
      • startElement (string, optional): Human-readable source element description used to obtain the permission to interact with the element
      • startTarget (string): Exact target element reference from the page snapshot, or a unique element selector
      • endElement (string, optional): Human-readable target element description used to obtain the permission to interact with the element
      • endTarget (string): Exact target element reference from the page snapshot, or a unique element selector
    • Read-only: false
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_drop
    • Title: Drop files or data onto an element
    • Description: Drop files or MIME-typed data onto an element, as if dragged from outside the page. At least one of "paths" or "data" must be provided.
    • Parameters:
      • element (string, optional): Human-readable element description used to obtain permission to interact with the element
      • target (string): Exact target element reference from the page snapshot, or a unique element selector
      • paths (array, optional): Absolute paths to files to drop onto the element.
      • data (object, optional): Data to drop, as a map of MIME type to string value (e.g. {"text/plain": "hello", "text/uri-list": "https://example.com"}).
    • Read-only: false
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_emulate_media
    • Title: Emulate media features
    • Description: Emulate CSS media features for the page, for example switch between the light and dark color scheme. Omitted parameters are left unchanged; null clears an override.
    • Parameters:
      • colorScheme (optional): Emulates the prefers-color-scheme media feature
      • reducedMotion (optional): Emulates the prefers-reduced-motion media feature
      • forcedColors (optional): Emulates the forced-colors media feature
      • contrast (optional): Emulates the prefers-contrast media feature
      • media (optional): Changes the CSS media type of the page
    • Read-only: false
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_evaluate
    • Title: Evaluate JavaScript
    • Description: Evaluate JavaScript expression on page or element
    • Parameters:
      • element (string, optional): Human-readable element description used to obtain permission to interact with the element
      • target (string, optional): Exact target element reference from the page snapshot, or a unique element selector
      • function (string): () => { /* code / } or (element) => { / code */ } when element is provided
      • filename (string, optional): File name to save the result to. Relative file names are resolved against the workspace root. If not provided, result is returned as text.
    • Read-only: false
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_file_upload
    • Title: Upload files
    • Description: Upload one or multiple files
    • Parameters:
      • paths (array, optional): The absolute paths to the files to upload. Can be single file or multiple files. If omitted, file chooser is cancelled.
    • Read-only: false
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_fill_form
    • Title: Fill form
    • Description: Fill multiple form fields
    • Parameters:
      • fields (array): Fields to fill in
    • Read-only: false
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_find
    • Title: Find in page snapshot
    • Description: Search the accessibility snapshot of the current page for text or a regular expression. Returns matching snapshot nodes with a few lines of surrounding context (like search snippets), each shown under its path from the root of the tree, which is cheaper than capturing the whole snapshot when you only need to locate an element and its ref.
    • Parameters:
      • text (string, optional): Plain text to search for in the page snapshot (case-insensitive substring match). Provide either text or regex, not both.
      • regex (string, optional): Regular expression to search for in the page snapshot. Matching is case-sensitive by default; wrap the pattern in slashes to add flags, e.g. "/error/i" for case-insensitive. Provide either text or regex, not both.
    • Read-only: true
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_handle_dialog
    • Title: Handle a dialog
    • Description: Handle a dialog
    • Parameters:
      • accept (boolean): Whether to accept the dialog.
      • promptText (string, optional): The text of the prompt in case of a prompt dialog.
    • Read-only: false
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_hover
    • Title: Hover mouse
    • Description: Hover over element on page
    • Parameters:
      • element (string, optional): Human-readable element description used to obtain permission to interact with the element
      • target (string): Exact target element reference from the page snapshot, or a unique element selector
    • Read-only: false
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_navigate
    • Title: Navigate to a URL
    • Description: Navigate to a URL
    • Parameters:
      • url (string): The URL to navigate to
    • Read-only: false
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_navigate_back
    • Title: Go back
    • Description: Go back to the previous page in the history
    • Parameters: None
    • Read-only: false
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_network_request
    • Title: Show network request details
    • Description: Returns full details (headers and body) of a single network request, or a single part if part is set. Use the number from browser_network_requests.
    • Parameters:
      • index (integer): 1-based index of the request, as printed by browser_network_requests.
      • part (string, optional): Return only this part of the request. Omit to return full details.
      • filename (string, optional): File name to save the result to. Relative file names are resolved against the workspace root. If not provided, output is returned as text.
    • Read-only: true
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_network_requests
    • Title: List network requests
    • Description: Returns a numbered list of network requests since loading the page. Use browser_network_request with the number to get full details.
    • Parameters:
      • static (boolean): Whether to include successful static resources like images, fonts, scripts, etc. Defaults to false.
      • filter (string, optional): Only return requests whose URL matches this regexp (e.g. "/api/.*user").
      • filename (string, optional): File name to save the network requests to. Relative file names are resolved against the workspace root. If not provided, requests are returned as text.
    • Read-only: true
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_press_key
    • Title: Press a key
    • Description: Press a key on the keyboard
    • Parameters:
      • key (string): Name of the key to press or a character to generate, such as ArrowLeft or a
    • Read-only: false
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_resize
    • Title: Resize browser window
    • Description: Resize the browser window
    • Parameters:
      • width (number): Width of the browser window
      • height (number): Height of the browser window
    • Read-only: false
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_run_code_unsafe
    • Title: Run Playwright code (unsafe)
    • Description: Run a Playwright code snippet. Unsafe: executes arbitrary JavaScript in the Playwright server process and is RCE-equivalent.
    • Parameters:
      • code (string, optional): A JavaScript function containing Playwright code to execute. It will be invoked with a single argument, page, which you can use for any page interaction. For example: async (page) => { await page.getByRole('button', { name: 'Submit' }).click(); return await page.title(); }
      • filename (string, optional): Load code from the specified file. Relative file names are resolved against the workspace root. If both code and filename are provided, code will be ignored.
    • Read-only: false
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_select_option
    • Title: Select option
    • Description: Select an option in a dropdown
    • Parameters:
      • element (string, optional): Human-readable element description used to obtain permission to interact with the element
      • target (string): Exact target element reference from the page snapshot, or a unique element selector
      • values (array): Array of values to select in the dropdown. This can be a single value or multiple values.
    • Read-only: false
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_snapshot
    • Title: Page snapshot
    • Description: Capture accessibility snapshot of the current page, this is better than screenshot
    • Parameters:
      • target (string, optional): Exact target element reference from the page snapshot, or a unique element selector
      • filename (string, optional): Save snapshot to a file instead of returning it in the response. Relative file names are resolved against the workspace root.
      • depth (number, optional): Limit the depth of the snapshot tree
      • boxes (boolean, optional): Include each element's bounding box as [box=x,y,width,height] in the snapshot. Coordinates are viewport-relative, in CSS pixels (Element.getBoundingClientRect)
    • Read-only: true
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_take_screenshot
    • Title: Take a screenshot
    • Description: Take a screenshot of the current page. You can't perform actions based on the screenshot, use browser_snapshot for actions.
    • Parameters:
      • element (string, optional): Human-readable element description used to obtain permission to interact with the element
      • target (string, optional): Exact target element reference from the page snapshot, or a unique element selector
      • type (string, optional): Image format for the screenshot. If unset, inferred from the filename extension, otherwise png.
      • filename (string, optional): File name to save the screenshot to. Relative file names are resolved against the workspace root. If not specified, the screenshot is saved into the output directory as page-{timestamp}.{png|jpeg|webp}.
      • fullPage (boolean, optional): When true, takes a screenshot of the full scrollable page, instead of the currently visible viewport. Cannot be used with element screenshots.
      • scale (string): Image resolution scale. "css" produces a screenshot sized in CSS pixels (smaller, consistent across devices). "device" produces a high-resolution screenshot using device pixels (larger, accounts for the device pixel ratio). Default is css.
    • Read-only: true
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_type
    • Title: Type text
    • Description: Type text into editable element
    • Parameters:
      • element (string, optional): Human-readable element description used to obtain permission to interact with the element
      • target (string): Exact target element reference from the page snapshot, or a unique element selector
      • text (string): Text to type into the element
      • submit (boolean, optional): Whether to submit entered text (press Enter after)
      • slowly (boolean, optional): Whether to type one character at a time. Useful for triggering key handlers in the page. By default entire text is filled in at once.
    • Read-only: false
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_wait_for
    • Title: Wait for
    • Description: Wait for text to appear or disappear or a specified time to pass
    • Parameters:
      • time (number, optional): The time to wait in seconds
      • text (string, optional): The text to wait for
      • textGone (string, optional): The text to wait for to disappear
    • Read-only: false

Tab management

<!-- NOTE: This has been generated via update-readme.js -->
  • browser_tabs
    • Title: Manage tabs
    • Description: List, create, close, or select a browser tab.
    • Parameters:
      • action (string): Operation to perform
      • index (number, optional): Tab index, used for close/select. If omitted for close, current tab is closed.
      • url (string, optional): URL to navigate to in the new tab, used for new.
    • Read-only: false

Browser installation

Configuration (opt-in via --caps=config)

<!-- NOTE: This has been generated via update-readme.js -->
  • browser_get_config
    • Title: Get config
    • Description: Get the final resolved config after merging CLI options, environment variables and config file.
    • Parameters: None
    • Read-only: true

Network (opt-in via --caps=network)

<!-- NOTE: This has been generated via update-readme.js -->
  • browser_network_state_set
    • Title: Set network state
    • Description: Sets the browser network state to online or offline. When offline, all network requests will fail.
    • Parameters:
      • state (string): Set to "offline" to simulate offline mode, "online" to restore network connectivity
    • Read-only: false
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_route
    • Title: Mock network requests
    • Description: Set up a route to mock network requests matching a URL pattern
    • Parameters:
      • pattern (string): URL pattern to match (e.g., "/api/users", "/*.{png,jpg}")
      • status (number, optional): HTTP status code to return (default: 200)
      • body (string, optional): Response body (text or JSON string)
      • contentType (string, optional): Content-Type header (e.g., "application/json", "text/html")
      • headers (array, optional): Headers to add in "Name: Value" format
      • removeHeaders (string, optional): Comma-separated list of header names to remove from request
    • Read-only: false
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_route_list
    • Title: List network routes
    • Description: List all active network routes
    • Parameters: None
    • Read-only: true
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_unroute
    • Title: Remove network routes
    • Description: Remove network routes matching a pattern (or all routes if no pattern specified)
    • Parameters:
      • pattern (string, optional): URL pattern to unroute (omit to remove all routes)
    • Read-only: false

Storage (opt-in via --caps=storage)

<!-- NOTE: This has been generated via update-readme.js -->
  • browser_cookie_clear
    • Title: Clear cookies
    • Description: Clear all cookies
    • Parameters: None
    • Read-only: false
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_cookie_delete
    • Title: Delete cookie
    • Description: Delete a specific cookie
    • Parameters:
      • name (string): Cookie name to delete
    • Read-only: false
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_cookie_get
    • Title: Get cookie
    • Description: Get a specific cookie by name
    • Parameters:
      • name (string): Cookie name to get
    • Read-only: true
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_cookie_list
    • Title: List cookies
    • Description: List all cookies (optionally filtered by domain/path)
    • Parameters:
      • domain (string, optional): Filter cookies by domain
      • path (string, optional): Filter cookies by path
    • Read-only: true
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_cookie_set
    • Title: Set cookie
    • Description: Set a cookie with optional flags (domain, path, expires, httpOnly, secure, sameSite)
    • Parameters:
      • name (string): Cookie name
      • value (string): Cookie value
      • domain (string, optional): Cookie domain
      • path (string, optional): Cookie path
      • expires (number, optional): Cookie expiration as Unix timestamp
      • httpOnly (boolean, optional): Whether the cookie is HTTP only
      • secure (boolean, optional): Whether the cookie is secure
      • sameSite (string, optional): Cookie SameSite attribute
    • Read-only: false
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_localstorage_clear
    • Title: Clear localStorage
    • Description: Clear all localStorage
    • Parameters: None
    • Read-only: false
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_localstorage_delete
    • Title: Delete localStorage item
    • Description: Delete a localStorage item
    • Parameters:
      • key (string): Key to delete
    • Read-only: false
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_localstorage_get
    • Title: Get localStorage item
    • Description: Get a localStorage item by key
    • Parameters:
      • key (string): Key to get
    • Read-only: true
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_localstorage_list
    • Title: List localStorage
    • Description: List all localStorage key-value pairs
    • Parameters: None
    • Read-only: true
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_localstorage_set
    • Title: Set localStorage item
    • Description: Set a localStorage item
    • Parameters:
      • key (string): Key to set
      • value (string): Value to set
    • Read-only: false
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_sessionstorage_clear
    • Title: Clear sessionStorage
    • Description: Clear all sessionStorage
    • Parameters: None
    • Read-only: false
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_sessionstorage_delete
    • Title: Delete sessionStorage item
    • Description: Delete a sessionStorage item
    • Parameters:
      • key (string): Key to delete
    • Read-only: false
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_sessionstorage_get
    • Title: Get sessionStorage item
    • Description: Get a sessionStorage item by key
    • Parameters:
      • key (string): Key to get
    • Read-only: true
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_sessionstorage_list
    • Title: List sessionStorage
    • Description: List all sessionStorage key-value pairs
    • Parameters: None
    • Read-only: true
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_sessionstorage_set
    • Title: Set sessionStorage item
    • Description: Set a sessionStorage item
    • Parameters:
      • key (string): Key to set
      • value (string): Value to set
    • Read-only: false
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_set_storage_state
    • Title: Restore storage state
    • Description: Restore storage state (cookies, local storage) from a file. This clears existing cookies and local storage before restoring.
    • Parameters:
      • filename (string): Path to the storage state file to restore from. Relative file names are resolved against the workspace root.
    • Read-only: false
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_storage_state
    • Title: Save storage state
    • Description: Save storage state (cookies, local storage) to a file for later reuse
    • Parameters:
      • filename (string, optional): File name to save the storage state to. Relative file names are resolved against the workspace root. If not specified, the storage state is saved into the output directory as storage-state-{timestamp}.json.
    • Read-only: true

DevTools (opt-in via --caps=devtools)

<!-- NOTE: This has been generated via update-readme.js -->
  • browser_annotate
    • Title: Annotate the current page
    • Description: Open the Playwright Dashboard in annotation mode for the current page and wait for the user to draw annotations. Returns the annotated screenshot, ARIA snapshot, and the list of annotations.
    • Parameters: None
    • Read-only: true
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_hide_highlight
    • Title: Hide element highlight
    • Description: Remove a highlight overlay previously added for the element.
    • Parameters:
      • element (string, optional): Human-readable element description used when adding the highlight; must match the value passed to browser_highlight.
      • target (string, optional): Exact target element reference from the page snapshot, or a unique element selector
    • Read-only: true
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_highlight
    • Title: Highlight element
    • Description: Show a persistent highlight overlay around the element on the page.
    • Parameters:
      • element (string, optional): Human-readable element description used to obtain permission to interact with the element
      • target (string): Exact target element reference from the page snapshot, or a unique element selector
      • style (string, optional): Additional inline CSS applied to the highlight overlay, e.g. "outline: 2px dashed red".
    • Read-only: true
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_resume
    • Title: Resume paused script execution
    • Description: Resume script execution after it was paused. When called with step set to true, execution will pause again before the next action.
    • Parameters:
      • step (boolean, optional): When true, execution will pause again before the next action, allowing step-by-step debugging.
      • location (string, optional): Pause execution at a specific <file>:<line>, e.g. "example.spec.ts:42".
    • Read-only: false
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_start_recording
    • Title: Start recording user actions
    • Description: Start recording actions that the user performs in the browser as Playwright code. Use it when the user wants to demonstrate a flow manually. Call browser_stop_recording when the user says they are done to retrieve the recorded actions.
    • Parameters: None
    • Read-only: true
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_start_tracing
    • Title: Start tracing
    • Description: Start trace recording
    • Parameters: None
    • Read-only: true
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_start_video
    • Title: Start video
    • Description: Start video recording
    • Parameters:
      • filename (string, optional): File name to save the video to. Relative file names are resolved against the workspace root. If not specified, the video is saved into the output directory as video-{timestamp}.webm.
      • size (object, optional): Video size
      • fps (number, optional): Video frame rate in frames per second, defaults to 25
      • cursor (boolean, optional): Render an animated mouse cursor that travels to each action point. Paces actions by 800ms so that the cursor has time to travel.
    • Read-only: true
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_stop_recording
    • Title: Stop recording user actions
    • Description: Stop the recording started with browser_start_recording and return the recorded actions as Playwright code.
    • Parameters: None
    • Read-only: true
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_stop_tracing
    • Title: Stop tracing
    • Description: Stop trace recording
    • Parameters: None
    • Read-only: true
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_stop_video
    • Title: Stop video
    • Description: Stop video recording
    • Parameters: None
    • Read-only: true
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_video_chapter
    • Title: Video chapter
    • Description: Add a chapter marker to the video recording. Shows a full-screen chapter card with blurred backdrop.
    • Parameters:
      • title (string): Chapter title
      • description (string, optional): Chapter description
      • duration (number, optional): Duration in milliseconds to show the chapter card
    • Read-only: true
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_video_hide_actions
    • Title: Hide action overlays
    • Description: Stop annotating actions performed on the page.
    • Parameters: None
    • Read-only: true
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_video_show_actions
    • Title: Show action overlays
    • Description: Annotate subsequent actions performed on the page with a callout that names the action and, when styled, marks the action point and highlights the target element. Useful while video recording or screencasting.
    • Parameters:
      • duration (number, optional): How long each action annotation stays on screen, in milliseconds. Defaults to 500.
      • position (string, optional): Where to place the action title relative to the page. Defaults to top-right.
      • cursor (string, optional): Cursor decoration for pointer actions. "pointer" (default) animates a mouse pointer from the previous action point to the next one; "none" disables the cursor decoration.
      • style (object, optional): Styles of the action decorations.
    • Read-only: true

Coordinate-based (opt-in via --caps=vision)

<!-- NOTE: This has been generated via update-readme.js -->
  • browser_mouse_click_xy
    • Title: Click
    • Description: Click mouse button at a given position
    • Parameters:
      • x (number): X coordinate
      • y (number): Y coordinate
      • button (string, optional): Button to click, defaults to left
      • clickCount (number, optional): Number of clicks, defaults to 1
      • delay (number, optional): Time to wait between mouse down and mouse up in milliseconds, defaults to 0
    • Read-only: false
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_mouse_down
    • Title: Press mouse down
    • Description: Press mouse down
    • Parameters:
      • button (string, optional): Button to press, defaults to left
    • Read-only: false
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_mouse_drag_xy
    • Title: Drag mouse
    • Description: Drag left mouse button to a given position
    • Parameters:
      • startX (number): Start X coordinate
      • startY (number): Start Y coordinate
      • endX (number): End X coordinate
      • endY (number): End Y coordinate
    • Read-only: false
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_mouse_move_xy
    • Title: Move mouse
    • Description: Move mouse to a given position
    • Parameters:
      • x (number): X coordinate
      • y (number): Y coordinate
    • Read-only: false
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_mouse_up
    • Title: Press mouse up
    • Description: Press mouse up
    • Parameters:
      • button (string, optional): Button to press, defaults to left
    • Read-only: false
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_mouse_wheel
    • Title: Scroll mouse wheel
    • Description: Scroll mouse wheel
    • Parameters:
      • deltaX (number): X delta
      • deltaY (number): Y delta
    • Read-only: false

PDF generation (opt-in via --caps=pdf)

<!-- NOTE: This has been generated via update-readme.js -->
  • browser_pdf_save
    • Title: Save as PDF
    • Description: Save page as PDF
    • Parameters:
      • filename (string, optional): File name to save the pdf to. Relative file names are resolved against the workspace root. If not specified, the pdf is saved into the output directory as page-{timestamp}.pdf.
    • Read-only: true

Test assertions (opt-in via --caps=testing)

<!-- NOTE: This has been generated via update-readme.js -->
  • browser_generate_locator
    • Title: Create locator for element
    • Description: Generate locator for the given element to use in tests
    • Parameters:
      • element (string, optional): Human-readable element description used to obtain permission to interact with the element
      • target (string): Exact target element reference from the page snapshot, or a unique element selector
    • Read-only: true
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_verify_element_visible
    • Title: Verify element visible
    • Description: Verify element is visible on the page
    • Parameters:
      • role (string): ROLE of the element. Can be found in the snapshot like this: - {ROLE} "Accessible Name":
      • accessibleName (string): ACCESSIBLE_NAME of the element. Can be found in the snapshot like this: - role "{ACCESSIBLE_NAME}"
    • Read-only: false
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_verify_list_visible
    • Title: Verify list visible
    • Description: Verify list is visible on the page
    • Parameters:
      • element (string): Human-readable list description
      • target (string): Exact target element reference that points to the list
      • items (array): Items to verify
    • Read-only: false
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_verify_text_visible
    • Title: Verify text visible
    • Description: Verify text is visible on the page. Prefer browser_verify_element_visible if possible.
    • Parameters:
      • text (string): TEXT to verify. Can be found in the snapshot like this: - role "Accessible Name": {TEXT} or like this: - text: {TEXT}
    • Read-only: false
<!-- NOTE: This has been generated via update-readme.js -->
  • browser_verify_value
    • Title: Verify value
    • Description: Verify element value
    • Parameters:
      • type (string): Type of the element
      • element (string): Human-readable element description
      • target (string): Exact target element reference from the page snapshot
      • value (string): Value to verify. For checkbox, use "true" or "false".
    • Read-only: false
<!--- End of tools generated section -->
1## Playwright MCP
2 
3A Model Context Protocol (MCP) server that provides browser automation capabilities using [Playwright](https://playwright.dev). This server enables LLMs to interact with web pages through structured accessibility snapshots, bypassing the need for screenshots or visually-tuned models.
4 
5### Playwright MCP vs Playwright CLI
6 
7This package provides MCP interface into Playwright. If you are using a **coding agent**, you might benefit from using the [CLI+SKILLS](https://github.com/microsoft/playwright-cli) instead.
8 
9- **CLI**: Modern **coding agents** increasingly favor CLI–based workflows exposed as SKILLs over MCP because CLI invocations are more token-efficient: they avoid loading large tool schemas and verbose accessibility trees into the model context, allowing agents to act through concise, purpose-built commands. This makes CLI + SKILLs better suited for high-throughput coding agents that must balance browser automation with large codebases, tests, and reasoning within limited context windows.<br>**Learn more about [Playwright CLI with SKILLS](https://github.com/microsoft/playwright-cli)**.
10 
11- **MCP**: MCP remains relevant for specialized agentic loops that benefit from persistent state, rich introspection, and iterative reasoning over page structure, such as exploratory automation, self-healing tests, or long-running autonomous workflows where maintaining continuous browser context outweighs token cost concerns.
12 
13### Key Features
14 
15- **Fast and lightweight**. Uses Playwright's accessibility tree, not pixel-based input.
16- **LLM-friendly**. No vision models needed, operates purely on structured data.
17- **Deterministic tool application**. Avoids ambiguity common with screenshot-based approaches.
18 
19### Requirements
20- Node.js 18 or newer
21- VS Code, Cursor, Windsurf, Claude Desktop, Goose, Grok, Junie or any other MCP client
22 
23<!--
24// Generate using:
25node utils/generate-links.js
26-->
27 
28### Getting started
29 
30First, install the Playwright MCP server with your client.
31 
32**Standard config** works in most of the tools:
33 
34```js
35{
36 "mcpServers": {
37 "playwright": {
38 "command": "npx",
39 "args": [
40 "@playwright/mcp@latest"
41 ]
42 }
43 }
44}
45```
46 
47[<img src="https://img.shields.io/badge/VS_Code-VS_Code?style=flat-square&label=Install%20Server&color=0098FF" alt="Install in VS Code">](https://insiders.vscode.dev/redirect?url=vscode%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522playwright%2522%252C%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522%2540playwright%252Fmcp%2540latest%2522%255D%257D) [<img alt="Install in VS Code Insiders" src="https://img.shields.io/badge/VS_Code_Insiders-VS_Code_Insiders?style=flat-square&label=Install%20Server&color=24bfa5">](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522playwright%2522%252C%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522%2540playwright%252Fmcp%2540latest%2522%255D%257D)
48 
49<details>
50<summary>Amp</summary>
51 
52Add via the Amp VS Code extension settings screen or by updating your settings.json file:
53 
54```json
55"amp.mcpServers": {
56 "playwright": {
57 "command": "npx",
58 "args": [
59 "@playwright/mcp@latest"
60 ]
61 }
62}
63```
64 
65**Amp CLI Setup:**
66 
67Add via the `amp mcp add` command below
68 
69```bash
70amp mcp add playwright -- npx @playwright/mcp@latest
71```
72 
73</details>
74 
75<details>
76<summary>Antigravity</summary>
77 
78Add via the Antigravity settings or by updating your configuration file:
79 
80```json
81{
82 "mcpServers": {
83 "playwright": {
84 "command": "npx",
85 "args": [
86 "@playwright/mcp@latest"
87 ]
88 }
89 }
90}
91```
92 
93</details>
94 
95<details>
96<summary>Claude Code</summary>
97 
98Use the Claude Code CLI to add the Playwright MCP server:
99 
100```bash
101claude mcp add playwright npx @playwright/mcp@latest
102```
103</details>
104 
105<details>
106<summary>Claude Desktop</summary>
107 
108Follow the MCP install [guide](https://modelcontextprotocol.io/quickstart/user), use the standard config above.
109 
110</details>
111 
112<details>
113<summary>Cline</summary>
114 
115Follow the instruction in the section [Configuring MCP Servers](https://docs.cline.bot/mcp/configuring-mcp-servers)
116 
117**Example: Local Setup**
118 
119Add the following to your [`cline_mcp_settings.json`](https://docs.cline.bot/mcp/configuring-mcp-servers#editing-mcp-settings-files) file:
120 
121```json
122{
123 "mcpServers": {
124 "playwright": {
125 "type": "stdio",
126 "command": "npx",
127 "timeout": 30,
128 "args": [
129 "-y",
130 "@playwright/mcp@latest"
131 ],
132 "disabled": false
133 }
134 }
135}
136```
137 
138</details>
139 
140<details>
141<summary>Codex</summary>
142 
143Use the Codex CLI to add the Playwright MCP server:
144 
145```bash
146codex mcp add playwright npx "@playwright/mcp@latest"
147```
148 
149Alternatively, create or edit the configuration file `~/.codex/config.toml` and add:
150 
151```toml
152[mcp_servers.playwright]
153command = "npx"
154args = ["@playwright/mcp@latest"]
155```
156 
157For more information, see the [Codex MCP documentation](https://github.com/openai/codex/blob/main/codex-rs/config.md#mcp_servers).
158 
159</details>
160 
161<details>
162<summary>Copilot</summary>
163 
164Use the Copilot CLI to interactively add the Playwright MCP server:
165 
166```bash
167/mcp add
168```
169 
170Alternatively, create or edit the configuration file `~/.copilot/mcp-config.json` and add:
171 
172```json
173{
174 "mcpServers": {
175 "playwright": {
176 "type": "local",
177 "command": "npx",
178 "tools": [
179 "*"
180 ],
181 "args": [
182 "@playwright/mcp@latest"
183 ]
184 }
185 }
186}
187```
188 
189For more information, see the [Copilot CLI documentation](https://docs.github.com/en/copilot/concepts/agents/about-copilot-cli).
190 
191</details>
192 
193<details>
194<summary>Cursor</summary>
195 
196#### Click the button to install:
197 
198[<img src="https://cursor.com/deeplink/mcp-install-dark.svg" alt="Install in Cursor">](https://cursor.com/en/install-mcp?name=Playwright&config=eyJjb21tYW5kIjoibnB4IEBwbGF5d3JpZ2h0L21jcEBsYXRlc3QifQ%3D%3D)
199 
200#### Or install manually:
201 
202Go to `Cursor Settings` -> `MCP` -> `Add new MCP Server`. Name to your liking, use `command` type with the command `npx @playwright/mcp@latest`. You can also verify config or add command like arguments via clicking `Edit`.
203 
204</details>
205 
206<details>
207<summary>Factory</summary>
208 
209Use the Factory CLI to add the Playwright MCP server:
210 
211```bash
212droid mcp add playwright "npx @playwright/mcp@latest"
213```
214 
215Alternatively, type `/mcp` within Factory droid to open an interactive UI for managing MCP servers.
216 
217For more information, see the [Factory MCP documentation](https://docs.factory.ai/cli/configuration/mcp).
218 
219</details>
220 
221<details>
222<summary>Gemini CLI</summary>
223 
224Follow the MCP install [guide](https://github.com/google-gemini/gemini-cli/blob/main/docs/tools/mcp-server.md#configure-the-mcp-server-in-settingsjson), use the standard config above.
225 
226</details>
227 
228<details>
229<summary>Goose</summary>
230 
231#### Click the button to install:
232 
233[![Install in Goose](https://block.github.io/goose/img/extension-install-dark.svg)](https://block.github.io/goose/extension?cmd=npx&arg=%40playwright%2Fmcp%40latest&id=playwright&name=Playwright&description=Interact%20with%20web%20pages%20through%20structured%20accessibility%20snapshots%20using%20Playwright)
234 
235#### Or install manually:
236 
237Go to `Advanced settings` -> `Extensions` -> `Add custom extension`. Name to your liking, use type `STDIO`, and set the `command` to `npx @playwright/mcp`. Click "Add Extension".
238</details>
239 
240<details>
241<summary>Grok</summary>
242 
243Use the Grok CLI to add the Playwright MCP server:
244 
245```bash
246grok mcp add playwright -- npx @playwright/mcp@latest
247```
248 
249Alternatively, create or edit the configuration file `~/.grok/config.toml` and add:
250 
251```toml
252[mcp_servers.playwright]
253command = "npx"
254args = ["@playwright/mcp@latest"]
255```
256 
257For more information, see the [Grok MCP documentation](https://docs.x.ai/build/features/mcp-servers).
258 
259</details>
260 
261<details>
262<summary>Junie</summary>
263 
264To add the Playwright MCP server in Junie CLI:
265 
2661. Type `/mcp`
2672. Press `Ctrl+A` to add a new MCP server
2683. Select **Playwright** from the list
269 
270Alternatively, add to `.junie/mcp/mcp.json`:
271 
272```json
273{
274 "mcpServers": {
275 "Playwright": {
276 "command": "npx",
277 "args": [
278 "-y",
279 "@playwright/mcp@latest"
280 ]
281 }
282 }
283}
284```
285 
286For more information, see the [Junie MCP configuration documentation](https://junie.jetbrains.com/docs/junie-cli-mcp-configuration.html).
287 
288</details>
289 
290<details>
291<summary>Kiro</summary>
292 
293[![Add to Kiro](https://kiro.dev/images/add-to-kiro.svg)](https://kiro.dev/launch/mcp/add?name=playwright&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22%40playwright%2Fmcp%40latest%22%5D%7D)
294 
295Follow the MCP Servers [documentation](https://kiro.dev/docs/mcp/). For example in `.kiro/settings/mcp.json`:
296 
297```json
298{
299 "mcpServers": {
300 "playwright": {
301 "command": "npx",
302 "args": [
303 "@playwright/mcp@latest"
304 ]
305 }
306 }
307}
308```
309</details>
310 
311<details>
312<summary>LM Studio</summary>
313 
314#### Click the button to install:
315 
316[![Add MCP Server playwright to LM Studio](https://files.lmstudio.ai/deeplink/mcp-install-light.svg)](https://lmstudio.ai/install-mcp?name=playwright&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyJAcGxheXdyaWdodC9tY3BAbGF0ZXN0Il19)
317 
318#### Or install manually:
319 
320Go to `Program` in the right sidebar -> `Install` -> `Edit mcp.json`. Use the standard config above.
321</details>
322 
323<details>
324<summary>opencode</summary>
325 
326Follow the MCP Servers [documentation](https://opencode.ai/docs/mcp-servers/). For example in `~/.config/opencode/opencode.json`:
327 
328```json
329{
330 "$schema": "https://opencode.ai/config.json",
331 "mcp": {
332 "playwright": {
333 "type": "local",
334 "command": [
335 "npx",
336 "@playwright/mcp@latest"
337 ],
338 "enabled": true
339 }
340 }
341}
342 
343```
344</details>
345 
346<details>
347<summary>Qodo Gen</summary>
348 
349Open [Qodo Gen](https://docs.qodo.ai/qodo-documentation/qodo-gen) chat panel in VSCode or IntelliJ → Connect more tools → + Add new MCP → Paste the standard config above.
350 
351Click <code>Save</code>.
352</details>
353 
354<details>
355<summary>VS Code</summary>
356 
357#### Click the button to install:
358 
359[<img src="https://img.shields.io/badge/VS_Code-VS_Code?style=flat-square&label=Install%20Server&color=0098FF" alt="Install in VS Code">](https://insiders.vscode.dev/redirect?url=vscode%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522playwright%2522%252C%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522%2540playwright%252Fmcp%2540latest%2522%255D%257D) [<img alt="Install in VS Code Insiders" src="https://img.shields.io/badge/VS_Code_Insiders-VS_Code_Insiders?style=flat-square&label=Install%20Server&color=24bfa5">](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522playwright%2522%252C%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522%2540playwright%252Fmcp%2540latest%2522%255D%257D)
360 
361#### Or install manually:
362 
363Follow the MCP install [guide](https://code.visualstudio.com/docs/copilot/chat/mcp-servers#_add-an-mcp-server), use the standard config above. You can also install the Playwright MCP server using the VS Code CLI:
364 
365```bash
366# For VS Code
367code --add-mcp '{"name":"playwright","command":"npx","args":["@playwright/mcp@latest"]}'
368```
369 
370After installation, the Playwright MCP server will be available for use with your GitHub Copilot agent in VS Code.
371</details>
372 
373<details>
374<summary>Warp</summary>
375 
376Go to `Settings` -> `AI` -> `Manage MCP Servers` -> `+ Add` to [add an MCP Server](https://docs.warp.dev/knowledge-and-collaboration/mcp#adding-an-mcp-server). Use the standard config above.
377 
378Alternatively, use the slash command `/add-mcp` in the Warp prompt and paste the standard config from above:
379```js
380{
381 "mcpServers": {
382 "playwright": {
383 "command": "npx",
384 "args": [
385 "@playwright/mcp@latest"
386 ]
387 }
388 }
389}
390```
391 
392</details>
393 
394<details>
395<summary>Windsurf</summary>
396 
397Follow Windsurf MCP [documentation](https://docs.windsurf.com/windsurf/cascade/mcp). Use the standard config above.
398 
399</details>
400 
401### Configuration
402 
403Playwright MCP server supports following arguments. They can be provided in the JSON configuration above, as a part of the `"args"` list:
404 
405<!--- Options generated by update-readme.js -->
406 
407| Option | Description |
408|--------|-------------|
409| --allowed-hosts <hosts...> | comma-separated list of hosts this server is allowed to serve from. Defaults to the host the server is bound to. Pass '*' to disable the host check.<br>*env* `PLAYWRIGHT_MCP_ALLOWED_HOSTS` |
410| --allowed-origins <origins> | semicolon-separated list of TRUSTED origins to allow the browser to request. Default is to allow all. Important: *does not* serve as a security boundary and *does not* affect redirects.<br>*env* `PLAYWRIGHT_MCP_ALLOWED_ORIGINS` |
411| --allow-unrestricted-file-access | allow access to files outside of the workspace roots. Also allows unrestricted access to file:// URLs. By default access to file system is restricted to workspace root directories (or cwd if no roots are configured) only, and navigation to file:// URLs is blocked.<br>*env* `PLAYWRIGHT_MCP_ALLOW_UNRESTRICTED_FILE_ACCESS` |
412| --blocked-origins <origins> | semicolon-separated list of origins to block the browser from requesting. Blocklist is evaluated before allowlist. If used without the allowlist, requests not matching the blocklist are still allowed. Important: *does not* serve as a security boundary and *does not* affect redirects.<br>*env* `PLAYWRIGHT_MCP_BLOCKED_ORIGINS` |
413| --block-service-workers | block service workers<br>*env* `PLAYWRIGHT_MCP_BLOCK_SERVICE_WORKERS` |
414| --browser <browser> | browser or chrome channel to use, possible values: chrome, firefox, webkit, msedge.<br>*env* `PLAYWRIGHT_MCP_BROWSER` |
415| --caps <caps> | comma-separated list of additional capabilities to enable, possible values: vision, pdf, devtools.<br>*env* `PLAYWRIGHT_MCP_CAPS` |
416| --cdp-endpoint <endpoint> | CDP endpoint to connect to.<br>*env* `PLAYWRIGHT_MCP_CDP_ENDPOINT` |
417| --cdp-header <headers...> | CDP headers to send with the connect request, multiple can be specified.<br>*env* `PLAYWRIGHT_MCP_CDP_HEADERS` |
418| --cdp-timeout <timeout> | timeout in milliseconds for connecting to CDP endpoint, defaults to 30000ms<br>*env* `PLAYWRIGHT_MCP_CDP_TIMEOUT` |
419| --codegen <lang> | specify the language to use for code generation, possible values: "typescript", "python", "java", "csharp", "none". Default is "typescript".<br>*env* `PLAYWRIGHT_MCP_CODEGEN` |
420| --config <path> | path to the configuration file.<br>*env* `PLAYWRIGHT_MCP_CONFIG` |
421| --console-level <level> | level of console messages to return: "error", "warning", "info", "debug". Each level includes the messages of more severe levels.<br>*env* `PLAYWRIGHT_MCP_CONSOLE_LEVEL` |
422| --device <device> | device to emulate, for example: "iPhone 15"<br>*env* `PLAYWRIGHT_MCP_DEVICE` |
423| --mobile | emulate a generic mobile device (Pixel 10 for Chromium, iPhone 17 for WebKit). Mobile pages are usually lighter, which saves tokens. Cannot be combined with --device.<br>*env* `PLAYWRIGHT_MCP_MOBILE` |
424| --executable-path <path> | path to the browser executable.<br>*env* `PLAYWRIGHT_MCP_EXECUTABLE_PATH` |
425| --extension | Connect to a running browser instance (Edge/Chrome only). Requires the "Playwright Extension" to be installed.<br>*env* `PLAYWRIGHT_MCP_EXTENSION` |
426| --endpoint <endpoint> | Bound browser endpoint to connect to.<br>*env* `PLAYWRIGHT_MCP_ENDPOINT` |
427| --file-paths <mode> | how file paths are rendered in tool results, "relative" to the workspace root or "absolute". Default is "relative".<br>*env* `PLAYWRIGHT_MCP_FILE_PATHS` |
428| --grant-permissions <permissions...> | List of permissions to grant to the browser context, for example "geolocation", "clipboard-read", "clipboard-write".<br>*env* `PLAYWRIGHT_MCP_GRANT_PERMISSIONS` |
429| --headless | run browser in headless mode, headed by default<br>*env* `PLAYWRIGHT_MCP_HEADLESS` |
430| --host <host> | host to bind server to. Default is localhost. Use 0.0.0.0 to bind to all interfaces.<br>*env* `PLAYWRIGHT_MCP_HOST` |
431| --idle-timeout <timeout> | close the browser after this many milliseconds without a completed tool call, the next tool call relaunches it. Defaults to one hour for headless browsers, never for headed ones, 0 disables.<br>*env* `PLAYWRIGHT_MCP_IDLE_TIMEOUT` |
432| --ignore-https-errors | ignore https errors<br>*env* `PLAYWRIGHT_MCP_IGNORE_HTTPS_ERRORS` |
433| --init-page <path...> | path to TypeScript file to evaluate on Playwright page object<br>*env* `PLAYWRIGHT_MCP_INIT_PAGE` |
434| --init-script <path...> | path to JavaScript file to add as an initialization script. The script will be evaluated in every page before any of the page's scripts. Can be specified multiple times.<br>*env* `PLAYWRIGHT_MCP_INIT_SCRIPT` |
435| --isolated | keep the browser profile in memory, do not save it to disk.<br>*env* `PLAYWRIGHT_MCP_ISOLATED` |
436| --image-responses <mode> | whether to send image responses to the client. Can be "allow", "omit" or "only". With "only", a response that carries an image consists of the image parts alone, without the text part. Defaults to "allow".<br>*env* `PLAYWRIGHT_MCP_IMAGE_RESPONSES` |
437| --no-sandbox | disable the sandbox for all process types that are normally sandboxed.<br>*env* `PLAYWRIGHT_MCP_NO_SANDBOX` |
438| --no-webmcp | do not collect or expose the tools that a page registers through the WebMCP API.<br>*env* `PLAYWRIGHT_MCP_WEBMCP=false` |
439| --output-dir <path> | path to the directory for automatically named output files, for example a screenshot taken without an explicit file name. Files with an explicit name are resolved against the workspace root instead and are not affected by this option.<br>*env* `PLAYWRIGHT_MCP_OUTPUT_DIR` |
440| --output-max-size <bytes> | Threshold for evicting old output files, in bytes.<br>*env* `PLAYWRIGHT_MCP_OUTPUT_MAX_SIZE` |
441| --port <port> | port to listen on for SSE transport.<br>*env* `PLAYWRIGHT_MCP_PORT` |
442| --profile-dir-name <name> | name of the profile directory in the user data dir to connect to with --extension, for example "Profile 1". Defaults to the last used profile that has the extension installed.<br>*env* `PLAYWRIGHT_MCP_PROFILE_DIR_NAME` |
443| --proxy-bypass <bypass> | comma-separated domains to bypass proxy, for example ".com,chromium.org,.domain.com"<br>*env* `PLAYWRIGHT_MCP_PROXY_BYPASS` |
444| --proxy-server <proxy> | specify proxy server, for example "http://myproxy:3128" or "socks5://myproxy:8080"<br>*env* `PLAYWRIGHT_MCP_PROXY_SERVER` |
445| --sandbox | enable the sandbox for all process types that are normally not sandboxed.<br>*env* `PLAYWRIGHT_MCP_SANDBOX` |
446| --save-session | Whether to save the Playwright MCP session into the output directory.<br>*env* `PLAYWRIGHT_MCP_SAVE_SESSION` |
447| --secrets <path> | path to a file containing secrets in the dotenv format<br>*env* `PLAYWRIGHT_MCP_SECRETS_FILE` |
448| --shared-browser-context | reuse the same browser context between all connected HTTP clients.<br>*env* `PLAYWRIGHT_MCP_SHARED_BROWSER_CONTEXT` |
449| --snapshot-boxes | include each element's bounding box as [box=x,y,width,height] in snapshots. Coordinates are viewport-relative, in CSS pixels.<br>*env* `PLAYWRIGHT_MCP_SNAPSHOT_BOXES` |
450| --snapshot-mode <mode> | when taking snapshots for responses, specifies the mode to use. Can be "full" or "none". Default is "full".<br>*env* `PLAYWRIGHT_MCP_SNAPSHOT_MODE` |
451| --storage-state <path> | path to the storage state file for isolated sessions.<br>*env* `PLAYWRIGHT_MCP_STORAGE_STATE` |
452| --test-id-attribute <attribute> | specify the attribute to use for test ids, defaults to "data-testid"<br>*env* `PLAYWRIGHT_MCP_TEST_ID_ATTRIBUTE` |
453| --timeout-action <timeout> | specify action timeout in milliseconds, defaults to 5000ms<br>*env* `PLAYWRIGHT_MCP_TIMEOUT_ACTION` |
454| --timeout-navigation <timeout> | specify navigation timeout in milliseconds, defaults to 60000ms<br>*env* `PLAYWRIGHT_MCP_TIMEOUT_NAVIGATION` |
455| --timeout-settle <timeout> | how long to wait after each action for triggered work to settle, in milliseconds, defaults to 500ms<br>*env* `PLAYWRIGHT_MCP_TIMEOUT_SETTLE` |
456| --user-agent <ua string> | specify user agent string<br>*env* `PLAYWRIGHT_MCP_USER_AGENT` |
457| --user-data-dir <path> | path to the user data directory. If not specified, a temporary directory will be created.<br>*env* `PLAYWRIGHT_MCP_USER_DATA_DIR` |
458| --viewport-size <size> | specify browser viewport size in pixels, for example "1280x720"<br>*env* `PLAYWRIGHT_MCP_VIEWPORT_SIZE` |
459 
460<!--- End of options generated section -->
461 
462### User profile
463 
464You can run Playwright MCP with persistent profile like a regular browser (default), in isolated contexts for testing sessions, or connect to your existing browser using the browser extension.
465 
466**Persistent profile**
467 
468All the logged in information will be stored in the persistent profile, you can delete it between sessions if you'd like to clear the offline state.
469Persistent profile is located at the following locations and you can override it with the `--user-data-dir` argument.
470 
471```bash
472# Windows
473%USERPROFILE%\AppData\Local\ms-playwright\mcp-{channel}-{workspace-hash}
474 
475# macOS
476- ~/Library/Caches/ms-playwright/mcp-{channel}-{workspace-hash}
477 
478# Linux
479- ~/.cache/ms-playwright/mcp-{channel}-{workspace-hash}
480```
481 
482`{workspace-hash}` is derived from the MCP client's workspace root, so different projects get separate profiles automatically.
483 
484> [!IMPORTANT]
485> A persistent profile can only be used by one browser instance at a time, so concurrent MCP clients sharing the same workspace will conflict. To run several clients in parallel, start each additional client with `--isolated` or point it at a distinct `--user-data-dir`.
486 
487**Isolated**
488 
489In the isolated mode, each session is started in the isolated profile. Every time you ask MCP to close the browser,
490the session is closed and all the storage state for this session is lost. You can provide initial storage state
491to the browser via the config's `contextOptions` or via the `--storage-state` argument. Learn more about the storage
492state [here](https://playwright.dev/docs/auth).
493 
494```js
495{
496 "mcpServers": {
497 "playwright": {
498 "command": "npx",
499 "args": [
500 "@playwright/mcp@latest",
501 "--isolated",
502 "--storage-state={path/to/storage.json}"
503 ]
504 }
505 }
506}
507```
508 
509**Browser Extension**
510 
511The Playwright MCP Chrome Extension allows you to connect to existing browser tabs and leverage your logged-in sessions and browser state. See [microsoft/playwright › packages/extension](https://github.com/microsoft/playwright/tree/main/packages/extension#readme) for installation and setup instructions.
512 
513### Initial state
514 
515There are multiple ways to provide the initial state to the browser context or a page.
516 
517For the storage state, you can either:
518- Start with a user data directory using the `--user-data-dir` argument. This will persist all browser data between the sessions.
519- Start with a storage state file using the `--storage-state` argument. This will load cookies and local storage from the file into an isolated browser context.
520 
521For the page state, you can use:
522 
523- `--init-page` to point to a TypeScript file that will be evaluated on the Playwright page object. This allows you to run arbitrary code to set up the page.
524 
525```ts
526// init-page.ts
527export default async ({ page }) => {
528 await page.context().grantPermissions(['geolocation']);
529 await page.context().setGeolocation({ latitude: 37.7749, longitude: -122.4194 });
530 await page.setViewportSize({ width: 1280, height: 720 });
531};
532```
533 
534- `--init-script` to point to a JavaScript file that will be added as an initialization script. The script will be evaluated in every page before any of the page's scripts.
535This is useful for overriding browser APIs or setting up the environment.
536 
537```js
538// init-script.js
539window.isPlaywrightMCP = true;
540```
541 
542### Configuration file
543 
544The Playwright MCP server can be configured using a JSON configuration file. You can specify the configuration file
545using the `--config` command line option:
546 
547```bash
548npx @playwright/mcp@latest --config path/to/config.json
549```
550 
551<details>
552<summary>Configuration file schema</summary>
553 
554<!--- Config generated by update-readme.js -->
555 
556```typescript
557{
558 /**
559 * The browser to use.
560 */
561 browser?: {
562 /**
563 * The type of browser to use.
564 */
565 browserName?: 'chromium' | 'firefox' | 'webkit';
566 
567 /**
568 * Keep the browser profile in memory, do not save it to disk.
569 */
570 isolated?: boolean;
571 
572 /**
573 * Path to a user data directory for browser profile persistence.
574 * Temporary directory is created by default.
575 */
576 userDataDir?: string;
577 
578 /**
579 * Launch options passed to
580 * @see https://playwright.dev/docs/api/class-browsertype#browser-type-launch-persistent-context
581 *
582 * This is useful for settings options like `channel`, `headless`, `executablePath`, etc.
583 */
584 launchOptions?: playwright.LaunchOptions;
585 
586 /**
587 * Context options for the browser context.
588 *
589 * This is useful for settings options like `viewport`.
590 */
591 contextOptions?: playwright.BrowserContextOptions;
592 
593 /**
594 * Chrome DevTools Protocol endpoint to connect to an existing browser instance in case of Chromium family browsers.
595 */
596 cdpEndpoint?: string;
597 
598 /**
599 * CDP headers to send with the connect request.
600 */
601 cdpHeaders?: Record<string, string>;
602 
603 /**
604 * Timeout in milliseconds for connecting to CDP endpoint. Defaults to 30000 (30 seconds). Pass 0 to disable timeout.
605 */
606 cdpTimeout?: number;
607 
608 /**
609 * Remote endpoint to connect to an existing Playwright server. May be a
610 * WebSocket URL string, or a [ConnectOptions] object that mirrors the
611 * `connectOptions` shape used by the test runner. When passed as an object,
612 * `exposeNetwork`, `headers`, `slowMo`, and `timeout` are forwarded to the
613 * underlying connect call.
614 */
615 remoteEndpoint?: string | playwright.ConnectOptions & { endpoint: string };
616 
617 /**
618 * Paths to TypeScript files to add as initialization scripts for Playwright page.
619 */
620 initPage?: string[];
621 
622 /**
623 * Paths to JavaScript files to add as initialization scripts.
624 * The scripts will be evaluated in every page before any of the page's scripts.
625 */
626 initScript?: string[];
627 },
628 
629 /**
630 * Connect to a running browser instance (Edge/Chrome only). If specified, `browser`
631 * config is ignored.
632 * Requires the "Playwright Extension" to be installed.
633 */
634 extension?: boolean;
635 
636 server?: {
637 /**
638 * The port to listen on for SSE or MCP transport.
639 */
640 port?: number;
641 
642 /**
643 * The host to bind the server to. Default is localhost. Use 0.0.0.0 to bind to all interfaces.
644 */
645 host?: string;
646 
647 /**
648 * The hosts this server is allowed to serve from. Defaults to the host server is bound to.
649 * This is not for CORS, but rather for the DNS rebinding protection.
650 */
651 allowedHosts?: string[];
652 },
653 
654 /**
655 * List of enabled tool capabilities. Possible values:
656 * - 'core': Core browser automation features.
657 * - 'pdf': PDF generation and manipulation.
658 * - 'vision': Coordinate-based interactions.
659 * - 'devtools': Developer tools features.
660 */
661 capabilities?: ToolCapability[];
662 
663 /**
664 * Whether to save the Playwright session into the output directory.
665 */
666 saveSession?: boolean;
667 
668 /**
669 * Whether to collect and expose the tools that a page registers through the
670 * experimental WebMCP API. Enabled by default.
671 */
672 webmcp?: boolean;
673 
674 /**
675 * Reuse the same browser context between all connected HTTP clients.
676 */
677 sharedBrowserContext?: boolean;
678 
679 /**
680 * Secrets are used to replace matching plain text in the tool responses to prevent the LLM
681 * from accidentally getting sensitive data. It is a convenience and not a security feature,
682 * make sure to always examine information coming in and from the tool on the client.
683 */
684 secrets?: Record<string, string>;
685 
686 /**
687 * The directory for automatically named output files, for example a screenshot taken without an
688 * explicit file name. Files with an explicit name are resolved against the workspace root instead
689 * and are not affected by this option.
690 */
691 outputDir?: string;
692 
693 /**
694 * Threshold for evicting old output files, in bytes.
695 */
696 outputMaxSize?: number;
697 
698 console?: {
699 /**
700 * The level of console messages to return. Each level includes the messages of more severe levels. Defaults to "info".
701 */
702 level?: 'error' | 'warning' | 'info' | 'debug';
703 },
704 
705 network?: {
706 /**
707 * List of origins to allow the browser to request. Default is to allow all. Origins matching both `allowedOrigins` and `blockedOrigins` will be blocked.
708 *
709 * Supported formats:
710 * - Full origin: `https://example.com:8080` - matches only that origin
711 * - Wildcard port: `http://localhost:*` - matches any port on localhost with http protocol
712 */
713 allowedOrigins?: string[];
714 
715 /**
716 * List of origins to block the browser to request. Origins matching both `allowedOrigins` and `blockedOrigins` will be blocked.
717 *
718 * Supported formats:
719 * - Full origin: `https://example.com:8080` - matches only that origin
720 * - Wildcard port: `http://localhost:*` - matches any port on localhost with http protocol
721 */
722 blockedOrigins?: string[];
723 };
724 
725 /**
726 * Specify the attribute to use for test ids, defaults to "data-testid".
727 */
728 testIdAttribute?: string;
729 
730 timeouts?: {
731 /*
732 * Configures default action timeout: https://playwright.dev/docs/api/class-page#page-set-default-timeout. Defaults to 5000ms.
733 */
734 action?: number;
735 
736 /*
737 * Configures default navigation timeout: https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout. Defaults to 60000ms.
738 */
739 navigation?: number;
740 
741 /**
742 * Configures default expect timeout: https://playwright.dev/docs/test-timeouts#expect-timeout. Defaults to 5000ms.
743 */
744 expect?: number;
745 
746 /**
747 * How long to wait after each action for triggered work (navigations, requests) to settle before responding. Defaults to 500ms.
748 */
749 settle?: number;
750 
751 /**
752 * Close the browser after this many milliseconds without a tool call, and relaunch it on the next one.
753 * Defaults to one hour for headless browsers Playwright launched, and to no timeout for headed or attached ones. Pass 0 to disable.
754 * The CLI shuts the whole session down instead of relaunching.
755 */
756 idle?: number;
757 };
758 
759 /**
760 * Whether to send image responses to the client. Can be "allow", "omit", or "only". Defaults to "allow".
761 * With "only", a response that carries an image consists of the image parts alone, without the text part.
762 */
763 imageResponses?: 'allow' | 'omit' | 'only';
764 
765 /**
766 * How file paths are rendered in tool results. Can be "relative" to the workspace root or "absolute". Defaults to "relative".
767 */
768 filePaths?: 'relative' | 'absolute';
769 
770 snapshot?: {
771 /**
772 * When taking snapshots for responses, specifies the mode to use.
773 */
774 mode?: 'full' | 'none';
775 
776 /**
777 * Whether to include each element's bounding box as [box=x,y,width,height] in snapshots.
778 * Coordinates are viewport-relative, in CSS pixels (Element.getBoundingClientRect).
779 */
780 boxes?: boolean;
781 };
782 
783 /**
784 * allowUnrestrictedFileAccess acts as a guardrail to prevent the LLM from accidentally
785 * wandering outside its intended workspace. It is a convenience defense to catch unintended
786 * file access, not a secure boundary; a deliberate attempt to reach other directories can be
787 * easily worked around, so always rely on client-level permissions for true security.
788 */
789 allowUnrestrictedFileAccess?: boolean;
790 
791 /**
792 * Specify the language to use for code generation.
793 */
794 codegen?: 'typescript' | 'python' | 'java' | 'csharp' | 'none';
795}
796```
797 
798<!--- End of config generated section -->
799 
800</details>
801 
802### Standalone MCP server
803 
804When running headed browser on system w/o display or from worker processes of the IDEs,
805run the MCP server from environment with the DISPLAY and pass the `--port` flag to enable HTTP transport.
806 
807```bash
808npx @playwright/mcp@latest --port 8931
809```
810 
811And then in MCP client config, set the `url` to the HTTP endpoint:
812 
813```js
814{
815 "mcpServers": {
816 "playwright": {
817 "url": "http://localhost:8931/mcp"
818 }
819 }
820}
821```
822 
823## Security
824 
825Playwright MCP is **not** a security boundary. See [MCP Security Best Practices](https://modelcontextprotocol.io/docs/tutorials/security/security_best_practices) for guidance on securing your deployment.
826 
827<details>
828<summary><b>Docker</b></summary>
829 
830**NOTE:** The Docker implementation only supports headless chromium at the moment.
831 
832```js
833{
834 "mcpServers": {
835 "playwright": {
836 "command": "docker",
837 "args": ["run", "-i", "--rm", "--init", "--pull=always", "mcr.microsoft.com/playwright/mcp"]
838 }
839 }
840}
841```
842 
843Or If you prefer to run the container as a long-lived service instead of letting the MCP client spawn it, use:
844 
845```
846docker run -d -i --rm --init --pull=always \
847 --entrypoint node \
848 --name playwright \
849 -p 8931:8931 \
850 mcr.microsoft.com/playwright/mcp \
851 /app/cli.js --headless --browser chromium --no-sandbox --port 8931 --host 0.0.0.0
852```
853 
854The server will listen on host port **8931** and can be reached by any MCP client.
855 
856You can build the Docker image yourself.
857 
858```
859docker build -t mcr.microsoft.com/playwright/mcp .
860```
861</details>
862 
863<details>
864<summary><b>Programmatic usage</b></summary>
865 
866```js
867import http from 'http';
868 
869import { createConnection } from '@playwright/mcp';
870import { SSEServerTransport } from '@modelcontextprotocol/sdk/server/sse.js';
871 
872http.createServer(async (req, res) => {
873 // ...
874 
875 // Creates a headless Playwright MCP server with SSE transport
876 const connection = await createConnection({ browser: { launchOptions: { headless: true } } });
877 const transport = new SSEServerTransport('/messages', res);
878 await connection.connect(transport);
879 
880 // ...
881});
882```
883</details>
884 
885### Tools
886 
887<!--- Tools generated by update-readme.js -->
888 
889<details>
890<summary><b>Core automation</b></summary>
891 
892<!-- NOTE: This has been generated via update-readme.js -->
893 
894- **browser_click**
895 - Title: Click
896 - Description: Perform click on a web page
897 - Parameters:
898 - `element` (string, optional): Human-readable element description used to obtain permission to interact with the element
899 - `target` (string): Exact target element reference from the page snapshot, or a unique element selector
900 - `doubleClick` (boolean, optional): Whether to perform a double click instead of a single click
901 - `button` (string, optional): Button to click, defaults to left
902 - `modifiers` (array, optional): Modifier keys to press
903 - Read-only: **false**
904 
905<!-- NOTE: This has been generated via update-readme.js -->
906 
907- **browser_close**
908 - Title: Close browser
909 - Description: Close the page
910 - Parameters: None
911 - Read-only: **false**
912 
913<!-- NOTE: This has been generated via update-readme.js -->
914 
915- **browser_console_messages**
916 - Title: Get console messages
917 - Description: Returns all console messages
918 - Parameters:
919 - `level` (string): Level of the console messages to return. Each level includes the messages of more severe levels. Defaults to "info".
920 - `all` (boolean, optional): Return all console messages since the beginning of the session, not just since the last navigation. Defaults to false.
921 - `filename` (string, optional): File name to save the console messages to. Relative file names are resolved against the workspace root. If not provided, messages are returned as text.
922 - Read-only: **true**
923 
924<!-- NOTE: This has been generated via update-readme.js -->
925 
926- **browser_drag**
927 - Title: Drag mouse
928 - Description: Perform drag and drop between two elements
929 - Parameters:
930 - `startElement` (string, optional): Human-readable source element description used to obtain the permission to interact with the element
931 - `startTarget` (string): Exact target element reference from the page snapshot, or a unique element selector
932 - `endElement` (string, optional): Human-readable target element description used to obtain the permission to interact with the element
933 - `endTarget` (string): Exact target element reference from the page snapshot, or a unique element selector
934 - Read-only: **false**
935 
936<!-- NOTE: This has been generated via update-readme.js -->
937 
938- **browser_drop**
939 - Title: Drop files or data onto an element
940 - Description: Drop files or MIME-typed data onto an element, as if dragged from outside the page. At least one of "paths" or "data" must be provided.
941 - Parameters:
942 - `element` (string, optional): Human-readable element description used to obtain permission to interact with the element
943 - `target` (string): Exact target element reference from the page snapshot, or a unique element selector
944 - `paths` (array, optional): Absolute paths to files to drop onto the element.
945 - `data` (object, optional): Data to drop, as a map of MIME type to string value (e.g. {"text/plain": "hello", "text/uri-list": "https://example.com"}).
946 - Read-only: **false**
947 
948<!-- NOTE: This has been generated via update-readme.js -->
949 
950- **browser_emulate_media**
951 - Title: Emulate media features
952 - Description: Emulate CSS media features for the page, for example switch between the light and dark color scheme. Omitted parameters are left unchanged; null clears an override.
953 - Parameters:
954 - `colorScheme` (optional): Emulates the prefers-color-scheme media feature
955 - `reducedMotion` (optional): Emulates the prefers-reduced-motion media feature
956 - `forcedColors` (optional): Emulates the forced-colors media feature
957 - `contrast` (optional): Emulates the prefers-contrast media feature
958 - `media` (optional): Changes the CSS media type of the page
959 - Read-only: **false**
960 
961<!-- NOTE: This has been generated via update-readme.js -->
962 
963- **browser_evaluate**
964 - Title: Evaluate JavaScript
965 - Description: Evaluate JavaScript expression on page or element
966 - Parameters:
967 - `element` (string, optional): Human-readable element description used to obtain permission to interact with the element
968 - `target` (string, optional): Exact target element reference from the page snapshot, or a unique element selector
969 - `function` (string): () => { /* code */ } or (element) => { /* code */ } when element is provided
970 - `filename` (string, optional): File name to save the result to. Relative file names are resolved against the workspace root. If not provided, result is returned as text.
971 - Read-only: **false**
972 
973<!-- NOTE: This has been generated via update-readme.js -->
974 
975- **browser_file_upload**
976 - Title: Upload files
977 - Description: Upload one or multiple files
978 - Parameters:
979 - `paths` (array, optional): The absolute paths to the files to upload. Can be single file or multiple files. If omitted, file chooser is cancelled.
980 - Read-only: **false**
981 
982<!-- NOTE: This has been generated via update-readme.js -->
983 
984- **browser_fill_form**
985 - Title: Fill form
986 - Description: Fill multiple form fields
987 - Parameters:
988 - `fields` (array): Fields to fill in
989 - Read-only: **false**
990 
991<!-- NOTE: This has been generated via update-readme.js -->
992 
993- **browser_find**
994 - Title: Find in page snapshot
995 - Description: Search the accessibility snapshot of the current page for text or a regular expression. Returns matching snapshot nodes with a few lines of surrounding context (like search snippets), each shown under its path from the root of the tree, which is cheaper than capturing the whole snapshot when you only need to locate an element and its ref.
996 - Parameters:
997 - `text` (string, optional): Plain text to search for in the page snapshot (case-insensitive substring match). Provide either text or regex, not both.
998 - `regex` (string, optional): Regular expression to search for in the page snapshot. Matching is case-sensitive by default; wrap the pattern in slashes to add flags, e.g. "/error/i" for case-insensitive. Provide either text or regex, not both.
999 - Read-only: **true**
1000 
1001<!-- NOTE: This has been generated via update-readme.js -->
1002 
1003- **browser_handle_dialog**
1004 - Title: Handle a dialog
1005 - Description: Handle a dialog
1006 - Parameters:
1007 - `accept` (boolean): Whether to accept the dialog.
1008 - `promptText` (string, optional): The text of the prompt in case of a prompt dialog.
1009 - Read-only: **false**
1010 
1011<!-- NOTE: This has been generated via update-readme.js -->
1012 
1013- **browser_hover**
1014 - Title: Hover mouse
1015 - Description: Hover over element on page
1016 - Parameters:
1017 - `element` (string, optional): Human-readable element description used to obtain permission to interact with the element
1018 - `target` (string): Exact target element reference from the page snapshot, or a unique element selector
1019 - Read-only: **false**
1020 
1021<!-- NOTE: This has been generated via update-readme.js -->
1022 
1023- **browser_navigate**
1024 - Title: Navigate to a URL
1025 - Description: Navigate to a URL
1026 - Parameters:
1027 - `url` (string): The URL to navigate to
1028 - Read-only: **false**
1029 
1030<!-- NOTE: This has been generated via update-readme.js -->
1031 
1032- **browser_navigate_back**
1033 - Title: Go back
1034 - Description: Go back to the previous page in the history
1035 - Parameters: None
1036 - Read-only: **false**
1037 
1038<!-- NOTE: This has been generated via update-readme.js -->
1039 
1040- **browser_network_request**
1041 - Title: Show network request details
1042 - Description: Returns full details (headers and body) of a single network request, or a single part if `part` is set. Use the number from browser_network_requests.
1043 - Parameters:
1044 - `index` (integer): 1-based index of the request, as printed by browser_network_requests.
1045 - `part` (string, optional): Return only this part of the request. Omit to return full details.
1046 - `filename` (string, optional): File name to save the result to. Relative file names are resolved against the workspace root. If not provided, output is returned as text.
1047 - Read-only: **true**
1048 
1049<!-- NOTE: This has been generated via update-readme.js -->
1050 
1051- **browser_network_requests**
1052 - Title: List network requests
1053 - Description: Returns a numbered list of network requests since loading the page. Use browser_network_request with the number to get full details.
1054 - Parameters:
1055 - `static` (boolean): Whether to include successful static resources like images, fonts, scripts, etc. Defaults to false.
1056 - `filter` (string, optional): Only return requests whose URL matches this regexp (e.g. "/api/.*user").
1057 - `filename` (string, optional): File name to save the network requests to. Relative file names are resolved against the workspace root. If not provided, requests are returned as text.
1058 - Read-only: **true**
1059 
1060<!-- NOTE: This has been generated via update-readme.js -->
1061 
1062- **browser_press_key**
1063 - Title: Press a key
1064 - Description: Press a key on the keyboard
1065 - Parameters:
1066 - `key` (string): Name of the key to press or a character to generate, such as `ArrowLeft` or `a`
1067 - Read-only: **false**
1068 
1069<!-- NOTE: This has been generated via update-readme.js -->
1070 
1071- **browser_resize**
1072 - Title: Resize browser window
1073 - Description: Resize the browser window
1074 - Parameters:
1075 - `width` (number): Width of the browser window
1076 - `height` (number): Height of the browser window
1077 - Read-only: **false**
1078 
1079<!-- NOTE: This has been generated via update-readme.js -->
1080 
1081- **browser_run_code_unsafe**
1082 - Title: Run Playwright code (unsafe)
1083 - Description: Run a Playwright code snippet. Unsafe: executes arbitrary JavaScript in the Playwright server process and is RCE-equivalent.
1084 - Parameters:
1085 - `code` (string, optional): A JavaScript function containing Playwright code to execute. It will be invoked with a single argument, page, which you can use for any page interaction. For example: `async (page) => { await page.getByRole('button', { name: 'Submit' }).click(); return await page.title(); }`
1086 - `filename` (string, optional): Load code from the specified file. Relative file names are resolved against the workspace root. If both code and filename are provided, code will be ignored.
1087 - Read-only: **false**
1088 
1089<!-- NOTE: This has been generated via update-readme.js -->
1090 
1091- **browser_select_option**
1092 - Title: Select option
1093 - Description: Select an option in a dropdown
1094 - Parameters:
1095 - `element` (string, optional): Human-readable element description used to obtain permission to interact with the element
1096 - `target` (string): Exact target element reference from the page snapshot, or a unique element selector
1097 - `values` (array): Array of values to select in the dropdown. This can be a single value or multiple values.
1098 - Read-only: **false**
1099 
1100<!-- NOTE: This has been generated via update-readme.js -->
1101 
1102- **browser_snapshot**
1103 - Title: Page snapshot
1104 - Description: Capture accessibility snapshot of the current page, this is better than screenshot
1105 - Parameters:
1106 - `target` (string, optional): Exact target element reference from the page snapshot, or a unique element selector
1107 - `filename` (string, optional): Save snapshot to a file instead of returning it in the response. Relative file names are resolved against the workspace root.
1108 - `depth` (number, optional): Limit the depth of the snapshot tree
1109 - `boxes` (boolean, optional): Include each element's bounding box as [box=x,y,width,height] in the snapshot. Coordinates are viewport-relative, in CSS pixels (Element.getBoundingClientRect)
1110 - Read-only: **true**
1111 
1112<!-- NOTE: This has been generated via update-readme.js -->
1113 
1114- **browser_take_screenshot**
1115 - Title: Take a screenshot
1116 - Description: Take a screenshot of the current page. You can't perform actions based on the screenshot, use browser_snapshot for actions.
1117 - Parameters:
1118 - `element` (string, optional): Human-readable element description used to obtain permission to interact with the element
1119 - `target` (string, optional): Exact target element reference from the page snapshot, or a unique element selector
1120 - `type` (string, optional): Image format for the screenshot. If unset, inferred from the filename extension, otherwise png.
1121 - `filename` (string, optional): File name to save the screenshot to. Relative file names are resolved against the workspace root. If not specified, the screenshot is saved into the output directory as `page-{timestamp}.{png|jpeg|webp}`.
1122 - `fullPage` (boolean, optional): When true, takes a screenshot of the full scrollable page, instead of the currently visible viewport. Cannot be used with element screenshots.
1123 - `scale` (string): Image resolution scale. "css" produces a screenshot sized in CSS pixels (smaller, consistent across devices). "device" produces a high-resolution screenshot using device pixels (larger, accounts for the device pixel ratio). Default is css.
1124 - Read-only: **true**
1125 
1126<!-- NOTE: This has been generated via update-readme.js -->
1127 
1128- **browser_type**
1129 - Title: Type text
1130 - Description: Type text into editable element
1131 - Parameters:
1132 - `element` (string, optional): Human-readable element description used to obtain permission to interact with the element
1133 - `target` (string): Exact target element reference from the page snapshot, or a unique element selector
1134 - `text` (string): Text to type into the element
1135 - `submit` (boolean, optional): Whether to submit entered text (press Enter after)
1136 - `slowly` (boolean, optional): Whether to type one character at a time. Useful for triggering key handlers in the page. By default entire text is filled in at once.
1137 - Read-only: **false**
1138 
1139<!-- NOTE: This has been generated via update-readme.js -->
1140 
1141- **browser_wait_for**
1142 - Title: Wait for
1143 - Description: Wait for text to appear or disappear or a specified time to pass
1144 - Parameters:
1145 - `time` (number, optional): The time to wait in seconds
1146 - `text` (string, optional): The text to wait for
1147 - `textGone` (string, optional): The text to wait for to disappear
1148 - Read-only: **false**
1149 
1150</details>
1151 
1152<details>
1153<summary><b>Tab management</b></summary>
1154 
1155<!-- NOTE: This has been generated via update-readme.js -->
1156 
1157- **browser_tabs**
1158 - Title: Manage tabs
1159 - Description: List, create, close, or select a browser tab.
1160 - Parameters:
1161 - `action` (string): Operation to perform
1162 - `index` (number, optional): Tab index, used for close/select. If omitted for close, current tab is closed.
1163 - `url` (string, optional): URL to navigate to in the new tab, used for new.
1164 - Read-only: **false**
1165 
1166</details>
1167 
1168<details>
1169<summary><b>Browser installation</b></summary>
1170 
1171</details>
1172 
1173<details>
1174<summary><b>Configuration (opt-in via --caps=config)</b></summary>
1175 
1176<!-- NOTE: This has been generated via update-readme.js -->
1177 
1178- **browser_get_config**
1179 - Title: Get config
1180 - Description: Get the final resolved config after merging CLI options, environment variables and config file.
1181 - Parameters: None
1182 - Read-only: **true**
1183 
1184</details>
1185 
1186<details>
1187<summary><b>Network (opt-in via --caps=network)</b></summary>
1188 
1189<!-- NOTE: This has been generated via update-readme.js -->
1190 
1191- **browser_network_state_set**
1192 - Title: Set network state
1193 - Description: Sets the browser network state to online or offline. When offline, all network requests will fail.
1194 - Parameters:
1195 - `state` (string): Set to "offline" to simulate offline mode, "online" to restore network connectivity
1196 - Read-only: **false**
1197 
1198<!-- NOTE: This has been generated via update-readme.js -->
1199 
1200- **browser_route**
1201 - Title: Mock network requests
1202 - Description: Set up a route to mock network requests matching a URL pattern
1203 - Parameters:
1204 - `pattern` (string): URL pattern to match (e.g., "**/api/users", "**/*.{png,jpg}")
1205 - `status` (number, optional): HTTP status code to return (default: 200)
1206 - `body` (string, optional): Response body (text or JSON string)
1207 - `contentType` (string, optional): Content-Type header (e.g., "application/json", "text/html")
1208 - `headers` (array, optional): Headers to add in "Name: Value" format
1209 - `removeHeaders` (string, optional): Comma-separated list of header names to remove from request
1210 - Read-only: **false**
1211 
1212<!-- NOTE: This has been generated via update-readme.js -->
1213 
1214- **browser_route_list**
1215 - Title: List network routes
1216 - Description: List all active network routes
1217 - Parameters: None
1218 - Read-only: **true**
1219 
1220<!-- NOTE: This has been generated via update-readme.js -->
1221 
1222- **browser_unroute**
1223 - Title: Remove network routes
1224 - Description: Remove network routes matching a pattern (or all routes if no pattern specified)
1225 - Parameters:
1226 - `pattern` (string, optional): URL pattern to unroute (omit to remove all routes)
1227 - Read-only: **false**
1228 
1229</details>
1230 
1231<details>
1232<summary><b>Storage (opt-in via --caps=storage)</b></summary>
1233 
1234<!-- NOTE: This has been generated via update-readme.js -->
1235 
1236- **browser_cookie_clear**
1237 - Title: Clear cookies
1238 - Description: Clear all cookies
1239 - Parameters: None
1240 - Read-only: **false**
1241 
1242<!-- NOTE: This has been generated via update-readme.js -->
1243 
1244- **browser_cookie_delete**
1245 - Title: Delete cookie
1246 - Description: Delete a specific cookie
1247 - Parameters:
1248 - `name` (string): Cookie name to delete
1249 - Read-only: **false**
1250 
1251<!-- NOTE: This has been generated via update-readme.js -->
1252 
1253- **browser_cookie_get**
1254 - Title: Get cookie
1255 - Description: Get a specific cookie by name
1256 - Parameters:
1257 - `name` (string): Cookie name to get
1258 - Read-only: **true**
1259 
1260<!-- NOTE: This has been generated via update-readme.js -->
1261 
1262- **browser_cookie_list**
1263 - Title: List cookies
1264 - Description: List all cookies (optionally filtered by domain/path)
1265 - Parameters:
1266 - `domain` (string, optional): Filter cookies by domain
1267 - `path` (string, optional): Filter cookies by path
1268 - Read-only: **true**
1269 
1270<!-- NOTE: This has been generated via update-readme.js -->
1271 
1272- **browser_cookie_set**
1273 - Title: Set cookie
1274 - Description: Set a cookie with optional flags (domain, path, expires, httpOnly, secure, sameSite)
1275 - Parameters:
1276 - `name` (string): Cookie name
1277 - `value` (string): Cookie value
1278 - `domain` (string, optional): Cookie domain
1279 - `path` (string, optional): Cookie path
1280 - `expires` (number, optional): Cookie expiration as Unix timestamp
1281 - `httpOnly` (boolean, optional): Whether the cookie is HTTP only
1282 - `secure` (boolean, optional): Whether the cookie is secure
1283 - `sameSite` (string, optional): Cookie SameSite attribute
1284 - Read-only: **false**
1285 
1286<!-- NOTE: This has been generated via update-readme.js -->
1287 
1288- **browser_localstorage_clear**
1289 - Title: Clear localStorage
1290 - Description: Clear all localStorage
1291 - Parameters: None
1292 - Read-only: **false**
1293 
1294<!-- NOTE: This has been generated via update-readme.js -->
1295 
1296- **browser_localstorage_delete**
1297 - Title: Delete localStorage item
1298 - Description: Delete a localStorage item
1299 - Parameters:
1300 - `key` (string): Key to delete
1301 - Read-only: **false**
1302 
1303<!-- NOTE: This has been generated via update-readme.js -->
1304 
1305- **browser_localstorage_get**
1306 - Title: Get localStorage item
1307 - Description: Get a localStorage item by key
1308 - Parameters:
1309 - `key` (string): Key to get
1310 - Read-only: **true**
1311 
1312<!-- NOTE: This has been generated via update-readme.js -->
1313 
1314- **browser_localstorage_list**
1315 - Title: List localStorage
1316 - Description: List all localStorage key-value pairs
1317 - Parameters: None
1318 - Read-only: **true**
1319 
1320<!-- NOTE: This has been generated via update-readme.js -->
1321 
1322- **browser_localstorage_set**
1323 - Title: Set localStorage item
1324 - Description: Set a localStorage item
1325 - Parameters:
1326 - `key` (string): Key to set
1327 - `value` (string): Value to set
1328 - Read-only: **false**
1329 
1330<!-- NOTE: This has been generated via update-readme.js -->
1331 
1332- **browser_sessionstorage_clear**
1333 - Title: Clear sessionStorage
1334 - Description: Clear all sessionStorage
1335 - Parameters: None
1336 - Read-only: **false**
1337 
1338<!-- NOTE: This has been generated via update-readme.js -->
1339 
1340- **browser_sessionstorage_delete**
1341 - Title: Delete sessionStorage item
1342 - Description: Delete a sessionStorage item
1343 - Parameters:
1344 - `key` (string): Key to delete
1345 - Read-only: **false**
1346 
1347<!-- NOTE: This has been generated via update-readme.js -->
1348 
1349- **browser_sessionstorage_get**
1350 - Title: Get sessionStorage item
1351 - Description: Get a sessionStorage item by key
1352 - Parameters:
1353 - `key` (string): Key to get
1354 - Read-only: **true**
1355 
1356<!-- NOTE: This has been generated via update-readme.js -->
1357 
1358- **browser_sessionstorage_list**
1359 - Title: List sessionStorage
1360 - Description: List all sessionStorage key-value pairs
1361 - Parameters: None
1362 - Read-only: **true**
1363 
1364<!-- NOTE: This has been generated via update-readme.js -->
1365 
1366- **browser_sessionstorage_set**
1367 - Title: Set sessionStorage item
1368 - Description: Set a sessionStorage item
1369 - Parameters:
1370 - `key` (string): Key to set
1371 - `value` (string): Value to set
1372 - Read-only: **false**
1373 
1374<!-- NOTE: This has been generated via update-readme.js -->
1375 
1376- **browser_set_storage_state**
1377 - Title: Restore storage state
1378 - Description: Restore storage state (cookies, local storage) from a file. This clears existing cookies and local storage before restoring.
1379 - Parameters:
1380 - `filename` (string): Path to the storage state file to restore from. Relative file names are resolved against the workspace root.
1381 - Read-only: **false**
1382 
1383<!-- NOTE: This has been generated via update-readme.js -->
1384 
1385- **browser_storage_state**
1386 - Title: Save storage state
1387 - Description: Save storage state (cookies, local storage) to a file for later reuse
1388 - Parameters:
1389 - `filename` (string, optional): File name to save the storage state to. Relative file names are resolved against the workspace root. If not specified, the storage state is saved into the output directory as `storage-state-{timestamp}.json`.
1390 - Read-only: **true**
1391 
1392</details>
1393 
1394<details>
1395<summary><b>DevTools (opt-in via --caps=devtools)</b></summary>
1396 
1397<!-- NOTE: This has been generated via update-readme.js -->
1398 
1399- **browser_annotate**
1400 - Title: Annotate the current page
1401 - Description: Open the Playwright Dashboard in annotation mode for the current page and wait for the user to draw annotations. Returns the annotated screenshot, ARIA snapshot, and the list of annotations.
1402 - Parameters: None
1403 - Read-only: **true**
1404 
1405<!-- NOTE: This has been generated via update-readme.js -->
1406 
1407- **browser_hide_highlight**
1408 - Title: Hide element highlight
1409 - Description: Remove a highlight overlay previously added for the element.
1410 - Parameters:
1411 - `element` (string, optional): Human-readable element description used when adding the highlight; must match the value passed to browser_highlight.
1412 - `target` (string, optional): Exact target element reference from the page snapshot, or a unique element selector
1413 - Read-only: **true**
1414 
1415<!-- NOTE: This has been generated via update-readme.js -->
1416 
1417- **browser_highlight**
1418 - Title: Highlight element
1419 - Description: Show a persistent highlight overlay around the element on the page.
1420 - Parameters:
1421 - `element` (string, optional): Human-readable element description used to obtain permission to interact with the element
1422 - `target` (string): Exact target element reference from the page snapshot, or a unique element selector
1423 - `style` (string, optional): Additional inline CSS applied to the highlight overlay, e.g. "outline: 2px dashed red".
1424 - Read-only: **true**
1425 
1426<!-- NOTE: This has been generated via update-readme.js -->
1427 
1428- **browser_resume**
1429 - Title: Resume paused script execution
1430 - Description: Resume script execution after it was paused. When called with step set to true, execution will pause again before the next action.
1431 - Parameters:
1432 - `step` (boolean, optional): When true, execution will pause again before the next action, allowing step-by-step debugging.
1433 - `location` (string, optional): Pause execution at a specific <file>:<line>, e.g. "example.spec.ts:42".
1434 - Read-only: **false**
1435 
1436<!-- NOTE: This has been generated via update-readme.js -->
1437 
1438- **browser_start_recording**
1439 - Title: Start recording user actions
1440 - Description: Start recording actions that the user performs in the browser as Playwright code. Use it when the user wants to demonstrate a flow manually. Call browser_stop_recording when the user says they are done to retrieve the recorded actions.
1441 - Parameters: None
1442 - Read-only: **true**
1443 
1444<!-- NOTE: This has been generated via update-readme.js -->
1445 
1446- **browser_start_tracing**
1447 - Title: Start tracing
1448 - Description: Start trace recording
1449 - Parameters: None
1450 - Read-only: **true**
1451 
1452<!-- NOTE: This has been generated via update-readme.js -->
1453 
1454- **browser_start_video**
1455 - Title: Start video
1456 - Description: Start video recording
1457 - Parameters:
1458 - `filename` (string, optional): File name to save the video to. Relative file names are resolved against the workspace root. If not specified, the video is saved into the output directory as `video-{timestamp}.webm`.
1459 - `size` (object, optional): Video size
1460 - `fps` (number, optional): Video frame rate in frames per second, defaults to 25
1461 - `cursor` (boolean, optional): Render an animated mouse cursor that travels to each action point. Paces actions by 800ms so that the cursor has time to travel.
1462 - Read-only: **true**
1463 
1464<!-- NOTE: This has been generated via update-readme.js -->
1465 
1466- **browser_stop_recording**
1467 - Title: Stop recording user actions
1468 - Description: Stop the recording started with browser_start_recording and return the recorded actions as Playwright code.
1469 - Parameters: None
1470 - Read-only: **true**
1471 
1472<!-- NOTE: This has been generated via update-readme.js -->
1473 
1474- **browser_stop_tracing**
1475 - Title: Stop tracing
1476 - Description: Stop trace recording
1477 - Parameters: None
1478 - Read-only: **true**
1479 
1480<!-- NOTE: This has been generated via update-readme.js -->
1481 
1482- **browser_stop_video**
1483 - Title: Stop video
1484 - Description: Stop video recording
1485 - Parameters: None
1486 - Read-only: **true**
1487 
1488<!-- NOTE: This has been generated via update-readme.js -->
1489 
1490- **browser_video_chapter**
1491 - Title: Video chapter
1492 - Description: Add a chapter marker to the video recording. Shows a full-screen chapter card with blurred backdrop.
1493 - Parameters:
1494 - `title` (string): Chapter title
1495 - `description` (string, optional): Chapter description
1496 - `duration` (number, optional): Duration in milliseconds to show the chapter card
1497 - Read-only: **true**
1498 
1499<!-- NOTE: This has been generated via update-readme.js -->
1500 
1501- **browser_video_hide_actions**
1502 - Title: Hide action overlays
1503 - Description: Stop annotating actions performed on the page.
1504 - Parameters: None
1505 - Read-only: **true**
1506 
1507<!-- NOTE: This has been generated via update-readme.js -->
1508 
1509- **browser_video_show_actions**
1510 - Title: Show action overlays
1511 - Description: Annotate subsequent actions performed on the page with a callout that names the action and, when styled, marks the action point and highlights the target element. Useful while video recording or screencasting.
1512 - Parameters:
1513 - `duration` (number, optional): How long each action annotation stays on screen, in milliseconds. Defaults to 500.
1514 - `position` (string, optional): Where to place the action title relative to the page. Defaults to top-right.
1515 - `cursor` (string, optional): Cursor decoration for pointer actions. "pointer" (default) animates a mouse pointer from the previous action point to the next one; "none" disables the cursor decoration.
1516 - `style` (object, optional): Styles of the action decorations.
1517 - Read-only: **true**
1518 
1519</details>
1520 
1521<details>
1522<summary><b>Coordinate-based (opt-in via --caps=vision)</b></summary>
1523 
1524<!-- NOTE: This has been generated via update-readme.js -->
1525 
1526- **browser_mouse_click_xy**
1527 - Title: Click
1528 - Description: Click mouse button at a given position
1529 - Parameters:
1530 - `x` (number): X coordinate
1531 - `y` (number): Y coordinate
1532 - `button` (string, optional): Button to click, defaults to left
1533 - `clickCount` (number, optional): Number of clicks, defaults to 1
1534 - `delay` (number, optional): Time to wait between mouse down and mouse up in milliseconds, defaults to 0
1535 - Read-only: **false**
1536 
1537<!-- NOTE: This has been generated via update-readme.js -->
1538 
1539- **browser_mouse_down**
1540 - Title: Press mouse down
1541 - Description: Press mouse down
1542 - Parameters:
1543 - `button` (string, optional): Button to press, defaults to left
1544 - Read-only: **false**
1545 
1546<!-- NOTE: This has been generated via update-readme.js -->
1547 
1548- **browser_mouse_drag_xy**
1549 - Title: Drag mouse
1550 - Description: Drag left mouse button to a given position
1551 - Parameters:
1552 - `startX` (number): Start X coordinate
1553 - `startY` (number): Start Y coordinate
1554 - `endX` (number): End X coordinate
1555 - `endY` (number): End Y coordinate
1556 - Read-only: **false**
1557 
1558<!-- NOTE: This has been generated via update-readme.js -->
1559 
1560- **browser_mouse_move_xy**
1561 - Title: Move mouse
1562 - Description: Move mouse to a given position
1563 - Parameters:
1564 - `x` (number): X coordinate
1565 - `y` (number): Y coordinate
1566 - Read-only: **false**
1567 
1568<!-- NOTE: This has been generated via update-readme.js -->
1569 
1570- **browser_mouse_up**
1571 - Title: Press mouse up
1572 - Description: Press mouse up
1573 - Parameters:
1574 - `button` (string, optional): Button to press, defaults to left
1575 - Read-only: **false**
1576 
1577<!-- NOTE: This has been generated via update-readme.js -->
1578 
1579- **browser_mouse_wheel**
1580 - Title: Scroll mouse wheel
1581 - Description: Scroll mouse wheel
1582 - Parameters:
1583 - `deltaX` (number): X delta
1584 - `deltaY` (number): Y delta
1585 - Read-only: **false**
1586 
1587</details>
1588 
1589<details>
1590<summary><b>PDF generation (opt-in via --caps=pdf)</b></summary>
1591 
1592<!-- NOTE: This has been generated via update-readme.js -->
1593 
1594- **browser_pdf_save**
1595 - Title: Save as PDF
1596 - Description: Save page as PDF
1597 - Parameters:
1598 - `filename` (string, optional): File name to save the pdf to. Relative file names are resolved against the workspace root. If not specified, the pdf is saved into the output directory as `page-{timestamp}.pdf`.
1599 - Read-only: **true**
1600 
1601</details>
1602 
1603<details>
1604<summary><b>Test assertions (opt-in via --caps=testing)</b></summary>
1605 
1606<!-- NOTE: This has been generated via update-readme.js -->
1607 
1608- **browser_generate_locator**
1609 - Title: Create locator for element
1610 - Description: Generate locator for the given element to use in tests
1611 - Parameters:
1612 - `element` (string, optional): Human-readable element description used to obtain permission to interact with the element
1613 - `target` (string): Exact target element reference from the page snapshot, or a unique element selector
1614 - Read-only: **true**
1615 
1616<!-- NOTE: This has been generated via update-readme.js -->
1617 
1618- **browser_verify_element_visible**
1619 - Title: Verify element visible
1620 - Description: Verify element is visible on the page
1621 - Parameters:
1622 - `role` (string): ROLE of the element. Can be found in the snapshot like this: `- {ROLE} "Accessible Name":`
1623 - `accessibleName` (string): ACCESSIBLE_NAME of the element. Can be found in the snapshot like this: `- role "{ACCESSIBLE_NAME}"`
1624 - Read-only: **false**
1625 
1626<!-- NOTE: This has been generated via update-readme.js -->
1627 
1628- **browser_verify_list_visible**
1629 - Title: Verify list visible
1630 - Description: Verify list is visible on the page
1631 - Parameters:
1632 - `element` (string): Human-readable list description
1633 - `target` (string): Exact target element reference that points to the list
1634 - `items` (array): Items to verify
1635 - Read-only: **false**
1636 
1637<!-- NOTE: This has been generated via update-readme.js -->
1638 
1639- **browser_verify_text_visible**
1640 - Title: Verify text visible
1641 - Description: Verify text is visible on the page. Prefer browser_verify_element_visible if possible.
1642 - Parameters:
1643 - `text` (string): TEXT to verify. Can be found in the snapshot like this: `- role "Accessible Name": {TEXT}` or like this: `- text: {TEXT}`
1644 - Read-only: **false**
1645 
1646<!-- NOTE: This has been generated via update-readme.js -->
1647 
1648- **browser_verify_value**
1649 - Title: Verify value
1650 - Description: Verify element value
1651 - Parameters:
1652 - `type` (string): Type of the element
1653 - `element` (string): Human-readable element description
1654 - `target` (string): Exact target element reference from the page snapshot
1655 - `value` (string): Value to verify. For checkbox, use "true" or "false".
1656 - Read-only: **false**
1657 
1658</details>
1659 
1660 
1661<!--- End of tools generated section -->
1662 

Discussion

Alternatives

Also in Agents & MCP