Playwright MCP
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Playwright MCP
FastMCP server with Playwright for browser automation and web scraping. Exposes tools over HTTP for use with MCP clients (e.g. GPT-based agents).
Features
HTTP transport – Server runs as an HTTP service; clients connect via URL.
Long-lived browser – One Chromium instance started at server startup (Option A).
Structured logging – Structlog with configurable level and JSON output.
Modular layout – Config, logging, browser, tools, and server are separate; state is injected via lifespan context.
Related MCP server: mcp-browser-automation
Tools
Tool | Description |
| Navigate to a URL |
| Get HTML/text snapshot of the current page |
| List open tabs (pages) |
| Click an element by CSS selector |
| Type text into an element |
| Fill multiple form fields (selector → value map) |
| Extract content (text, HTML, or links) from current page or URL |
| Take a PNG screenshot (base64) of page or element |
Requirements
Python 3.10+
Playwright browsers (install after
pip install)
Setup
# From project root
pip install -e .
python -m playwright install chromiumOptional: copy .env.example to .env and adjust MCP_HOST, MCP_PORT, HEADLESS, LOG_LEVEL, LOG_JSON.
Run
# After pip install -e .
playwright-mcp
# Or
python -m playwright_mcp.mainServer listens at http://127.0.0.1:8000 by default. MCP endpoint is typically at http://127.0.0.1:8000/mcp (see FastMCP HTTP deployment docs).
Project layout
src/playwright_mcp/
├── main.py # Entrypoint
├── config/ # Env-based settings
├── logging_/ # Structlog setup and get_logger
├── browser/ # Lifecycle and BrowserState
├── tools/ # Navigation, interaction, scraping, screenshot
└── server/ # FastMCP app and dependency registrationConfiguration
Env var | Default | Description |
|
| HTTP bind host |
|
| HTTP bind port |
|
| Run browser headless |
|
| Log level (DEBUG, INFO, WARNING, ERROR) |
|
| Output logs as JSON |
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Official Browserless MCP server: browser automation, scraping, screenshots and PDFs for AI agents.
Web scraping, browser automation, screenshots and AI data extraction for AI agents via MCP.
Browserless MCP — wraps the Browserless headless-Chromium REST API (browserless.io)
Playwright browser automation — navigate, click, fill forms, extract, screenshot — 17 agent tools.
Related MCP Servers
- AlicenseAqualityDmaintenanceStateful MCP server wrapping Playwright for browser automation. Provides tools to navigate, interact, and extract data from web pages via a persistent browser session.191,287 npmMIT
- 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.11110 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