Skip to main content
Glama

Playwright MCP Humanized šŸ¤–

A 100% drop-in replacement for Microsoft's @playwright/mcp that adds stealth anti-bot capabilities to AI agents.

By default, AI agents utilizing Playwright MCP operate completely like bots: cursor movements instantly teleport to coordinates, scrolling happens abruptly via CDP, and typing fills inputs in 0ms. This gets your agent immediately blocked by Cloudflare, DataDome, PerimeterX, and generic bot protection systems.

This project wraps Playwright's browser and context at runtime to automatically inject human-like behavior into the MCP layer:

āœ… Curved Mouse Movements: Injects Bezier-curve cursor paths using ghost-cursor-playwright. āœ… Humanized Typing (fill() override): Types character-by-character with a log-normal distribution (30-150ms per keystroke) + longer pauses at word boundaries. āœ… Randomized Clicks: Clicks inside the element's bounding box are varied dynamically. āœ… Auto-Scroll Fix: Manual, chunked mouse.wheel() scroll-to-reveal overrides Playwright's instantaneous CDP leaps. āœ… Dropdown Scanning: selectOption() pauses for 150-350ms to simulate the user visually scanning options before clicking. āœ… Complete Scope Penetration: The humanized locators recursively propagate through page.locator(), filter(), nth(), and even penetrate frameLocator().

Fork note (v1.1.0, 2026-09-05): Ported to Playwright 1.63.0-alpha-2026-08-31 so --extension mode speaks MCP extension protocol v2 (required by the current Playwright Chrome extension). Upstream 1.0.0 is pinned to 1.59.0-alpha / protocol v1 and fails with "The client uses an unsupported protocol version." Changes: dependency bump; entry points now import decorateMCPCommand / createConnection from playwright-core/lib/coreBundle (Microsoft moved them out of playwright/lib/mcp). Humanizer (patch.js, humanize.js) unchanged.

⚔ Setup / Installation

Because this tool shares the same API as @playwright/mcp, all you have to do is change the command pointing to your MCP configuration in Claude Desktop, OpenCode, or Cursor.

Install this fork from GitHub

{
  "mcpServers": {
    "playwright-bridge": {
      "command": "npx",
      "args": [
        "-y",
        "-p", "github:nicholasjayantylearns/playwright-mcp-humanized",
        "playwright-mcp-humanized",
        "--extension"
      ],
      "env": {
        "PLAYWRIGHT_MCP_EXTENSION_TOKEN": "YOUR_EXTENSION_TOKEN"
      }
    }
  }
}

-p <package> <bin> is required for tarball or GitHub specs — the package ships two bins, so npx cannot infer which one to run and will otherwise try to execute the spec string itself. Get the token from the Playwright Extension's options page in the Chrome profile you automate with.

With npx from npm (upstream 1.0.0 — protocol v1, does not work with the current extension)

Just change your config command to point to playwright-mcp-humanized:

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

With Playwright Bridge Extension (Connect to your real browser session)

If you're using Microsoft's Playwright Chrome Extension to connect to your actively logged-in Chrome session, this works perfectly out-of-the-box! Just pass the --extension flag and your token as usual:

{
  "mcpServers": {
    "playwright-extension": {
      "command": "npx",
      "args": [
        "-y",
        "playwright-mcp-humanized",
        "--extension"
      ],
      "env": {
        "PLAYWRIGHT_MCP_EXTENSION_TOKEN": "YOUR_EXTENSION_TOKEN"
      }
    }
  }
}

Related MCP server: CloakBrowser MCP

How It Works

This project does not fork the internal protocol engine of Microsoft's MCP server. Doing so would mean missing out on upstream updates to the core MCP layer.

Instead, we monkey-patch Playwright at runtime. Before the MCP server initializes:

  1. We intercept playwright.chromium.launch(), connect(), and connectOverCDP().

  2. We wrap new Contexts and Pages.

  3. We override the raw page.mouse and page.locator() APIs with humanize.js.

  4. The MCP protocol handles standard parsing, while our interceptors translate its final actions into stealthy ones.

Credits & Dependencies


Built out of necessity to stop our AI agents from getting instantly IP banned.

Available Tools

24 tools
browser_clickB
Destructive

Perform click on a web page

Inputs: target (required), button, element, modifiers, +1 more.

browser_closeB
Destructive

Close the page

Inputs: no named parameters.

browser_console_messagesB
Read-only

Returns all console messages

Inputs: level (required), all, filename.

browser_dragA
Destructive

Perform drag and drop between two elements

