Skip to main content
Glama

Playwright MCP

An MCP server that gives compatible clients structured control of a real Playwright browser for QA, scraping diagnostics, accessibility-minded inspection, and reproducible browser workflows.

Architecture

Transport entrypoints are thin:

  • src/index.ts starts MCP over stdio.

  • src/http.ts starts MCP over Streamable HTTP.

  • src/server.ts builds one McpServer and registers all tools.

Core services own browser state:

  • BrowserManager serializes tool execution, launches browsers lazily, and manages contexts/pages.

  • TelemetryStore captures console messages, page errors, failed requests, and recent network events.

  • Tool modules register focused actions and depend only on the public browser/session APIs.

Tool groups:

  • Browser/context/page lifecycle

  • Navigation and waiting

  • Interaction

  • Inspection and screenshots

  • Assertions

  • Diagnostics, tracing, and storage

Related MCP server: Playwright Server MCP

Install

npm install
npm run install-browsers
npm run build

Run

npm start

HTTP transport:

npm run start:http

Default HTTP endpoint: http://127.0.0.1:8931/mcp.

Production Controls

Configuration is environment-driven:

  • PLAYWRIGHT_MCP_HTTP_TOKEN: require Authorization: Bearer <token> for HTTP mode.

  • PLAYWRIGHT_MCP_HTTP_ALLOWED_ORIGINS: comma-separated CORS allowlist.

  • PLAYWRIGHT_MCP_ALLOWED_ORIGINS: comma-separated browser navigation allowlist.

  • PLAYWRIGHT_MCP_BLOCKED_ORIGINS: comma-separated browser navigation blocklist.

  • PLAYWRIGHT_MCP_ALLOW_EVALUATE: enable the dangerous evaluate tool. Default: false.

  • PLAYWRIGHT_MCP_ALLOW_DOWNLOADS: enable download tools and accepting downloads. Default: false.

  • PLAYWRIGHT_MCP_ALLOW_UPLOADS: enable upload tools. Default: false.

  • PLAYWRIGHT_MCP_ARTIFACT_DIR: screenshots, traces, PDFs, downloads, and storage state directory. Default: ./artifacts.

  • PLAYWRIGHT_MCP_MAX_CONTEXTS: browser context cap. Default: 8.

  • PLAYWRIGHT_MCP_MAX_PAGES: page cap. Default: 32.

  • PLAYWRIGHT_MCP_DEFAULT_TIMEOUT_MS: default Playwright timeout. Default: 30000.

  • PLAYWRIGHT_MCP_LOG_LEVEL: debug, info, warn, or error.

HTTP mode should use PLAYWRIGHT_MCP_HTTP_TOKEN before binding to anything other than localhost.

MCP client config

Examples are available in examples/:

  • claude_config.json

  • cursor_mcp.json

  • codex_config.toml

  • cline_mcp_settings.json

  • opencode_config.json

Development

npm run check
A
license - permissive license
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    B
    quality
    -
    maintenance
    A MCP server that provides browser automation tools, allowing users to navigate websites, take screenshots, click elements, fill forms, and execute JavaScript through Playwright.
    8
    2
  • A
    license
    B
    quality
    D
    maintenance
    A browser automation server providing Playwright capabilities for controlling web browsers, capturing screenshots, extracting content, and performing complex interactions through an MCP interface.
    6
    Apache 2.0
  • A
    license
    B
    quality
    D
    maintenance
    A universal browser automation MCP server using Playwright, enabling programmatic control of Chrome with 63 tools for navigation, interaction, media control, and CDP-based diagnostics.
    63
    12
    2
    MIT

View all related MCP servers

Related MCP Connectors

  • Hosted real Google Chrome MCP with per-user persistent state. Navigate, click, type, screenshot.

  • MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.

  • MCP Server for Slima - AI Writing IDE for Novel Authors with AI Beta Reader.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/quotows/mcp-playwright'

If you have feedback or need assistance with the MCP directory API, please join our Discord server