playwright-mcp-server
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-server
A small, self-contained Playwright helper you can drop into other Node projects.
Use it as:
A class —
PlaywrightSessionManageropens isolated browser sessions, then gives you the real Playwrightpagewhen you need click, fill, screenshot, or anything else.An MCP server — the same manager exposed as tools over stdio, so an agent can drive a browser.
Node 20+ and Chromium (via Playwright) are the only runtime requirements.
Install in another project
From GitHub:
npm install github:james8128/playwright-mcp-server
npx playwright install chromiumFrom a local clone:
npm install ../playwright-mcp-server
npx playwright install chromiumThis package depends on playwright. After install, Chromium still needs a one-time browser download (npx playwright install chromium).
Related MCP server: mcp-browser
30-second library use
import { PlaywrightSessionManager } from "playwright-mcp-server";
const pw = new PlaywrightSessionManager();
const { sessionId, title } = await pw.openPage({
url: "https://example.com",
headless: true,
});
console.log(title);
await pw.use(sessionId, async ({ page }) => {
await page.screenshot({ path: "example.png" });
});
await pw.close(sessionId);use() is the escape hatch. Anything Playwright can do, you can do inside that callback while the session stays locked and alive.
Full method list: docs/api.md.
MCP server
npm start
# same as: node server.jsPoint an MCP client at node /path/to/playwright-mcp-server/server.js.
Tools: openPage, getTitle, waitForElement, listSessions, closeBrowser, closeAll.
Details: docs/mcp.md.
Why this exists
Raw Playwright works, but a long-running helper still has to:
isolate each job in its own browser context
close browsers on failed navigation and on process exit
cap how many sessions can exist
time out idle sessions
reject non-http(s) URLs
serialize work so close cannot race with a click
That is what PlaywrightSessionManager does. Other projects should not have to reimplement it.
Layout
Path | What it is |
| The class other projects import |
| Public library exports |
| MCP adapter ( |
| Stdio MCP process |
| Class API |
| MCP tools and client config |
| Copy-paste starters |
Scripts
npm test # unit + Chromium integration tests
npm start # run the MCP server on stdio
npm run install-browser # download Chromium for PlaywrightDefaults
Setting | Default | Override |
Max sessions | 8 | constructor |
Idle close | 5 minutes | constructor |
Navigation timeout | 60s |
|
Retries | 1 extra attempt |
|
Headless |
|
|
License
ISC. See LICENSE.
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
Playwright browser automation — navigate, click, fill forms, extract, screenshot — 17 agent tools.
Stealth web browser for agents: search, fetch, click, download and type in persistent MCP sessions.
Control a real browser from AI agents: navigate, click, type, screenshot, read the page.
Web scraping, browser automation, screenshots and AI data extraction for AI agents via MCP.
Related MCP Servers
- FlicenseBqualityDmaintenancePlaywright wrapper for MCP that enables LLM-powered clients to control a browser for automation tasks.101-
- FlicenseNot gradedqualityDmaintenanceExposes Playwright browser automation as MCP tools, enabling AI assistants to control a real browser tab-by-tab for form filling, navigation, and more, while preserving the user's active session.-
- AlicenseAqualityDmaintenanceEnables MCP clients to automate a real Chrome browser via Playwright, supporting session sharing and tools for navigation, clicking, typing, and more.112MIT

orchords-web-pilotofficial
FlicenseAqualityCmaintenanceEnables coding agents to drive a real Playwright-backed browser session, navigating, observing, interacting, and capturing proof on web pages via MCP tools across stdio and Streamable HTTP transports.152-