Playwright MCP Server

Playwright MCP Server

Enables web browser automation and inspection using structured data instead of screenshots, allowing AI agents to interact with web pages programmatically through the Playwright framework.

Category
Visit Server

README

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 MCP
  • package.json — Includes required MCP dependencies
  • README.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

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured