Playwright MCP Server

Browser automation using Playwright and structured accessibility snapshots.

★ 4apify/actor-playwright-mcp ↗by apifyupdated
Manual setup required. The maintainer's config contains paths only you know - edit the placeholders below before adding it to Claude Code.
1

Prepare the server locally

Run this once before adding it to Claude Code.

git clone https://github.com/apify/actor-playwright-mcp
cd actor-playwright-mcp

Then follow the repository README for any remaining dependency or build steps.

2

Register it in Claude Code

claude mcp add --transport http -H "Authorization: Bearer YOUR_APIFY_TOKEN" playwright-mcp-6659 https://jiri-spilka--playwright-mcp-server.apify.actor/mcp

Replace any placeholder paths in the command with the real path on your machine.

Required:Authorization
3

Make your agent remember this setup

playwright-mcp-6659's config, env vars, and the gotchas you hit — recalled in every future Claude Code, Cursor, and Codex session.

npx conare@latest

Free · one command · indexes the sessions already on disk. Set up in the browser instead →

What it does

  • Uses Playwright's accessibility tree for faster, lighter operation
  • Works with structured data without requiring vision models
  • Deterministic tool application for reliable browser interaction
  • Supports Apify Proxy for advanced network routing

Tools 6

browser_clickPerform click on a web page
browser_closeClose the page
browser_console_messagesReturns all console messages
browser_dragPerform drag and drop between two elements
browser_evaluateEvaluate JavaScript expression on page or element
browser_file_uploadUpload one or multiple files

Environment Variables

AuthorizationrequiredBearer token for Apify API authentication

Try it

Navigate to https://example.com and extract the main heading and all links.
Fill out the contact form on the current page with my name and email address.
Click the 'Submit' button on the page and wait for the confirmation message.
Evaluate the page content to find all elements with a specific class name.
Upload the file at /path/to/document.pdf to the file input field on the page.
Original README from apify/actor-playwright-mcp

Playwright MCP Server

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.

About this MCP Server: To understand how to connect to and utilize this MCP server, you can refer to the official Model Context Protocol documentation at mcp.apify.com.

Connection URL

MCP clients can connect to this server at:

https://jiri-spilka--playwright-mcp-server.apify.actor/mcp

Client Configuration

To connect to this MCP server, use the following configuration in your MCP client:

{
  "mcpServers": {
    "playwright": {
      "url": "https://jiri-spilka--playwright-mcp-server.apify.actor/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_APIFY_TOKEN"
      }
    }
  }
}

Note: Replace YOUR_APIFY_TOKEN with your actual Apify API token. You can find your token in the Apify Console.

Links

🚩 Claim this MCP server

All credits to the original authors of https://github.com/microsoft/playwright-mcp To claim this server, please write to [email protected].

Key features

  • 🚀 Uses Playwright's accessibility tree instead of pixel-based input for faster, lighter operation
  • 📊 Works with structured data only - no vision models required
  • 🎯 Applies tools deterministically, avoiding the ambiguity of screenshot approaches
  • 🌐 Supports Apify Proxy (datacenter, residential, custom) and other Apify features

Use cases

  • 🌐 Web navigation and form filling
  • 📋 Structured data extraction
  • 🧪 LLM-driven automated testing
  • 🤖 Browser automation for AI agents

Tools ([source](https://github.com/microsoft/playwright-mcp))

Tools

<details> <summary><b>Core automation</b></summary>
  • browser_click

    • Title: Click
    • Description: Perform click on a web page
    • Parameters:
      • element (string): Human-readable element description used to obtain permission to interact with the element
      • ref (string): Exact target element reference from the page snapshot
      • doubleClick (boolean, optional): Whether to perform a double click instead of a single click
      • button (string, optional): Button to click, defaults to left
    • Read-only: false
  • browser_close

    • Title: Close browser
    • Description: Close the page
    • Parameters: None
    • Read-only: true
  • browser_console_messages

    • Title: Get console messages
    • Description: Returns all console messages
    • Parameters: None
    • Read-only: true
  • browser_drag

    • Title: Drag mouse
    • Description: Perform drag and drop between two elements
    • Parameters:
      • startElement (string): Human-readable source element description used to obtain the permission to interact with the element
      • startRef (string): Exact source element reference from the page snapshot
      • endElement (string): Human-readable target element description used to obtain the permission to interact with the element
      • endRef (string): Exact target element reference from the page snapshot
    • Read-only: false
  • browser_evaluate

    • Title: Evaluate JavaScript
    • Description: Evaluate JavaScript expression on page or element
    • Parameters:
      • function (string): () => { /* code / } or (element) => { / code */ } when element is provided
      • element (string, optional): Human-readable element description used to obtain permission to interact with the element
      • ref (string, optional): Exact target element reference from the page snapshot
    • Read-only: false
  • browser_file_upload

    • Title: Upload files
    • Description: Upload one or multiple files
    • Parameters:
      • paths (array): The absolute paths to the files to upload. Can be a single file or mul

Frequently Asked Questions

What are the key features of Playwright MCP Server?

Uses Playwright's accessibility tree for faster, lighter operation. Works with structured data without requiring vision models. Deterministic tool application for reliable browser interaction. Supports Apify Proxy for advanced network routing.

What can I use Playwright MCP Server for?

Automated web navigation and form filling. Structured data extraction from complex websites. LLM-driven automated testing of web applications. Browser automation for autonomous AI agents.

How do I install Playwright MCP Server?

Install Playwright MCP Server by running: Configure your MCP client with the provided URL and API token.

What MCP clients work with Playwright MCP Server?

Playwright MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Conare · memory for coding agents

Turn this server into reusable context

Keep Playwright MCP Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Set up free$npx conare@latest