Back to Home
LokeshSinhaN icon

mcp-playwright-ts

by LokeshSinhaN

Overview

An AI-powered web automation server using Playwright that allows AI models to interpret natural language commands to interact with web browsers, perform actions, extract information, and provide real-time visual feedback.

Installation

Run Command
cd backend && npm run dev

Environment Variables

  • GEMINI_API_KEY
  • GEMINI_MODEL
  • PORT
  • CHROMEDRIVER_PATH

Security Notes

The server exposes direct browser automation actions (navigate, click, type) via the `/api/execute` endpoint. If this server is exposed to untrusted external users, it presents significant risks: - **Server-Side Request Forgery (SSRF) / Open Redirect:** The `navigate` action allows an attacker to direct the server's browser to arbitrary URLs, potentially including internal network resources or malicious external sites. - **Arbitrary Browser Interaction:** The `click` and `type` actions take user-controlled selectors and text, enabling arbitrary interaction with web pages, which could lead to data exfiltration or manipulation if sensitive pages are accessed. - **Code Injection (Critical):** The `generateSelenium` function directly embeds user-provided `cmd.target` and `cmd.value` into a Python script string without apparent sanitization. If the `commands` array is controllable by an untrusted entity, this is a severe arbitrary code injection vulnerability, allowing them to execute any Python code on the server. - **Reliance on AI Safety:** While Gemini AI is used to interpret commands, if the AI itself is susceptible to prompt injection attacks, the underlying direct browser control functions remain exploitable.

Similar Servers

Stats

Interest Score0
Security Score3
Cost ClassHigh
Avg Tokens25000
Stars0
Forks0
Last Update2026-01-19

Tags

AI AutomationWeb ScrapingPlaywrightModel Context ProtocolReal-time