Browser automation using Playwright and structured accessibility snapshots.
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 ai@apify.com.
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
Core automation
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
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 authenticationConfiguration
{"mcpServers": {"playwright": {"url": "https://jiri-spilka--playwright-mcp-server.apify.actor/mcp", "headers": {"Authorization": "Bearer YOUR_APIFY_TOKEN"}}}}