- Explore MCP Servers
- playwright_mcp_python
Playwright Mcp Python
What is Playwright Mcp Python
playwright_mcp_python is a Python implementation of the Playwright MCP server, enabling automated browser interactions and testing.
Use cases
Common use cases include automated testing of web applications, scraping web content, and performing repetitive tasks in browsers.
How to use
To use playwright_mcp_python, clone the repository, install the necessary dependencies, and configure it in your MCP client. You can specify command line options for browser selection and execution mode.
Key features
Key features include navigation to URLs, user interactions (clicking, typing, filling forms), capturing screenshots, managing tabs, and multi-browser support (Chromium, Firefox, WebKit).
Where to use
playwright_mcp_python can be used in web automation, testing frameworks, and any application requiring browser interactions or data extraction.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Playwright Mcp Python
playwright_mcp_python is a Python implementation of the Playwright MCP server, enabling automated browser interactions and testing.
Use cases
Common use cases include automated testing of web applications, scraping web content, and performing repetitive tasks in browsers.
How to use
To use playwright_mcp_python, clone the repository, install the necessary dependencies, and configure it in your MCP client. You can specify command line options for browser selection and execution mode.
Key features
Key features include navigation to URLs, user interactions (clicking, typing, filling forms), capturing screenshots, managing tabs, and multi-browser support (Chromium, Firefox, WebKit).
Where to use
playwright_mcp_python can be used in web automation, testing frameworks, and any application requiring browser interactions or data extraction.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
Playwright MCP Server - Python
A Python implementation of the Playwright MCP server.
Features
- 🌐 Navigation: Navigate to URLs, go back/forward
- 🖱️ Interactions: Click, type, fill forms, select options
- 📸 Capture: Take screenshots, extract text/HTML content
- 🔧 Utilities: Wait for elements, scroll, execute JavaScript
- 📑 Tab Management: Open/close/switch between tabs
- 🖥️ Multi-browser: Support for Chromium, Firefox, and WebKit
Installation
git clone https://github.com/camillebrl/playwright_mcp_python.git
make install
make test
If all tests passed, you can now use this MCP server.
Usage
As MCP Server
Add to your MCP client configuration:
{
"mcpServers": {
"playwright-python": {
"command": "playwright-mcp-python",
"args": [
"--headless"
]
}
}
}
Or find root for playwright-mcp-python:
which playwright-mcp-python
And add this root as command directly:
Command Line Options
--browser
: Choose browser (chromium, firefox, webkit)--headless
: Run in headless mode--viewport-width
: Set viewport width (default: 1280)--viewport-height
: Set viewport height (default: 720)--timeout
: Set default timeout in ms (default: 30000)
Available Tools
Navigation
browser_navigate
: Navigate to a URLbrowser_navigate_back
: Go backbrowser_navigate_forward
: Go forward
Interactions
browser_click
: Click on elementsbrowser_type
: Type text into fieldsbrowser_fill
: Fill input fieldsbrowser_select_option
: Select from dropdowns
Capture & Extraction
browser_screenshot
: Take screenshotsbrowser_get_text
: Extract text contentbrowser_get_html
: Get HTML contentbrowser_console_messages
: Get console logs
Utilities
browser_wait
: Wait for time/elements/textbrowser_reload
: Reload pagebrowser_scroll
: Scroll pagebrowser_evaluate
: Execute JavaScriptbrowser_tab_*
: Tab management
License
MIT License
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.