DP

dylangroos/patchright-mcp-lite

Browser automation

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

26 stars 9 forks 品質 65 トレンド 0Apache-2.0

Patchright (Playwright patch) 軽量モデル用MCPサーバー

概要

Patchright Node.js SDK をラップしたモデルコンテキストプロトコル(MCP)サーバーを合理化し、Surth ブラウザーの自動化機能を AI モデルに提供します。 この軽量なサーバーは、よりシンプルなAIモデルで使いやすくするために不可欠な機能に焦点を当てています。 PatchrightはPlaywrightテストと自動化フレームワークの検出されていないバージョンです。 それはPlaywrightのためのドロップインの取り替えとして設計されていますが、反ボット システムによって検出を避けるために高度のステルス機能と。 Patchrightは、次のようなさまざまな検出技術をパッチライトにパッチを適用します。 - Runtime.enableリーク - Console.enableリーク - コマンドフラグのリーク - 一般的な検出ポイント - クローズドシャドロールートの相互作用 このMCPサーバーは、パッチライトのNode.jsバージョンをラップし、シンプルで標準化されたプロトコルでAIモデルに利用できる機能を作ります.

概要(AI 翻訳)

Patchright Node.js SDK をラップしたモデルコンテキストプロトコル(MCP)サーバーを合理化し、Surth ブラウザーの自動化機能を AI モデルに提供します。 この軽量なサーバーは、よりシンプルなAIモデルで使いやすくするために不可欠な機能に焦点を当てています。

パッチライトとは何ですか?

PatchrightはPlaywrightテストと自動化フレームワークの検出されていないバージョンです。 それはPlaywrightのためのドロップインの取り替えとして設計されていますが、反ボット システムによって検出を避けるために高度のステルス機能と。 Patchrightは、次のようなさまざまな検出技術をパッチライトにパッチを適用します。

  • Runtime.enable漏出
  • Console.enableリーク
  • コマンドフラグが漏れる
  • 一般的な検出ポイント
  • 閉鎖したシャドウルートの相互作用

このMCPサーバーは、パッチライトのNode.jsバージョンをラップし、シンプルで標準化されたプロトコルでAIモデルに利用できる機能を作ります。

##特徴

-Simple Interface:4つの重要なツールでコア機能に焦点を当てました -Stealth Automation: 検出を避けるために Patchrightのステルスモードを使用する -MCP Standard:簡単なAI統合のためのモデルコンテキストプロトコルを実装 -Stdio Transport: 標準入力/出力を使用して、シームレスな統合

前提条件

  • ノード.

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

Patchright Lite MCP Server

A streamlined Model Context Protocol (MCP) server that wraps the Patchright Node.js SDK to provide stealth browser automation capabilities to AI models. This lightweight server focuses on essential functionality to make it easier for simpler AI models to use.

What is Patchright?

Patchright is an undetected version of the Playwright testing and automation framework. It’s designed as a drop-in replacement for Playwright, but with advanced stealth capabilities to avoid detection by anti-bot systems. Patchright patches various detection techniques including:

  • Runtime.enable leak
  • Console.enable leak
  • Command flags leaks
  • General detection points
  • Closed Shadow Root interactions

This MCP server wraps the Node.js version of Patchright to make its capabilities available to AI models through a simple, standardized protocol.

Features

  • Simple Interface: Focused on core functionality with just 4 essential tools
  • Stealth Automation: Uses Patchright’s stealth mode to avoid detection
  • MCP Standard: Implements the Model Context Protocol for easy AI integration
  • Stdio Transport: Uses standard input/output for seamless integration

Prerequisites

  • Node.js 18+
  • npm or yarn

Installation

  1. Clone this repository:

    git clone https://github.com/yourusername/patchright-lite-mcp-server.git
    cd patchright-lite-mcp-server
    
  2. Install dependencies:

    npm install
    
  3. Build the TypeScript code:

    npm run build
    
  4. Install Chromium-Driver for Pathright:

    npx patchright install chromium
    

Usage

Run the server with:

npm start

This will start the server with stdio transport, making it ready to integrate with AI tools that support MCP.

Integrating with AI Models

Claude Desktop

Add this to your claude-desktop-config.json file:

{
  "mcpServers": {
    "patchright": {
      "command": "node",
      "args": ["path/to/patchright-lite-mcp-server/dist/index.js"]
    }
  }
}

VS Code with GitHub Copilot

Use the VS Code CLI to add the MCP server:

code --add-mcp '{"name":"patchright","command":"node","args":["path/to/patchright-lite-mcp-server/dist/index.js"]}'

Available Tools

The server provides just 4 essential tools:

1. browse

Launches a browser, navigates to a URL, and extracts content.

Tool: browse
Parameters: {
  "url": "https://example.com",
  "headless": true,
  "waitFor": 1000
}

Returns:

  • Page title
  • Visible text preview
  • Browser ID (for subsequent operations)
  • Page ID (for subsequent operations)
  • Screenshot path

2. interact

Performs a simple interaction on a page.

Tool: interact
Parameters: {
  "browserId": "browser-id-from-browse",
  "pageId": "page-id-from-browse",
  "action": "click", // can be "click", "fill", or "select"
  "selector": "#submit-button",
  "value": "Hello World" // only needed for fill and select
}
GitHub で README 全文を見る

インストール

npx patchright install chromium
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "patchright": { "command": "node", "args": ["path/to/patchright-lite-mcp-server/dist/index.js"] } } }