Skip to content

MCP server

Playwright MCP server

Microsoft's Playwright MCP server lets AI drive a real browser: open pages, read them, click, type, fill forms and take screenshots.

At a glance

Maintained by
Microsoft
Tools exposed
10 listed below
Reviewed
September 24, 2026

Why it matters

What it does and why it matters

Playwright is Microsoft's widely used browser automation library, and its MCP server gives an AI assistant a real browser to work with. The assistant reads each page through a structured snapshot of the page's accessibility tree rather than by guessing from a screenshot, which makes its clicks and form fills more reliable.

That opens up two kinds of work. Development teams use it to test their own web apps by describing a flow in plain English. Business teams use it for tasks on sites that have no API, such as checking a supplier portal or collecting public information.

A browser is a powerful tool to hand to an agent. It can click buttons, submit forms and run JavaScript on a page. We run it without saved logins, limit which sites it may visit and review any action that submits data. For your own apps, point it at a test environment, not production.

Web pages are untrusted content and may contain text meant to redirect an agent. Keep the task narrow and do not let page content decide what the agent does next without a check.

Use cases

Best business use cases

Test web apps

Describe a user flow and let the assistant walk through it and report problems.

Visual checks

Take screenshots of key pages after a release.

Portals without APIs

Read information from supplier or partner portals that offer no API.

Public data collection

Collect public prices or listings where allowed. See price monitoring.

Reproduce bugs

Follow the steps from a bug report to reproduce the problem.

Tools

Available tools

Tool names as published by the maintainer at review time. Versions change, so check the repository for the current list.

Read and write: Read and write: reads page content and can click, type, submit forms and run JavaScript in a real browser.

  • browser_navigate

    Go to a URL.

  • browser_snapshot

    Capture an accessibility snapshot of the current page.

  • browser_click

    Click an element on the page.

  • browser_type

    Type text into an editable element.

  • browser_fill_form

    Fill several form fields at once.

  • browser_take_screenshot

    Take a screenshot of the current page.

  • browser_evaluate

    Run JavaScript on the page or an element.

  • browser_network_requests

    List network requests since the page loaded.

  • browser_tabs

    List, create, close or select browser tabs.

  • browser_wait_for

    Wait for text to appear or disappear, or for a set time.

Workflows

Example workflows

Check a signup flow after a release

  1. 1

    Point the server at the staging site.

  2. 2

    Ask the assistant to sign up as a new test user.

  3. 3

    It fills the form and follows the confirmation steps.

  4. 4

    It reports errors and takes screenshots.

  5. 5

    A developer reviews the findings.

Read an order status from a portal

  1. 1

    Give the assistant a portal page and a reference number.

  2. 2

    It moves through and searches the portal.

  3. 3

    It reads the status from the page.

  4. 4

    It returns the status and a screenshot.

  5. 5

    No data is submitted except the search.

Prompts

Example prompts

  • “Open our staging site, sign up as a new user and tell me where the flow is confusing.”

  • “Take screenshots of the home, pricing and contact pages at mobile width.”

  • “Search this supplier portal for order 48213 and tell me its status.”

Setup

Installation and configuration

Examples for Claude Desktop and Claude Code. Replace the placeholder values with your own keys, and store secrets outside version control.

Claude Desktop: claude_desktop_config.json

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

Claude Code: terminal

claude mcp add playwright npx @playwright/mcp@latest
  • Local server: stdio; @playwright/mcp; mcr.microsoft.com/playwright/mcp.

Security

Security considerations

  • Limit sites

    Restrict which sites the browser may open where possible.

  • No saved logins

    Do not give the agent sessions it does not need.

  • Untrusted pages

    Treat page text as data, not instructions.

  • Review submissions

    Require approval before the agent submits forms that matter.

Related servers

Servers that pair well with it

Browserbase

Browserbase's hosted MCP server gives AI a cloud browser that can browse, act on pages, observe elements and extract data.

Firecrawl

Firecrawl's official MCP server lets AI scrape, map, crawl and search the web and get clean, AI-ready content back.

Fetch

The MCP project's reference Fetch server lets AI download a web page and read it as clean text or markdown.

Keep exploring

FAQ

Questions people ask us

Have a question that is not here? Ask us directly.

Start a project

Want this connected to your own systems? We build AI workflows with MCP.

Send a short brief. We reply with questions, a suggested plan and an estimate you can compare with other offers.

Your privacy choices

We use necessary storage to run this site. With your permission we also use Google Analytics to see which pages help people, and load maps from Google. You can change this at any time. Read the cookie policy.