Logo di Playwright

Playwright

Community
VikashLoomba

MCP server for browser automation using Playwright

AutoreVikashLoomba
RepositoryMCP-Server-Playwright
LinguaJavaScript
Fork
51
Stelle
299
Strumenti disponibili
10
Tipo di trasportostdio
Categorie
LicenzaMIT
Link
  • Collega gli strumenti ai flussi di lavoro IA

    Playwright mette a disposizione funzionalità MCP utilizzabili da client e agenti IA compatibili.

  • 10 strumenti disponibili

    Esplora le azioni richiamabili qui sotto, con nomi e descrizioni quando forniti dal server.

  • Configurazione pronta da copiare

    Usa gli esempi di installazione per configurare questo server nel tuo client MCP preferito.

  • Indicatori di interesse open source

    299 stelle e 51 fork nel repository collegato.

Table of Contents

Features

  • 🌐 Full browser automation capabilities
  • 📸 Screenshot capture of entire pages or specific elements
  • 🖱️ Comprehensive web interaction (navigation, clicking, form filling)
  • 📊 Console log monitoring
  • 🔧 JavaScript execution in browser context

Installation

Installing via Smithery

To install MCP Server Playwright for Claude Desktop automatically via Smithery:

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

You can install the package using either npx or mcp-get:

Using npx:

bash
npx @automatalabs/mcp-server-playwright install

This command will:

  1. Check your operating system compatibility (Windows/macOS)
  2. Create or update the Claude configuration file
  3. Configure the Playwright server integration

The configuration file will be automatically created/updated at:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Using mcp-get:

bash
npx @michaellatman/mcp-get@latest install @automatalabs/mcp-server-playwright

Configuration

The installation process will automatically add the following configuration to your Claude config file:

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

Using with Cursor

You can also use MCP Server Playwright with Cursor, an AI-powered code editor. To enable browser automation in Cursor via MCP:

  1. Install Playwright browsers (if not already):

    bash
    npx playwright install
  2. Install MCP Server Playwright for Cursor using Smithery:

    bash
    npx -y @smithery/cli install @automatalabs/mcp-server-playwright --client cursor
  3. Configuration file setup:
    If you do not use Claude, the configuration file (claude_desktop_config.json) may not be created automatically.

    • On Windows, create a folder named Claude in %APPDATA% (usually C:\Users\<YourName>\AppData\Roaming\Claude).
    • Inside that folder, create a file named claude_desktop_config.json with the following content:
    json
    {
      "serverPort": 3456
    }
  4. Follow the remaining steps in the Installation section above to complete the setup.

Now, you can use all the browser automation tools provided by MCP Server Playwright directly from Cursor’s AI features, such as web navigation, screenshot capture, and JavaScript execution.

Note: Make sure you have Node.js installed and npx available in your system PATH.

Components

Tools

browser_navigate

Navigate to any URL in the browser

javascript
{
  "url": "https://stealthbrowser.cloud"
}

browser_screenshot

Capture screenshots of the entire page or specific elements

javascript
{
  "name": "screenshot-name",     // required
  "selector": "#element-id",     // optional
  "fullPage": true              // optional, default: false
}

browser_click

Click elements on the page using CSS selector

javascript
{
  "selector": "#button-id"
}

browser_click_text

Click elements on the page by their text content

javascript
{
  "text": "Click me"
}

browser_hover

Hover over elements on the page using CSS selector

javascript
{
  "selector": "#menu-item"
}

browser_hover_text

Hover over elements on the page by their text content

javascript
{
  "text": "Hover me"
}

browser_fill

Fill out input fields

javascript
{
  "selector": "#input-field",
  "value": "Hello World"
}

browser_select

Select an option in a SELECT element using CSS selector

javascript
{
  "selector": "#dropdown",
  "value": "option-value"
}

browser_select_text

Select an option in a SELECT element by its text content

javascript
{
  "text": "Choose me",
  "value": "option-value"
}

browser_evaluate

Execute JavaScript in the browser console

javascript
{
  "script": "document.title"
}

