
dylangroos/patchright-mcp-lite
Browser automation이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
Patchright (Playwright 패치) 경량 모델 MCP 서버
개요
Patchright Node.js SDK를 감싸는 streamlined Model Context Protocol (MCP) 서버는 AI 모델에 스텔스 브라우저 자동화 기능을 제공합니다. 이 경량 서버는 필수 기능에 초점을 맞추고 간단한 AI 모델에 쉽게 사용할 수 있습니다. Patchright는 Playwright 테스트 및 자동화 프레임 워크의 탐지되지 않은 버전입니다. Playwright에 대한 드롭 인 교체로 설계되었지만 안티 봇 시스템에 의해 감지를 방지하기 위해 고급 스텔스 기능을 갖추고 있습니다. Patchright는 다음과 같은 다양한 탐지 기술을 패치 : - Runtime.enable 누출 - 콘솔.enable 누출 - 명령 플래그 누출 - 일반 감지 포인트 - 닫힌 그림자 루트 상호 작용 이 MCP 서버는 간단한 표준 프로토콜을 통해 AI 모델에 사용할 수있는 기능을 만들기 위해 Patchright의 Node.js 버전을 포장합니다.
개요(AI 번역)
Patchright Node.js SDK를 감싸는 streamlined Model Context Protocol (MCP) 서버는 AI 모델에 스텔스 브라우저 자동화 기능을 제공합니다. 이 경량 서버는 필수 기능에 초점을 맞추고 간단한 AI 모델에 쉽게 사용할 수 있습니다.
Patchright 란 무엇입니까?
Patchright는 Playwright 테스트 및 자동화 프레임 워크의 탐지되지 않은 버전입니다. Playwright에 대한 드롭 인 교체로 설계되었지만 안티 봇 시스템에 의해 감지를 방지하기 위해 고급 스텔스 기능을 갖추고 있습니다. Patchright는 다음과 같은 다양한 탐지 기술을 패치 :
- Runtime.enable 누출
- 콘솔.enable 누출
- 명령 플래그 누출
- 일반 검출점
- 닫히는 그림자 뿌리 상호 작용
이 MCP 서버는 간단한 표준 프로토콜을 통해 AI 모델에 사용할 수있는 기능을 만들기 위해 Patchright의 Node.js 버전을 포장합니다.
특징
-Simple Interface: 핵심 기능에 집중된 4가지 필수 도구
- ** 스텔스 자동화**: Patchright의 스텔스 모드를 사용하여 탐지를 방지합니다.
- MCP Standard: 쉬운 AI 통합을 위한 Model Context Protocol 구현
- ** 교통 **: 원활한 통합을 위한 표준 입력/출력
필수품
- 노드.
이 페이지는 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
-
Clone this repository:
git clone https://github.com/yourusername/patchright-lite-mcp-server.git cd patchright-lite-mcp-server -
Install dependencies:
npm install -
Build the TypeScript code:
npm run build -
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
}
설치
npx patchright install chromium설정
{
"mcpServers": {
"patchright": {
"command": "node",
"args": ["path/to/patchright-lite-mcp-server/dist/index.js"]
}
}
}