Playwright MCP
극작가-MCP
MCP(Model Context Protocol)용 Playwright 래퍼입니다. 이 서버는 LLM 기반 클라이언트가 자동화 작업을 위해 브라우저를 제어할 수 있도록 지원합니다.
구성 요소
자원
서버는 브라우저 스크린샷에 액세스하기 위한 리소스를 제공합니다.
스크린샷 리소스 URI:
screenshot://{page_id}모든 열려 있는 페이지에서 스크린샷 리소스를 자동으로 사용할 수 있습니다.
프롬프트
서버는 클라이언트가 웹 페이지를 해석하는 데 도움이 되는 프롬프트를 제공합니다.
interpret-page: 현재 웹 페이지의 내용과 구조를 분석합니다.해석할 페이지를 선택하기 위한 선택적
page_id인수특정 측면(전체, 양식, 탐색, 텍스트)에 초점을 맞추기 위한 선택적
focus인수텍스트 분석과 페이지 스크린샷을 모두 반환합니다.
도구
서버는 포괄적인 브라우저 자동화 도구 세트를 구현합니다.
브라우저 탐색
navigate: 특정 URL로 이동new_page: 특정 ID로 새로운 브라우저 페이지를 만듭니다.switch_page: 다른 브라우저 페이지로 전환get_pages: 사용 가능한 모든 브라우저 페이지 나열
페이지 상호작용
click: CSS 선택기를 사용하여 요소를 클릭합니다.type: 입력 요소에 텍스트를 입력합니다.wait_for_selector: 페이지에 요소가 나타날 때까지 기다립니다.
콘텐츠 추출
get_text: 요소에서 텍스트 콘텐츠를 가져옵니다.get_page_content: 전체 페이지 HTML 가져오기take_screenshot: 페이지 또는 요소의 시각적 상태를 캡처합니다.
Related MCP server: mcp-browser-automation
구성
종속성 설치
지엑스피1
빠른 시작
설치하다
클로드 데스크탑
MacOS의 경우: ~/Library/Application\ Support/Claude/claude_desktop_config.json
Windows의 경우: %APPDATA%/Claude/claude_desktop_config.json
"mcpServers": {
"playwright-mcp": {
"command": "uv",
"args": [
"--directory",
"/Users/shannon/Workspace/artivus/playwright-mcp",
"run",
"playwright-mcp"
]
}
}"mcpServers": {
"playwright-mcp": {
"command": "uvx",
"args": [
"playwright-mcp"
]
}
}개발
건축 및 출판
배포를 위해 패키지를 준비하려면:
종속성 동기화 및 잠금 파일 업데이트:
uv sync패키지 배포 빌드:
uv build이렇게 하면 dist/ 디렉토리에 소스와 휠 배포판이 생성됩니다.
PyPI에 게시:
uv publish참고: 환경 변수나 명령 플래그를 통해 PyPI 자격 증명을 설정해야 합니다.
토큰:
--token또는UV_PUBLISH_TOKEN또는 사용자 이름/비밀번호:
--username/UV_PUBLISH_USERNAME및--password/UV_PUBLISH_PASSWORD
디버깅
MCP 서버는 stdio를 통해 실행되므로 디버깅이 어려울 수 있습니다. 최상의 디버깅 환경을 위해서는 MCP Inspector 사용을 강력히 권장합니다.
다음 명령을 사용하여 npm 통해 MCP Inspector를 시작할 수 있습니다.
npx @modelcontextprotocol/inspector uv --directory /Users/shannon/Workspace/artivus/playwright-mcp run playwright-mcpInspector를 실행하면 브라우저에서 접근하여 디버깅을 시작할 수 있는 URL이 표시됩니다.
Available Tools
10 toolsclickC
Click on an element by selector
Inputs: selector (required), page_id.
get_page_contentC
Get the current page HTML content
Inputs: page_id.
get_pagesB
List all available browser pages
Inputs: no named parameters.
get_textC
Get text content from an element
Inputs: selector (required), page_id.
new_pageC
Create a new browser page
Inputs: page_id (required).
switch_pageC
Switch to a different browser page
Inputs: page_id (required).
take_screenshotC
Take a screenshot of the current page
Inputs: page_id, selector.
typeC
Type text into an input element
Inputs: selector (required), text (required), page_id.
wait_for_selectorC
Wait for an element to be visible on the page
Inputs: selector (required), page_id, timeout.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each tool has a clearly distinct purpose with no ambiguity. For example, 'click' is for interacting with elements, 'navigate' is for URL changes, and 'take_screenshot' is for capturing visual output. The descriptions make it easy to differentiate between element interaction tools like 'click', 'type', and 'get_text'.
The naming follows a consistent verb-based pattern with clear actions like 'click', 'navigate', and 'type'. There are minor deviations with 'get_page_content' and 'get_text' using 'get_' prefix while others use simple verbs, but overall the naming is highly readable and predictable.
With 10 tools, this is well-scoped for a Playwright automation server. Each tool earns its place by covering essential browser automation tasks like navigation, page management, element interaction, and content retrieval without being overwhelming or redundant.
The toolset provides complete coverage for core browser automation workflows. It includes navigation, page management, element interaction, content retrieval, and screenshot capabilities. There are no obvious gaps—agents can perform full automation sequences from start to finish.
Related MCP Connectors
Web scraping, browser automation, screenshots and AI data extraction for AI agents via MCP.
Official Browserless MCP server: browser automation, scraping, screenshots and PDFs for AI agents.
Unofficial Browserless MCP — wraps the Browserless headless-Chromium REST API (browserless.io)
Unofficial Hyperbrowser MCP — wraps the Hyperbrowser AI-agent browsing API (hyperbrowser.ai).…
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceExposes Playwright browser automation as MCP tools, enabling AI assistants to control a real browser tab-by-tab for form filling, navigation, and more, while preserving the user's active session.-
- AlicenseBqualityDmaintenanceAn MCP server for generic browser automation using Playwright. Enables MCP clients to navigate pages, inspect elements, execute JavaScript, capture screenshots, and monitor console logs and network traffic via a headless Chromium instance.7ISC
- AlicenseAqualityDmaintenanceEnables MCP clients to automate a real Chrome browser via Playwright, supporting session sharing and tools for navigation, clicking, typing, and more.11108 npm2MIT
- AlicenseCqualityDmaintenanceExposes a remote browser as MCP tools via Playwright, enabling AI agents to navigate and interact with web pages through DOM snapshots, clicks, typing, and form operations.4014 npm14Apache 2.0