Skip to main content
Glama
Playwright MCP Server
by epi-builder

Playwright MCP Server

Microsoft의 Playwright MCP를 참고하여 구현한 Model Context Protocol (MCP) 서버입니다. streamableHttp transport를 사용하여 웹 브라우저 자동화 기능을 제공합니다.

기능

이 서버는 다음과 같은 브라우저 자동화 도구들을 제공합니다:

  • browser_navigate: URL로 이동

  • browser_snapshot: 현재 페이지의 접근성 스냅샷 캡처

  • browser_click: 요소 클릭

  • browser_type: 텍스트 입력

  • browser_take_screenshot: 스크린샷 촬영

  • browser_close: 브라우저 종료

Related MCP server: mcp-browser-automation

설치

npm install

사용법

StreamableHttp Transport (권장)

# 기본 포트 3000으로 실행
npm run dev -- --streamable-http

# 특정 포트로 실행
npm run dev -- --streamable-http --port=8080

서버가 시작되면 http://localhost:3000/mcp (또는 지정한 포트)에서 MCP 서버에 접근할 수 있습니다.

Stdio Transport

npm run dev

프로그래밍 방식 사용법

import { PlaywrightMCPServer } from './src/server.js';

const server = new PlaywrightMCPServer();

// StreamableHttp transport로 시작
await server.start('streamableHttp', 3000);

// 또는 stdio transport로 시작
await server.start('stdio');

MCP 클라이언트 연결

MCP 클라이언트에서 이 서버에 연결하려면:

{
  "mcpServers": {
    "playwright": {
      "command": "node",
      "args": ["dist/index.js", "--streamable-http", "--port=3000"],
      "env": {}
    }
  }
}

개발

# TypeScript 컴파일
npm run build

# 개발 모드 실행
npm run dev

# 프로덕션 빌드 후 실행
npm run build
npm start

라이선스

MIT

Available Tools

6 tools
browser_clickC

Click on an element

Inputs: element (required), ref (required).

browser_closeC

Close the browser

Inputs: no named parameters.

browser_navigateC

Navigate to a URL

Inputs: url (required).

browser_snapshotB

Capture accessibility snapshot of the current page

Inputs: no named parameters.

browser_take_screenshotC

Take a screenshot of the current page

Inputs: filename, fullPage.

browser_typeC

Type text into an element

Inputs: element (required), ref (required), text (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 6 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose targeting specific browser automation actions: clicking, closing, navigating, capturing accessibility snapshots, taking screenshots, and typing text. There is no overlap or ambiguity between these functions.

    Naming Consistency5/5

    All tools follow a consistent 'browser_' prefix with descriptive action suffixes (click, close, navigate, snapshot, take_screenshot, type). This uniform snake_case pattern makes the tool set predictable and easy to understand.

    Tool Count4/5

    Six tools is reasonable for a browser automation server, covering core interactions like navigation, input, and capture. It could be slightly expanded with tools for element selection or waiting, but the current count is well-scoped and manageable.

    Completeness3/5

    The tools cover basic navigation, interaction, and capture functions, but there are notable gaps for common automation tasks: no tools for selecting elements (e.g., by CSS/XPath), waiting for conditions, handling alerts/dialogs, or executing JavaScript. This may limit agent effectiveness in complex scenarios.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables browser automation and web scraping by exposing Playwright tools through an HTTP-based MCP server. Users can navigate pages, interact with web elements, capture screenshots, and extract structured content using a persistent Chromium instance.
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      An 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.
      7
      ISC
    • A
      license
      A
      quality
      D
      maintenance
      Enables MCP clients to automate a real Chrome browser via Playwright, supporting session sharing and tools for navigation, clicking, typing, and more.
      11
      108 npm
      2
      MIT
    • F
      license
      Not graded
      quality
      B
      maintenance
      Enables MCP clients to remotely control a headless Chromium browser via Playwright, including navigation, clicking, typing, form filling, screenshots, and network request monitoring, over Streamable HTTP and deployable to Azure Container Apps.
      -