home / mcp / playwrightium mcp server

Playwrightium MCP Server

Provides a Model Context Protocol server for Playwright-based browser automation, enabling AI-driven, reusable workflows across environments.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "analysta-ai-playwrightium": {
      "command": "npx",
      "args": [
        "-y",
        "playwrightium"
      ],
      "env": {
        "API_KEY": "your-api-key",
        "USER_EMAIL": "[email protected]",
        "STAGING_URL": "https://staging.example.com",
        "USER_PASSWORD": "secure-password"
      }
    }
  }
}

Playwrightium provides a Model Context Protocol server for browser automation with Playwright. It lets you define reusable automation workflows that an AI can select and execute, so you can test and run complex browser automations without rebuilding steps each time.

How to use

To use the server, connect your MCP client (such as an editor integration or an automation assistant) and load your Playwrightium workspace. You can run direct browser sessions, load reusable shortcuts (YAML workflows), or execute full TypeScript/JavaScript automation scripts. The server supports environment variables for credentials and secrets, keeps a persistent browser session by default for efficiency, and includes prompts to guide you through creating reliable shortcuts and scripts. Start by testing a workflow manually, then create a shortcut or script once you confirm it behaves correctly, and save it in your workspace for reuse.

How to install

Prerequisites: you need Node.js and npm installed on your machine. If you plan to run everything locally, you will also use npm to install and run the MCP server.

# Install globally
npm install -g playwrightium

# Or use with npx (no installation needed)
npx playwrightium

Configuration and start

Configure the MCP server in your client settings to tell it how to launch the Playwrightium server. The example below shows a configuration that uses npx to run the Playwrightium package.

{
  "mcpServers": {
    "playwrightium": {
      "command": "npx",
      "args": ["-y", "playwrightium"]
    }
  }
}

Seed AI Assistant Integration (Optional)

If you want AI-assisted prompts and models for teamwork, seed chat models and prompts into your project.

# For GitHub Copilot
playwrightium seed --loop=copilot

# For Claude
playwrightium seed --loop=claude

Your first automation

Use the @create-shortcut prompt in your AI assistant to begin building your first reusable automation. The assistant will guide you through manually testing the workflow, creating a YAML shortcut with selectors, saving it to your workspace, and testing the final shortcut.

Available tools

browser-session

Execute a sequence of browser commands directly without creating files, enabling ad-hoc automation.

execute-shortcut

Run YAML workflow shortcuts to reuse tested automation across environments.

execute-script

Run TypeScript/JavaScript automation scripts with full programmatic control.

browser-snapshot

Capture the current page state to aid debugging and verification.

browser-debug

Collect console logs and network requests to diagnose issues.

close-browser

Reset or close the browser session to start fresh.