PlayMCP MCP Server
Community MCP server exposing Playwright browser automation with around 38 tools for navigation, interaction, scraping, screenshots, and JavaScript execution.
PlayMCP is a community-maintained MCP server that wraps the Playwright browser automation library and exposes it to MCP-compatible AI clients such as Claude Desktop and VS Code GitHub Copilot. It runs locally over stdio and ships with roughly 38 tools spanning navigation, DOM interaction, mouse and keyboard control, screenshots, data extraction, JavaScript evaluation, file uploads, dialog handling, and browser lifecycle management.
The server is geared toward agents that need fine-grained control of a real browser: deep DOM hierarchy export with configurable depth, pixel-perfect mouse coordinates, smart waits for selectors and text, full-page or element-specific screenshots, and live monitoring of console messages and network requests. It also supports executing arbitrary JavaScript in the page context and returning structured values, which makes it well suited for scraping dynamic sites and complex automation flows.
PlayMCP is not an official Playwright or Microsoft project. Microsoft maintains its own playwright-mcp server, and PlayMCP positions itself as an unofficial alternative with a broader, more granular tool surface.
Tools
| Tool | Description |
|---|---|
navigate |
Navigate the active page to a URL. |
goForward |
Move forward in the browser history. |
goBack |
Move back in the browser history. |
click |
Click an element by selector. |
type |
Type text into an input field. |
hover |
Hover over an element. |
dragAndDrop |
Drag one element and drop it on another. |
selectOption |
Choose an option from a select element. |
moveMouse |
Move the mouse to coordinates. |
mouseClick |
Click at specific page coordinates. |
mouseDrag |
Drag the mouse between two coordinates. |
pressKey |
Press a keyboard key or shortcut. |
waitForText |
Wait until specified text appears on the page. |
waitForSelector |
Wait for an element matching a selector. |
screenshot |
Capture a screenshot of the page or element. |
getPageSource |
Return the full HTML source of the page. |
getPageText |
Return rendered text content of the page. |
getPageTitle |
Return the document title. |
getPageUrl |
Return the current page URL. |
getElementContent |
Get HTML or text content of a specific element. |
getElementHierarchy |
Export DOM hierarchy with configurable depth. |
getScripts |
List script tags on the page. |
getStylesheets |
List stylesheet references. |
getMetaTags |
Return meta tag information. |
getLinks |
Extract all link URLs and labels. |
getImages |
Extract all image sources and alt text. |
getForms |
Extract forms, fields, and their attributes. |
getConsoleMessages |
Read captured browser console output. |
getNetworkRequests |
Read captured network request log. |
executeJavaScript |
Run arbitrary JavaScript in the page context. |
evaluateWithReturn |
Evaluate JavaScript and return its value. |
uploadFiles |
Upload one or more files to a file input. |
handleDialog |
Accept or dismiss alerts, confirms, and prompts. |
openBrowser |
Launch a new browser instance. |
closeBrowser |
Close the active browser instance. |
resize |
Resize the viewport. |
scroll |
Scroll the page or an element. |
PlayMCP is self-hosted and runs locally over stdio. There is no remote URL and no API key required.
Prerequisites
- Node.js 16+ (LTS recommended)
- ~500 MB disk for Playwright browser binaries
- 2 GB RAM minimum (4 GB+ recommended)
Install
git clone https://github.com/jomon003/PlayMCP.git
cd PlayMCP
npm install
npm run build
npx playwright install
Claude Desktop config
Add to your Claude Desktop config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"playmcp-browser": {
"type": "stdio",
"command": "node",
"args": ["/absolute/path/to/PlayMCP/dist/server.js"]
}
}
}
Replace /absolute/path/to/PlayMCP with the actual path to your cloned repo. Restart Claude Desktop after saving. The same config block works with VS Code GitHub Copilot and other stdio-based MCP clients.
- Drive end-to-end browser tests from an agent: open a site, fill forms, click through a flow, and assert text or screenshots at each step.
- Scrape dynamic, JavaScript-rendered pages by combining
navigate,waitForSelector, andevaluateWithReturnto pull structured data. - Capture full-page or element-level screenshots of competitor or production pages for visual review and regression checking.
- Audit a page by collecting links, images, forms, meta tags, console errors, and network requests in a single agent run.
- Automate repetitive web tasks such as logging in, uploading files, downloading reports, or dismissing dialogs across multiple sites.
- "Open https://example.com, screenshot the full page, and list every external link."
- "Go to our staging app, log in with these credentials, navigate to Settings, and confirm the 'Beta features' toggle is visible."
- "Scrape the product titles and prices from this category page and return them as JSON."
- "Watch the network tab while loading this URL and tell me which requests returned 4xx or 5xx."
- "Run this JavaScript snippet on the page and return the result:
document.querySelectorAll('article').length."
- Broad tool surface (around 38 tools) covering navigation, mouse, keyboard, scraping, screenshots, file upload, and JS execution.
- Includes deeper utilities than many Playwright MCP wrappers, such as DOM hierarchy export, network and console capture, and
evaluateWithReturn. - Runs entirely locally over stdio with no authentication, accounts, or external services required.
- Unofficial and community-maintained by a single author; not affiliated with Microsoft or the Playwright team.
- Requires cloning, building from source, and installing Playwright browsers; there is no published npm package or one-line install.
- Documentation is concentrated in the repo README and lacks formal per-tool schema reference or test coverage details.
- microsoft/playwright-mcp: the official Playwright MCP server from Microsoft.
- Browserbase MCP: cloud-hosted browser automation with managed sessions.
- Puppeteer MCP server: reference Puppeteer-based browser automation server from the MCP project.