Playwright MCP Server

Dynamic network chaos in Playwright: 503s, latency, mid-flight drops

Local serverstdioTypeScript

What is the Playwright MCP Server?

Dynamic network chaos in Playwright: 503s, latency, mid-flight drops

What you get

An MCP server that gives AI agents dynamic network chaos control over Playwright browser sessions.

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
simulate_api_failureIntercepts requests matching a pattern and forces them to return an error status code. Checks if the app shows a fallback UI.
inject_latencyAdds artificial delay to matching requests. Checks if loading states appear while the app waits.
block_resourcesAborts requests to specified URL patterns — for testing third-party outages (analytics, CDNs, tracking pixels).
simulate_network_dropAborts requests mid-flight after a delay — simulating connection loss between request and response.
trigger_system_network_errorAborts requests with an OS-level error code — simulating DNS failures, firewall blocks, and connection resets.
simulate_stateful_failureFails the first N requests then lets subsequent ones succeed — testing retry logic and recovery flows.
inject_response_corruptionServes malformed responses at the protocol level — unterminated JSON, content-length lies, or truncated payloads.
assert_chaos_handledInjects a chaos HTTP status and returns a structured pass/fail verdict — chaos_survived is true only when the fallback UI appears and there are no unhandled JS exceptions.

How to install the Playwright MCP Server

{
  "mcpServers": {
    "playwright-network-chaos-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "playwright-network-chaos-mcp"
      ]
    }
  }
}

From the project documentation. Replace placeholders and example paths before connecting.

Example prompts to try

  • “Use Playwright to simulate api failure.”
  • “Use Playwright to inject latency.”
  • “Use Playwright to block resources.”

Frequently asked questions

Dynamic network chaos in Playwright: 503s, latency, mid-flight drops Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.