PlayMCP Browser Automation Server
This MCP server lets an AI assistant control a real Chromium browser via Playwright for navigation, interaction, inspection, debugging, and screenshots.
Launch/close/resize a browser and viewport; move, click, drag, and scroll the mouse.
Navigate to URLs and move through browser history.
Interact with pages: click, type, hover, drag-and-drop, select options, press keys, upload files, and handle dialogs.
Wait for text/selectors and take screenshots (viewport, element, or full page).
Read page content: HTML source, text, title, URL, scripts, stylesheets, meta tags, links, images, forms, element content, and element hierarchy.
Run arbitrary JavaScript and inspect console messages and network requests.
Configure headless mode, timeouts, and debug logging via environment variables.
Provides capabilities to extract all CSS stylesheets from web pages through the getStylesheets tool.
Provides browser automation capabilities for Firefox through Playwright, enabling web scraping, testing, and automation tasks.
Fully compatible with VS Code GitHub Copilot, allowing direct use of browser automation tools within VS Code.
Allows execution of arbitrary JavaScript code on web pages and returns results through the executeJavaScript tool.
Runs as a Node.js application, enabling browser automation server functionality through the Node.js runtime.
Enables browser automation for Safari through Playwright, supporting web scraping, testing, and automation workflows.
Built with TypeScript, providing type definitions for the MCP protocol implementation and browser controllers.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@PlayMCP Browser Automation Server take a screenshot of the homepage and extract all links"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
PlayMCP
An MCP server that lets AI assistants drive a real Chromium browser through Playwright: navigate, click and type, read page content, run JavaScript, inspect console and network activity, and take screenshots.
Install
Requires Node.js 20 or later.
git clone https://github.com/jomon003/PlayMCP.git
cd PlayMCP
npm install
npm run build
npx playwright install chromiumRelated MCP server: Zypin MCP
Connect a client
Point your MCP client at the built server, using an absolute path.
Claude Code
claude mcp add playmcp -- node /absolute/path/to/PlayMCP/dist/index.jsClaude Desktop, Cursor and most other clients (claude_desktop_config.json, .cursor/mcp.json, …)
{
"mcpServers": {
"playmcp": {
"command": "node",
"args": ["/absolute/path/to/PlayMCP/dist/index.js"]
}
}
}VS Code (.vscode/mcp.json)
{
"servers": {
"playmcp": {
"type": "stdio",
"command": "node",
"args": ["/absolute/path/to/PlayMCP/dist/index.js"]
}
}
}Then ask your assistant something like "Open example.com and list the links on the page."
Tools
The browser starts automatically on first use. Call openBrowser first only if you want to change the defaults (for example, headless mode or viewport size).
Area | Tools |
Browser |
|
Navigation |
|
Interaction |
|
Mouse and scrolling |
|
Waiting |
|
Capture |
|
Page content |
|
JavaScript and debugging |
|
Parameters and behaviour for each tool are in docs/tools.md.
Using it from an agent
The server sends these tips to the client when it connects, so most assistants pick them up automatically:
Navigate, then read the page with
getPageText,getElementHierarchyorgetForms.Act with
click,type,selectOptionorpressKey, using CSS (#id), text (text=Sign in) or role (role=button[name='Save']) selectors.Verify with
waitForText,getPageInfoorscreenshot.
Other tips:
Prefer
getPageTextorgetElementContenttogetPageSource, which can be very large.Call
handleDialogbefore the click that opens an alert or prompt.Every tool has a typed input schema and read-only/destructive annotations, so clients can auto-approve the read-only tools.
Failures come back as readable tool errors (for example, a missing element or a timeout) that the model can recover from, instead of crashing the session.
If you're a coding agent working on this repository, read AGENTS.md.
Configuration
Set these as environment variables in your client's server config ("env": { … }).
Variable | Default | Effect |
|
|
|
|
| Milliseconds to wait for elements before an action fails. |
| unset | Any value logs browser events to stderr. |
Security
The server controls a real browser on your machine. executeJavaScript runs arbitrary code in the page, uploadFiles and screenshot read and write local files, and pages may contain text crafted to mislead the model. Only connect it to assistants and sites you trust, and keep tool-approval prompts turned on in your client.
Development
npm run build # compile TypeScript to dist/
npm test # build, then run the test suite (needs Chromium installed)
npm run inspect # open the server in the MCP InspectorContributing
Issues and pull requests are welcome. Run npm test before opening a PR, and see AGENTS.md for the project layout and how to add a tool. Release notes and the 3.0 migration guide are in CHANGELOG.md.
License
MIT © 2025–2026 jomon003
Available Tools
38 toolsclickD
Click an element
Inputs: selector (required).
closeBrowserB
Close the browser
Inputs: no named parameters.
dragAndDropD
Drag and drop from one element to another
Inputs: sourceSelector (required), targetSelector (required).
evaluateWithReturnC
Execute JavaScript code and return the result
Inputs: script (required).
executeJavaScriptB
Execute arbitrary JavaScript code on the current page and return the result
Inputs: script (required).
getConsoleMessagesB
Get console messages from the browser
Inputs: no named parameters.
getElementContentC
Get the HTML and text content of a specific element
Inputs: selector (required).
getElementHierarchyC
Get the hierarchical structure of page elements with parent-child relationships
Inputs: selector, maxDepth, includeText, includeAttributes.
getFormsB
Get all forms from the current page
Inputs: no named parameters.
getImagesB
Get all images from the current page
Inputs: no named parameters.
getLinksB
Get all links from the current page
Inputs: no named parameters.
getMetaTagsB
Get all meta tags from the current page
Inputs: no named parameters.
getNetworkRequestsB
Get network requests made by the page
Inputs: no named parameters.
getPageSourceB
Get the HTML source code of the current page
Inputs: no named parameters.
getPageTextB
Get the text content of the current page
Inputs: no named parameters.
getPageTitleB
Get the title of the current page
Inputs: no named parameters.
getPageUrlB
Get the URL of the current page
Inputs: no named parameters.
getScriptsB
Get all JavaScript code from the current page
Inputs: no named parameters.
getStylesheetsB
Get all CSS stylesheets from the current page
Inputs: no named parameters.
goForwardA
Navigate forward to the next page in history
Inputs: no named parameters.
handleDialogC
Handle browser dialogs (alerts, confirms, prompts)
Inputs: accept (required), promptText.
hoverC
Hover over an element on the page
Inputs: selector (required).
mouseClickC
Click at specific coordinates
Inputs: x (required), y (required).
mouseDragC
Drag from one coordinate to another
Inputs: startX (required), startY (required), endX (required), endY (required).
mouseMoveC
Move mouse to specific coordinates
Inputs: x (required), y (required).
moveMouseC
Move mouse to coordinates
Inputs: x (required), y (required).
openBrowserC
Launch a new browser instance
Inputs: headless, debug.
pressKeyB
Press a key on the keyboard
Inputs: key (required).
resizeC
Resize the browser viewport
Inputs: width (required), height (required).
screenshotD
Take a screenshot
Inputs: path (required), type, selector.
scrollC
Scroll the page by specified amounts with enhanced feedback
Inputs: x (required), y (required), smooth.
selectOptionC
Select option(s) in a dropdown or select element
Inputs: selector (required), values (required).
takeScreenshotC
Take a screenshot of the page or specific element
Inputs: path (required), fullPage, element.
typeC
Type text into an element
Inputs: selector (required), text (required).
uploadFilesC
Upload files through a file input element
Inputs: selector (required), filePaths (required).
waitForSelectorC
Wait for a specific selector to appear on the page
Inputs: selector (required), timeout.
waitForTextC
Wait for specific text to appear on the page
Inputs: text (required), timeout.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 38 tools
Several tools have overlapping or redundant purposes, causing confusion. For example, 'evaluateWithReturn' and 'executeJavaScript' appear nearly identical, 'mouseClick' and 'click' differ only in input type, and 'moveMouse' and 'mouseMove' are essentially synonyms. This overlap makes it difficult for an agent to reliably choose the correct tool without trial and error.
The naming conventions are mixed, with some tools using verb_noun patterns like 'getPageTitle' and others using simple verbs like 'click' or 'hover'. While most names are readable, the inconsistency in structure (e.g., 'getElementContent' vs. 'takeScreenshot') and occasional redundancy (e.g., 'screenshot' and 'takeScreenshot') detract from predictability, though not to a chaotic level.
With 38 tools, the count is excessive for a browser automation server, leading to bloat and potential confusion. Many tools could be consolidated (e.g., merging mouse-related actions or JavaScript execution tools), and the high number suggests over-specialization rather than a well-scoped set, making it harder for agents to navigate efficiently.
The tool set covers a wide range of browser automation tasks, including navigation, interaction, content extraction, and debugging. However, there are minor gaps, such as missing tools for handling cookies, managing tabs, or simulating more complex user gestures, which agents might need to work around but core workflows are largely supported.
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.
Web scraping MCP server — scrape, extract structured data, screenshot any site with anti-bot bypass.
Hosted Web Crawler MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Related MCP Servers
- AlicenseBqualityNot gradedmaintenanceA MCP server that provides browser automation tools, allowing users to navigate websites, take screenshots, click elements, fill forms, and execute JavaScript through Playwright.82Apache 2.0
- -licenseBqualityNot gradedmaintenanceA lightweight MCP server for browser automation using Playwright with essential tools for navigation, form interaction, and web scraping. Provides 16 core browser automation tools with minimal setup and fast performance.16-
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables AI-powered browser automation, web scraping, and testing using Playwright across Chromium, Firefox, and WebKit. It allows users to perform actions like navigation, clicking, typing, and taking screenshots through natural language interfaces.MIT
- AlicenseNot gradedqualityCmaintenanceAn MCP server for browser automation using Puppeteer that enables AI assistants to navigate web pages, interact with UI elements, and capture screenshots. It supports comprehensive web tasks including form filling, content extraction, and executing custom JavaScript within the browser context.2MIT