Playwright MCP
Automate web interactions and perform web scraping tasks using the Playwright framework.
Playwright MCP Configuration
This repository contains everything needed to launch and connect to a working Playwright MCP (Model Context Protocol) server.
β Overview
This setup allows you to automate and inspect web pages using structured data instead of screenshots β ideal for LLM-powered tools like Claude, Cursor, and VS Code AI agents.
π οΈ Prerequisites
-
Node.js v18 or newer
-
One of the following MCP-compatible clients:
- VS Code or VS Code Insiders
- Cursor
- Claude Desktop
π Repository Contents
.vscode/settings.jsonβ VS Code configuration to launch Playwright MCPpackage.jsonβ Includes required MCP dependenciesREADME.mdβ This file.gitignoreβ Basic Node project ignore rules
π Getting Started
1. Clone the Repository
git clone https://github.com/faruklmu17/playwright_mcp.git
cd playwright-mcp-config
2. Install Dependencies
npm install
This installs all required packages, including @playwright/mcp.
3. Start the MCP Server
npx playwright-mcp --port 3550
You should see output like:
MCP Server started
Web server started
You can change the port if needed, e.g.
--port=4000
4. VS Code MCP Client Configuration
Add this to your .vscode/settings.json:
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": [
"@playwright/mcp@latest",
"--port=3550"
]
}
}
}
This tells VS Code (or Cursor) how to launch and connect to the MCP server.
5. Optional: Use Persistent or Isolated Sessions
Persistent (default)
The browser state is preserved across sessions.
Isolated Example
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": [
"@playwright/mcp@latest",
"--isolated",
"--storage-state=storage/state.json"
]
}
}
}
6. Additional Flags
You can enhance your MCP server using optional flags:
| Flag | Description |
|---|---|
--port <port> | Custom port (default is random/OS-assigned) |
--headless | Run without browser UI |
--device | Emulate a device (e.g., "iPhone 15") |
--vision | Enable screenshot-based vision (if supported) |
Check available flags with:
npx playwright-mcp --help
π Note About Browsers
You do not need to install playwright or run npx playwright install separately. The MCP package handles everything required for browser automation.
π .gitignore
node_modules/
.DS_Store
π€ Contributing
Pull requests and suggestions are welcome!
π License
Related Servers
Bright Data
sponsorDiscover, extract, and interact with the web - one interface powering automated access across the public internet.
Nefino
Access the Nefino renewable energy news API.
Amazon Scraper API
An MCP server that connects AI agents to Amazon product, search, and review data across 20 marketplaces via the ChocoData Amazon Scraper API.
Patchright Lite MCP Server
A server that wraps the Patchright SDK to provide stealth browser automation for AI models.
URnetwork
High quality VPN and Proxy connections
Crawl4AI RAG
Integrate web crawling and Retrieval-Augmented Generation (RAG) into AI agents and coding assistants.
anybrowse
Convert any URL to LLM-ready Markdown via real Chrome browsers. 3 tools: scrape, crawl, search. Free via MCP, pay-per-use via x402.
WebScraping.AI
Interact with WebScraping.AI for web data extraction and scraping.
ELBADOO INTELLIGENCE HUB
A high-performance x402 intelligence gateway providing 20+ social and web endpoints. Powered by 6-stage routing logicβincluding cloud-rendered JS fetches, residential IP rotation, and automatic settlement refunds for blocked hosts. Built for AI Agents that require reliable, pay-per-request access to LinkedIn, Reddit, Instagram, and beyond without API key management
rssmcp
Fetches RSS feeds and returns entries as formatted text, with support for OPML configuration.
ScraperCity
B2B lead generation MCP server - Apollo, Google Maps, email finder, skip trace, and 15+ more tools.