Playwright MCP Server
@san0808
About Playwright MCP Server
This server provides a comprehensive set of tools to control a web browser instance using Playwright, exposed via the Model Context Protocol (MCP). It allows AI models or other MCP clients to perform complex web browsing tasks across multiple pages/tabs.
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"playwright_mcp_server": {
"command": "python",
"args": [
"client_example.py"
]
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is Playwright MCP Server?
This server provides a comprehensive set of tools to control a web browser instance using Playwright, exposed via the Model Context Protocol (MCP). It allows AI models or other MCP clients to perform complex web browsing tasks across multiple pages/tabs.
How to use Playwright MCP Server?
Install the Python dependencies (pip install "fastmcp>=2.0.0" playwright) and install Playwright’s Chromium browser (playwright install chromium). Run the server via the FastMCP CLI, e.g. fastmcp run main.py --transport sse --port 8001, then execute the provided client example script.
Key features of Playwright MCP Server
- Multi-page management: open, close, switch, and list pages
- Navigation: go to URLs, back/forward, reload
- Content retrieval: HTML, text, title, URL
- Full interaction suite: click, fill, type, check, select, hover, drag-and-drop
- Waiting utilities: for elements, URLs, load states
- State/information: element visibility, attributes, bounding box
- Visuals: page and element screenshots
Use cases of Playwright MCP Server
- Web scraping and content extraction from dynamic pages
- Automated form filling and interactive testing
- Multi-tab browsing workflows for AI agents
- Visual regression testing via screenshots
- JavaScript evaluation for deep page analysis
FAQ from Playwright MCP Server
What dependencies does Playwright MCP Server require?
Python 3.x, the fastmcp>=2.0.0 and playwright packages, and the Playwright Chromium browser installed via playwright install chromium.
How do I run the server?
Use the FastMCP CLI: fastmcp run main.py --transport sse --port 8001. Alternatively, a client example using stdio transport is included.
Are there security concerns with the JavaScript evaluation tools?
Yes, playwright_evaluate and playwright_execute_javascript are powerful and can execute arbitrary code. Use with caution or disable them if the server is exposed publicly.
What transports are supported?
The server can be run with SSE (WebSocket) or stdio transport, as shown in the usage examples.
What license is Playwright MCP Server distributed under?
MIT License.
Frequently asked questions
What dependencies does Playwright MCP Server require?
Python 3.x, the `fastmcp>=2.0.0` and `playwright` packages, and the Playwright Chromium browser installed via `playwright install chromium`.
How do I run the server?
Use the FastMCP CLI: `fastmcp run main.py --transport sse --port 8001`. Alternatively, a client example using stdio transport is included.
Are there security concerns with the JavaScript evaluation tools?
Yes, `playwright_evaluate` and `playwright_execute_javascript` are powerful and can execute arbitrary code. Use with caution or disable them if the server is exposed publicly.
What transports are supported?
The server can be run with SSE (WebSocket) or stdio transport, as shown in the usage examples.
What license is Playwright MCP Server distributed under?
MIT License.
Basic information
More Browser Automation MCP servers
MCP server w/ Browser Use
JovaniPinkFastAPI server implementing MCP protocol Browser automation via browser-use library.
Playwright Mcp
microsoftPlaywright MCP server
browser-use-mcp-server
co-browserBrowse the web, directly from Cursor etc.
App Store Scraper MCP Server
appreply-coThis is an MCP server that provides tools to LLMs for searching and analyzing apps from both Google Play Store and Apple App Store – perfect for ASO.
Firecrawl Mcp Server
mendableai🔥 Official Firecrawl MCP Server - Adds powerful web scraping and search to Cursor, Claude and any other LLM clients.
Comments