playwright-plus-python-mcp
Author: blackwhite084
Description: MCP server that exposes a set of Playwright-based browser-automation tools (navigate, click, fill, screenshot, evaluate, etc.) and a simple note:// storage resource, plus a summarisation prompt.
Stars: 137
Forks: 20
License: Apache License 2.0
Category: Open Source
Overview
Installation
git clone https://github.com/blackwhite084/playwright-plus-python-mcp.git
cd playwright-plus-python-mcp python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate pip install -r requirements.txt pip install playwright fastapi uvicorn pydantic playwright install --with-deps # Linux users may need sudo uvicorn server:app --host 0.0.0.0 --port ${MCP_PORT:-8000}docker build -t playwright-mcp .
docker run -p 8000:8000 -e MCP_AUTH_TOKEN=changeme playwright-mcpplaywright_navigate
Navigate the browser to a specified URL, creating a new session if none is active
playwright_screenshot
Capture a screenshot of the full page or a specific element
playwright_click
Click an element identified by a CSS selector
playwright_fill
Fill an input field identified by a CSS selector with a given value
playwright_evaluate
Execute JavaScript code in the page context
playwright_click_text
Click an element on the page by matching its text content
playwright_get_text_content
Retrieve the text content of all visible elements on the page
playwright_get_html_content
Retrieve the HTML content of an element specified by a CSS selector