Playwright-based MCP server for browser automation

Playwright-based MCP server for browser automation

mcp-browser-server•bywladastic

An MCP server that lets AI assistants drive browsers through Playwright, exposing tools for navigation, element interaction, screenshots, scrolling, and JavaScript execution.

License: Not specified•Runtime: Awaiting documentation review•Category: browser automation

WHAT IT DOES

  • •Supports Chromium, Firefox, and WebKit for browser automation.
  • •Exposes tools to navigate, click, type, screenshot, extract element text, and wait for elements.
  • •Allows running custom JavaScript in the browser context and reading console logs.
  • •Includes scrolling and scrollability tools, plus AI-powered screenshot analysis via a local Ollama model.

BEST FOR

  • •Web application testing with AI assistants, filling forms and checking console errors.
  • •AI-driven web scraping and automation tasks from MCP-compatible assistants.
  • •Visual debugging of long pages using scrolling and AI screenshot analysis.

ABOUT MCP-BROWSER-SERVER

Playwright-based MCP server for browser automation is cataloged as an MCP server attributed to wladastic. An MCP server that lets AI assistants drive browsers through Playwright, exposing tools for navigation, element interaction, screenshots, scrolling, and JavaScript execution. It is categorized under browser automation. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Playwright-based MCP server for browser automation are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

What do I need for the AI-powered screenshot analysis feature?

It requires Ollama installed and running with a vision-capable model such as gemma3:4b.

Can I scroll pages in specific directions with controlled distances?

Yes, the scroll tool supports up, down, left, and right with configurable pixel amounts and smooth or auto behavior.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 5b491ab366f5 · 采集于 2026-11-13 10:41:35 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

AutoProbeMCP - a browser for your Agent

A Model Context Protocol (MCP) server that provides browser automation capabilities using Playwright. This server enables AI assistants to interact with web pages through a standardized interface.

Perfect for web automation, testing, and debugging workflows with AI assistants including:

  • Chat.fans agents - Empower AI agents with web interaction capabilities in VS Code
  • GitHub Copilot Chat - Enhance your development workflow with browser automation
  • Any MCP-compatible AI assistant - Universal browser automation for AI tools

Features

  • Multi-browser support: Chromium, Firefox, and WebKit
  • Comprehensive automation: Navigate, click, type, screenshot, and more
  • JavaScript execution: Run custom scripts in the browser context
  • Element interaction: Wait for elements, get text content, and interact with forms
  • Screenshot capabilities: Capture full pages or viewport screenshots
  • Type-safe: Built with TypeScript and runtime validation using Zod image

Installation

npm install
npm run build

Make sure Playwright browsers are installed:

npx playwright install

For system dependencies (Linux):

sudo npx playwright install-deps

Usage

VS Code Integration

Configure the MCP server in VS Code by adding to your settings.json or workspace configuration:

"mcp": {
    "servers": {
      "browser-automation": {
        "command": "node",
        "args": [
          "/home/yourUserName/mcp-browser-server/build/index.js"
        ],
        "env": {}
      }
    }
  }

Once configured, Chat.fans agents and GitHub Copilot Chat can use browser automation tools for web testing, scraping, and automation tasks.

Available VS Code Tasks

  • Build: Ctrl+Shift+P → "Tasks: Run Task" → "build"
  • Development Mode: Ctrl+Shift+P → "Tasks: Run Task" → "dev"
  • Test MCP Server: Ctrl+Shift+P → "Tasks: Run Task" → "test-mcp-server"

Available Tools

  1. launch_browser - Start a new browser instance
  2. navigate - Go to a specific URL
  3. click_element - Click on page elements
  4. type_text - Enter text into form fields
  5. screenshot - Capture page screenshots
  6. get_element_text - Extract text from elements
  7. wait_for_element - Wait for elements to appear/disappear
  8. evaluate_javascript - Run custom JavaScript
  9. get_console_logs - Get browser console logs (log, info, warn, error, debug)
  10. analyze_screenshot - AI-powered screenshot analysis using Gemma3 (requires Ollama)
  11. get_page_info - Get current page information
  12. close_browser - Close the browser instance
  13. scroll - Scroll the page in the specified direction (up/down/left/right)
  14. check_scrollability - Check if the page is scrollable in specific directions

Example: Web Application Testing

// Launch browser in headed mode for visual debugging
await launch_browser({ browser: "chromium", headless: false });

// Navigate to login page
await navigate({ url: "http://localhost:3000/login" });

// Fill in credentials
await type_text({ selector: "input[type='email']", text: "user@example.com" });
await type_text({ selector: "input[type='password']", text: "password123" });

// Submit form
await click_element({ selector: "button[type='submit']" });

// Wait for successful login
await wait_for_element({ selector: ".dashboard", timeout: 10000 });

// Check for any console errors during login
await get_console_logs({ level: "error" });

// Take screenshot of dashboard
await screenshot({ fullPage: true, path: "dashboard.png" });

// Get all console logs for debugging
await get_console_logs();

// Scroll down to see more content
await scroll({ direction: "down", pixels: 500, behavior: "smooth" });

// Check if page can be scrolled vertically
await check_scrollability({ direction: "vertical" });

