Playwright MCP Server

Integrations

  • Provides web browsing capabilities for GitHub Copilot in VS Code, enabling it to automate browsers, interact with web pages, and perform web scraping tasks.

  • Enables execution of JavaScript in a browser environment, allowing for dynamic interaction with web page content and functionality.

Servidor MCP de dramaturgo 🎭

Un servidor de Protocolo de Contexto de Modelo que proporciona funciones de automatización del navegador mediante Playwright. Este servidor permite a los LLM interactuar con páginas web, tomar capturas de pantalla, generar código de prueba, extraer fragmentos web de la página y ejecutar JavaScript en un entorno de navegador real.

Captura de pantalla

Documentación | Referencia de API

Instalación

Puede instalar el paquete utilizando npm, mcp-get o Smithery:

Usando npm:

npm install -g @executeautomation/playwright-mcp-server

Usando mcp-get:

npx @michaellatman/mcp-get@latest install @executeautomation/playwright-mcp-server

Uso de herrería

Para instalar Playwright MCP para Claude Desktop automáticamente a través de Smithery :

npx -y @smithery/cli install @executeautomation/playwright-mcp-server --client claude

Instalación en VS Code

Instale el servidor Playwright MCP en VS Code usando uno de estos botones:

Alternativamente, puede instalar el servidor Playwright MCP usando la CLI de VS Code:

# For VS Code code --add-mcp '{"name":"playwright","command":"npx","args":["@executeautomation/playwright-mcp-server"]}'
# For VS Code Insiders code-insiders --add-mcp '{"name":"playwright","command":"npx","args":["@executeautomation/playwright-mcp-server"]}'

Después de la instalación, el servidor ExecuteAutomation Playwright MCP estará disponible para su uso con su agente GitHub Copilot en VS Code.

Configuración para utilizar Playwright Server

Aquí está la configuración de Claude Desktop para utilizar el servidor Playwright:

{ "mcpServers": { "playwright": { "command": "npx", "args": ["-y", "@executeautomation/playwright-mcp-server"] } } }

Pruebas

Este proyecto utiliza Jest para las pruebas. Las pruebas se encuentran en el directorio src/__tests__ .

Ejecución de pruebas

Puede ejecutar las pruebas utilizando uno de los siguientes comandos:

# Run tests using the custom script (with coverage) node run-tests.cjs # Run tests using npm scripts npm test # Run tests without coverage npm run test:coverage # Run tests with coverage npm run test:custom # Run tests with custom script (same as node run-tests.cjs)

El informe de cobertura de la prueba se generará en el directorio coverage .

Historia de las estrellas

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

Un servidor de protocolo de contexto de modelo que permite a los LLM interactuar con páginas web, tomar capturas de pantalla, generar código de prueba, extraer páginas web y ejecutar JavaScript en un entorno de navegador real.

  1. Screenshot
    1. Documentation | API reference
      1. Installation
        1. Installation in VS Code
      2. Configuration to use Playwright Server
        1. Testing
          1. Running Tests
        2. Star History
          ID: iiafoz7ogl