Resources

  1. Console Logs (console://logs)

    • Access browser console output in text format
    • Includes all console messages from the browser
  2. Screenshots (screenshot://<n>)

    • Access PNG images of captured screenshots
    • Referenced by the name specified during capture

License

This project is licensed under the MIT License - see the LICENSE file for details.

Installazione

TypingMind
Prerequisiti:

Node.js 18+

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

Strumenti disponibili

  • browser_navigate

    Navigate to a URL

  • browser_screenshot

    Take a screenshot of the current page or a specific element

  • browser_click

    Click an element on the page using CSS selector

  • browser_click_text

    Click an element on the page by its text content

  • browser_fill

    Fill out an input field

  • browser_select

    Select an element on the page with Select tag using CSS selector

  • browser_select_text

    Select an element on the page with Select tag by its text content

  • browser_hover

    Hover an element on the page using CSS selector

  • browser_hover_text

    Hover an element on the page by its text content

  • browser_evaluate

    Execute JavaScript in the browser console

Usa MCP Playwright con più modelli IA

TypingMind collega gli strumenti MCP a livello di area di lavoro: una volta connesso Playwright, puoi usarlo con diversi modelli IA in TypingMind, senza configurarlo separatamente per ogni modello. Questa integrazione MCP viene eseguita localmente sul tuo dispositivo tramite il connettore MCP di TypingMind.

Guida alla configurazione del connettore locale

Usa questo metodo quando il server MCP deve accedere a file locali, app o risorse private sul tuo computer.

1

Apri le impostazioni MCP

In TypingMind, vai su Impostazioni, Impostazioni avanzate, poi su Model Context Protocol e scegli Configura MCP.

  1. Apri TypingMind nel tuo browser.
  2. Fai clic sull'icona Impostazioni.
  3. Vai a Impostazioni avanzate.
  4. Apri la sezione Model Context Protocol.
  5. Fai clic su Configura MCP e scegli Questo dispositivo.
Schermata di configurazione del connettore MCP di TypingMind con Questo dispositivo selezionato
2

Esegui il comando del connettore

Scegli Questo dispositivo, copia il comando da TypingMind ed eseguilo nel terminale. Lascia il processo in esecuzione mentre usi MCP.

  1. Copia il comando di configurazione mostrato da TypingMind.
  2. Apri Terminale su macOS o Windows Terminal su Windows.
  3. Incolla ed esegui il comando.
  4. Conferma l'installazione del pacchetto se il terminale ti chiede di procedere.
  5. Tieni aperta la finestra del terminale con il processo in esecuzione mentre usi gli strumenti MCP.
3

Aggiungi Playwright come server

Quando lo stato del connettore è Pronto, fai clic su Modifica server e incolla la configurazione del server MCP.

  1. Attendi che lo stato del connettore sia Pronto.
  2. Fai clic su Modifica server.
  3. Incolla la configurazione del server MCP di Playwright.
  4. Salva l'elenco dei server.
  5. Aggiorna per verificare che il connettore sia ancora pronto.
Impostazioni MCP di TypingMind con un server attivo e il pulsante Modifica server
{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": [
        "-y",
        "@automatalabs/mcp-server-playwright"
      ]
    }
  }
}
4

Usa la connessione con diversi modelli

Salva l'elenco dei server, apri Plugin, abilita gli strumenti MCP di Playwright, poi seleziona un modello IA supportato in TypingMind e usa gli strumenti in chat o assegnali a un agente IA.

  1. Apri la pagina Plugin in TypingMind.
  2. Abilita gli strumenti MCP di Playwright.
  3. Avvia una chat e scegli il modello IA che vuoi usare.
  4. Usa gli strumenti MCP in chat o assegnali a un agente IA.
  5. Passa a un altro modello IA quando serve, senza riconnettere MCP.
Chat di TypingMind che usa gli strumenti MCP abilitati con un modello IA selezionato
Puoi usare Playwright per aiutarmi con questa attività?
Playwright
Certo. Ho letto.
Ecco cosa ho trovato con Playwright.

Domande frequenti

A cosa serve il server MCP Playwright?

Playwright è un server MCP che consente ai client IA compatibili di accedere a strumenti e informazioni di contesto esterni. In TypingMind puoi aggiungere questo server MCP una sola volta e rendere disponibili i suoi strumenti nella tua area di lavoro IA.

Posso usare Playwright MCP con più modelli IA in TypingMind?

Sì. TypingMind collega gli strumenti MCP a livello di area di lavoro, quindi puoi usare Playwright con diversi modelli IA come Claude, ChatGPT, Gemini o altri modelli che hai configurato in TypingMind, senza dover configurare il server MCP separatamente per ogni modello.

Perché usare il connettore MCP Playwright con TypingMind?

TypingMind è una delle migliori interfacce per chattare con gli LLM perché riunisce più modelli IA, prompt, plugin, agenti IA, chiavi API e strumenti MCP in un'unica area di lavoro. Collegando Playwright, puoi usare i suoi strumenti MCP con i tuoi modelli preferiti e mantenere organizzato il tuo flusso di lavoro in chat su TypingMind.

Come collego Playwright MCP a TypingMind?

Playwright funziona tramite il connettore MCP locale di TypingMind. È la soluzione ideale quando il server MCP deve accedere a file locali, app desktop, strumenti da riga di comando o risorse private sul tuo computer.

Quali strumenti offre Playwright MCP in TypingMind?

Playwright mette a disposizione 10 strumenti MCP che puoi attivare dalla pagina Plugin di TypingMind e usare in chat o assegnare agli agenti IA.

Devo condividere le mie chiavi API con TypingMind per usare Playwright MCP?

No. TypingMind privilegia il funzionamento in locale e ti permette di mantenere il controllo su fornitori di modelli, chiavi API, prompt e configurazione MCP. Se Playwright richiede l'autenticazione, aggiungi le intestazioni, le impostazioni OAuth o la configurazione locale necessarie per quel server MCP quando crei la connessione.

Server MCP correlati

Vedi tutti

Crea subito la tua area di lavoro IA

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