Playwright MCP
Supports publishing the package to PyPI for distribution, with instructions for handling authentication via tokens or username/password.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Playwright MCP navigate to github.com and take a screenshot of the trending page"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
playwright-mcp
Playwright wrapper for MCP (Model Context Protocol). This server enables LLM-powered clients to control a browser for automation tasks.
Components
Resources
The server exposes resources for accessing browser screenshots:
Screenshot resource URI:
screenshot://{page_id}Screenshot resources are automatically available for all open pages
Prompts
The server provides a prompt to help clients interpret web pages:
interpret-page: Analyzes the current web page content and structureOptional
page_idargument to select which page to interpretOptional
focusargument to focus on specific aspects (full, forms, navigation, text)Returns both text analysis and a screenshot of the page
Tools
The server implements a comprehensive set of browser automation tools:
Browser navigation
navigate: Go to a specific URLnew_page: Create a new browser page with a specific IDswitch_page: Switch to a different browser pageget_pages: List all available browser pages
Page interaction
click: Click on an element using CSS selectortype: Type text into an input elementwait_for_selector: Wait for an element to appear on the page
Content extraction
get_text: Get text content from an elementget_page_content: Get the entire page HTMLtake_screenshot: Capture visual state of the page or element
Related MCP server: mcp-browser-automation
Configuration
Install Dependencies
uv add playwright
playwright install chromiumQuickstart
Install
Claude Desktop
On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
"mcpServers": {
"playwright-mcp": {
"command": "uv",
"args": [
"--directory",
"/Users/shannon/Workspace/artivus/playwright-mcp",
"run",
"playwright-mcp"
]
}
}"mcpServers": {
"playwright-mcp": {
"command": "uvx",
"args": [
"playwright-mcp"
]
}
}Development
Building and Publishing
To prepare the package for distribution:
Sync dependencies and update lockfile:
uv syncBuild package distributions:
uv buildThis will create source and wheel distributions in the dist/ directory.
Publish to PyPI:
uv publishNote: You'll need to set PyPI credentials via environment variables or command flags:
Token:
--tokenorUV_PUBLISH_TOKENOr username/password:
--username/UV_PUBLISH_USERNAMEand--password/UV_PUBLISH_PASSWORD
Debugging
Since MCP servers run over stdio, debugging can be challenging. For the best debugging experience, we strongly recommend using the MCP Inspector.
You can launch the MCP Inspector via npm with this command:
npx @modelcontextprotocol/inspector uv --directory /Users/shannon/Workspace/artivus/playwright-mcp run playwright-mcpUpon launching, the Inspector will display a URL that you can access in your browser to begin debugging.
Available Tools
10 toolsclickC
Click on an element by selector
Inputs: selector (required), page_id.
get_page_contentC
Get the current page HTML content
Inputs: page_id.
get_pagesB
List all available browser pages
Inputs: no named parameters.
get_textC
Get text content from an element
Inputs: selector (required), page_id.
new_pageC
Create a new browser page
Inputs: page_id (required).
switch_pageC
Switch to a different browser page
Inputs: page_id (required).
take_screenshotC
Take a screenshot of the current page
Inputs: page_id, selector.
typeC
Type text into an input element
Inputs: selector (required), text (required), page_id.
wait_for_selectorC
Wait for an element to be visible on the page
Inputs: selector (required), page_id, timeout.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each tool has a clearly distinct purpose with no ambiguity. For example, 'click' is for interacting with elements, 'navigate' is for URL changes, and 'take_screenshot' is for capturing visual output. The descriptions make it easy to differentiate between element interaction tools like 'click', 'type', and 'get_text'.
The naming follows a consistent verb-based pattern with clear actions like 'click', 'navigate', and 'type'. There are minor deviations with 'get_page_content' and 'get_text' using 'get_' prefix while others use simple verbs, but overall the naming is highly readable and predictable.
With 10 tools, this is well-scoped for a Playwright automation server. Each tool earns its place by covering essential browser automation tasks like navigation, page management, element interaction, and content retrieval without being overwhelming or redundant.
The toolset provides complete coverage for core browser automation workflows. It includes navigation, page management, element interaction, content retrieval, and screenshot capabilities. There are no obvious gaps—agents can perform full automation sequences from start to finish.
Maintenance
Related MCP Connectors
Web scraping, browser automation, screenshots and AI data extraction for AI agents via MCP.
Official Browserless MCP server: browser automation, scraping, screenshots and PDFs for AI agents.
Playwright browser automation — navigate, click, fill forms, extract, screenshot — 17 agent tools.
Control a real browser from AI agents: navigate, click, type, screenshot, read the page.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceExposes Playwright browser automation as MCP tools, enabling AI assistants to control a real browser tab-by-tab for form filling, navigation, and more, while preserving the user's active session.-
- AlicenseBqualityDmaintenanceAn MCP server for generic browser automation using Playwright. Enables MCP clients to navigate pages, inspect elements, execute JavaScript, capture screenshots, and monitor console logs and network traffic via a headless Chromium instance.727 npmISC
- AlicenseAqualityDmaintenanceEnables MCP clients to automate a real Chrome browser via Playwright, supporting session sharing and tools for navigation, clicking, typing, and more.11105 npm2MIT
- AlicenseCqualityDmaintenanceExposes a remote browser as MCP tools via Playwright, enabling AI agents to navigate and interact with web pages through DOM snapshots, clicks, typing, and form operations.4010 npm14Apache 2.0