// Scroll back to top
await scroll({ direction: "up", pixels: 500 });

Page Scrolling and Navigation

The MCP Browser Server includes comprehensive scrolling tools for navigating long pages and checking scroll capabilities:

Scroll Tool

The scroll tool allows you to scroll the page in any direction with fine-grained control:

// Scroll down by default amount (100px)
await scroll();

// Scroll in specific directions with custom distances
await scroll({ direction: "down", pixels: 300, behavior: "smooth" });
await scroll({ direction: "up", pixels: 200, behavior: "auto" });
await scroll({ direction: "left", pixels: 150 });
await scroll({ direction: "right", pixels: 150 });

// Smooth scrolling for better user experience
await scroll({ direction: "down", pixels: 500, behavior: "smooth" });

Parameters:

  • direction: "up", "down", "left", "right" (default: "down")
  • pixels: Number of pixels to scroll (default: 100)
  • behavior: "auto" or "smooth" (default: "auto")

Scrollability Check Tool

The check_scrollability tool determines whether a page can be scrolled in specific directions:

// Check both vertical and horizontal scrollability
await check_scrollability({ direction: "both" });

// Check only vertical scrolling
await check_scrollability({ direction: "vertical" });

// Check only horizontal scrolling  
await check_scrollability({ direction: "horizontal" });

Response includes:

  • Current scroll position
  • Maximum scroll distance
  • Whether scrolling is possible in each direction
  • Detailed position information

AI-Powered Screenshot Analysis

The analyze_screenshot tool provides AI-powered analysis of web pages using local Gemma3 models via Ollama. This feature can describe what's visible on a page, analyze page structure, and look for specific elements based on context.

Prerequisites

  1. Install Ollama: Download from ollama.ai
  2. Install Gemma3 model:
    ollama pull gemma3:4b
    
  3. Start Ollama service:
    ollama serve
    

Usage Examples

Basic Screenshot Analysis

// Take and analyze a screenshot with AI
await analyze_screenshot({ 
  fullPage: true,
  model: "gemma3:4b"
});

Detailed Structural Analysis

// Get detailed analysis of page structure
await analyze_screenshot({ 
  detailed: true,
  pretext: "Focus on navigation elements and form fields"
});

Context-Specific Analysis

// Look for specific elements or issues
await analyze_screenshot({ 
  pretext: "Check if there are any error messages or broken layouts",
  path: "error-check.png"
});

Parameters

  • fullPage (boolean): Capture entire scrollable page vs viewport only
  • path (string): Optional file path to save the screenshot
  • pretext (string): Additional context or specific instructions for the AI
  • model (string): AI model to use (default: "gemma3:4b")
  • detailed (boolean): Request detailed structural analysis

Supported Models

  • gemma3:4b (default, good balance of speed and quality)
  • Any other vision-capable model available in your Ollama installation

Development & Testing

Quick Setup

# One-command setup (installs dependencies, browsers, and builds)
npm run setup

# Or step by step:
npm install
npx playwright install
npm run build

Development Commands

# Build the project
npm run build

# Run in development mode
npm run dev

# Start the server
npm run start

# Development helper (shows all available commands)
npm run dev-helper help

Testing

The project includes comprehensive tests in the tests/ directory:

# Run basic communication test
npm run test

# Run browser automation demo
npm run test:demo

# Run AI analysis test (requires Ollama)
npm run test:ai-simple

# Check system status
npm run test:status

# Run all tests
npm run test:all

Development Helper

Use the development helper for common tasks:

# Show all available commands
npm run dev-helper help

# Quick setup from scratch
npm run dev-helper setup

# Run comprehensive tests
npm run dev-helper test

# Clean generated files
npm run dev-helper clean

For more details about testing, see tests/README.md.

Project Structure

mcp-browser-server/
├── src/                 # TypeScript source code
│   └── index.ts        # Main MCP server implementation
├── build/              # Compiled JavaScript output
├── tests/              # Test scripts and documentation
│   ├── README.md       # Testing documentation
│   ├── simple-test.mjs # Basic communication test
│   ├── demo-test.mjs   # Browser automation demo
│   └── *.mjs          # Additional test files
├── screenshots/        # Generated screenshots from tests
├── package.json        # Project configuration
└── README.md          # This file

License

Dual License:

  • Personal Use: Free for personal, educational, and non-commercial use
  • Commercial Use: Requires a separate commercial license

See LICENSE for full terms. For commercial licensing inquiries, please contact us.

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Playwright-based MCP server for browser automation from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/mcp-browser-server)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related browser automation MCP Servers

Alternative and complementary servers in the same category

View all in browser automation →

A Model Context Protocol (MCP) server for controlling Chrome with debugging capabilities, userscript injection, and extension support.

Repository stats unavailable
Browser & Scraping
Web Browser MCP Server
web-browser-mcp-server•blazickjp

An MCP server that lets AI assistants browse websites and extract content using optional CSS selectors.

Repository stats unavailable
Browser & Scraping
Steel MCP Server
steel-mcp-server•steel-dev

An MCP server that reads pages, fills forms, takes screenshots, and hands the browser to a person for logins or CAPTCHAs.

Repository stats unavailable
Browser & Scraping