Inputs: endTarget (required), startTarget (required), endElement, startElement.

browser_dropA
Destructive

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.

Inputs: target (required), data, paths, element.

browser_evaluateB
Destructive

Evaluate JavaScript expression on page or element

Inputs: function (required), target, element, filename.

browser_file_uploadB
Destructive

Upload one or multiple files

Inputs: paths.

browser_fill_formB
Destructive

Fill multiple form fields

Inputs: fields (required).

browser_findA
Read-only

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.

Inputs: text, regex.

browser_handle_dialogC
Destructive

Handle a dialog

Inputs: accept (required), promptText.

browser_hoverA
Destructive

Hover over element on page

Inputs: target (required), element.

browser_navigateC
Destructive

Navigate to a URL

Inputs: url (required).

browser_navigate_backA
Destructive

Go back to the previous page in the history

Inputs: no named parameters.

browser_network_requestA
Read-only

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.

Inputs: index (required), part, filename.

browser_network_requestsA
Read-only

Returns a numbered list of network requests since loading the page. Use browser_network_request with the number to get full details.

Inputs: static (required), filter, filename.

browser_press_keyB
Destructive

Press a key on the keyboard

Inputs: key (required).

browser_resizeB
Destructive

Resize the browser window

Inputs: width (required), height (required).

browser_run_code_unsafeA
Destructive

Run a Playwright code snippet. Unsafe: executes arbitrary JavaScript in the Playwright server process and is RCE-equivalent.

Inputs: code, filename.

browser_select_optionB
Destructive

Select an option in a dropdown

Inputs: target (required), values (required), element.

browser_snapshotB
Read-only

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

Inputs: boxes, depth, target, filename.

browser_tabsA
Destructive

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

Inputs: action (required), url, index.

browser_take_screenshotA
Read-only

Take a screenshot of the current page. You can't perform actions based on the screenshot, use browser_snapshot for actions.

Inputs: scale (required), type, target, element, +2 more.

browser_typeB
Destructive

Type text into editable element

Inputs: text (required), target (required), slowly, submit, +1 more.

browser_wait_forA
Read-only

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

Inputs: text, time, textGone.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 24 tools

    Disambiguation4/5

    Most tools are clearly distinct (navigate, click, snapshot, screenshot, wait, tabs), but a few pairs could be confused: browser_evaluate vs browser_run_code_unsafe both execute JavaScript, and browser_drag vs browser_drop both describe drag/drop behavior. The descriptions do enough to clarify most boundaries.

    Naming Consistency4/5

    All tools share the consistent browser_ prefix and snake_case style, which creates a predictable pattern. Minor deviations exist where some tools are noun-phrases rather than verb commands (browser_network_requests, browser_tabs, browser_snapshot), but these are not disruptive.

    Tool Count3/5

    At 24 tools, the set is on the heavy side for the border of the recommended range. The domain is broad enough to justify many of them, but there is some redundancy (fill_form vs type, drag vs drop, evaluate vs run_code_unsafe) that makes the count feel slightly inflated.

    Completeness4/5

    The set covers the major browser automation lifecycle: navigation, interaction, form filling, waiting, snapshots, screenshots, console/network inspection, dialogs, tabs, and uploads. The main gap is browser forward navigation, and there is no dedicated reload action, but these can be worked around with browser_navigate or browser_run_code_unsafe.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      C
      quality
      B
      maintenance
      An MCP server that provides a stealth-enhanced Playwright browser automation engine with anti-detection features, enabling AI agents to navigate websites, interact with elements, and bypass anti-bot systems.
      24
      92 PyPI
      4
      Apache 2.0
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI agents to drive a Playwright-compatible browser (with humanized mouse, keyboard, and scroll behavior, persistent profiles, extensions, and GeoIP-aware proxies) to research the web, automate daily tasks, and run tests, with unchanged upstream @playwright/mcp tools plus two local introspection tools. It installs via npm or Docker and speaks stdio or Streamable HTTP.
      297 npm
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI agents to automate a real Chromium browser through the unchanged upstream Playwright MCP tool surface, covering navigation, research, testing, and daily web workflows in plain language. It ships via npm or Docker over stdio or Streamable HTTP, and supports persistent login profiles, Chrome extension loading, proxy/GeoIP matching, and humanized mouse, keyboard, and scroll behavior.
      297 npm
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI agents and MCP clients to automate real browser sessions through Playwright-compatible tools, including web research, testing, persistent profiles, proxy matching, and humanized interactions, with npm, Docker, stdio, and Streamable HTTP deployment options.
      297 npm
      MIT