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-mcpThen follow the repository README for any remaining dependency or build steps.
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/mcpReplace any placeholder paths in the command with the real path on your machine.
AuthorizationMake 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@latestFree · 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 pagebrowser_closeClose the pagebrowser_console_messagesReturns all console messagesbrowser_dragPerform drag and drop between two elementsbrowser_evaluateEvaluate JavaScript expression on page or elementbrowser_file_uploadUpload one or multiple filesEnvironment Variables
AuthorizationrequiredBearer token for Apify API authenticationTry it
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
- GitHub Repository: https://github.com/microsoft/playwright-mcp
- Actor Repository: https://github.com/apify/actor-playwright-mcp
- Apify MCP Documentation: https://mcp.apify.com
🚩 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 elementref(string): Exact target element reference from the page snapshotdoubleClick(boolean, optional): Whether to perform a double click instead of a single clickbutton(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 elementstartRef(string): Exact source element reference from the page snapshotendElement(string): Human-readable target element description used to obtain the permission to interact with the elementendRef(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 providedelement(string, optional): Human-readable element description used to obtain permission to interact with the elementref(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