
Playwright Server (Python)
MCP server exposing Playwright browser-automation tools: navigate, click, fill, screenshot and scrape pages.
Add to your client
Copy the config for your MCP client and paste it into its config file.
Paste into ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"playwright-server-python": {
"command": "uvx",
"args": [
"playwright-server"
]
}
}
}Requires `uv` (the Python package runner). Install it from https://docs.astral.sh/uv/ if `uvx` is not found.
Step-by-step guides: Add to Claude Desktop · Add to Cursor · Add to Windsurf
Before you start
- uv (Python package/runner used to launch the server, e.g. uvx)
- An MCP client such as Claude Desktop
- Playwright (installed as a dependency of the server package)
About Playwright Server (Python)
Playwright Server is a Python MCP server that bridges MCP clients to the Playwright browser-automation library. Once configured, it lets an assistant drive a browser: open URLs, interact with page elements, capture screenshots, run JavaScript, and read page text or HTML. Navigation auto-creates a session, so no explicit session setup is required. It runs over stdio via uv/uvx, and the README documents both a development (local --directory) and a published (uvx playwright-server) Claude Desktop configuration. Alongside the browser tools it also ships a minimal note-storage resource (note://) and a summarize-notes prompt.
Tools & capabilities (8)
playwright_navigateNavigates to a specified URL. Automatically creates a new session if there is no active session. Requires a `url` argument (string).
playwright_screenshotTakes a screenshot of the current page or a specific element. Requires a `name` (string) for the screenshot file name; optional `selector` (string) for a CSS selector — without it, a full-page screenshot is taken.
playwright_clickClicks an element on the page using a CSS selector. Requires a `selector` argument (string).
playwright_fillFills out an input field. Requires a `selector` (string) for the input field and a `value` (string) to fill.
playwright_evaluateExecutes JavaScript code in the browser console. Requires a `script` argument (string).
playwright_click_textClicks an element on the page by its text content. Requires a `text` argument (string).
playwright_get_text_contentGets the text content of all visible elements on the page.
playwright_get_html_contentGets the HTML content of the page. Requires a `selector` argument (string) for the element.
What this server can do
Playwright Server (Python) provides tools for these capabilities — tap one to see every MCP server that does the same:
When to use it
- Automating navigation and interaction with web pages from an MCP client
- Capturing full-page or element screenshots of websites
- Scraping visible text or HTML content from pages
- Filling and submitting web forms programmatically
- Running custom JavaScript against a loaded page
Security notes
Exposes a `playwright_evaluate` tool that executes arbitrary JavaScript in the browser console, which can run untrusted code against any visited page. The README's Configuration section is an unfilled TODO; the published-server config (`uvx playwright-server`) assumes the package is available on PyPI, otherwise use the development config pointing `--directory` at a local checkout.
Playwright Server (Python) FAQ
How do I install and run it?
Add it to your Claude Desktop config under `mcpServers`. The README shows a published config using `command: "uvx"` with args `["playwright-server"]`, and a development config using `uv` with `--directory` pointing at a local checkout.
Does it need an API key?
No. The README documents no authentication or API key; it runs locally over stdio.
How do I select elements to interact with?
Most tools take a CSS `selector`, but `playwright_click_text` lets you click by visible text content instead.
Alternatives to Playwright Server (Python)
Compare all alternatives →All-in-one web access MCP — Web Unlocker, SERP, Scraper API, and a cloud Scraping Browser.
Popular community Playwright + API testing MCP server with codegen, screenshots, and device emulation.
Official Browserbase cloud-browser MCP built on Stagehand — natural-language act/extract/observe.
Compare Playwright Server (Python) with: