Playwright AI Integration
Submit natural language prompts to an AI chatbot, which will use a browser through an MCP (Model Context Protocol) server to perform actions and generate Playwright tests automatically.
Power your agent
Yayıncıdan kurulum. PlugMCP uç noktası değildir.
Host a copy with our keys and logs.
Registry'de henüz paketlenmiş bir sürüm yok. Deponun README dosyasını izleyin.
Uzak URL mi, yoksa makinenizde bir komut mu? İki kurulum arasındaki fark
PlugMCP’de çalıştır
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
BaşlatYayıncıdan
Submit natural language prompts to an AI chatbot, which will use a browser through an MCP (Model Context Protocol) server to perform actions and generate Playwright tests automatically.
Submit natural language prompts to an AI chatbot, which will use a browser through an MCP (Model Context Protocol) server to perform actions and generate Playwright tests automatically.
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Web Client │───▶│ Express │───▶│ OpenAI API │
│ (Frontend) │ │ Server │ │ (GPT-4) │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│
▼
┌─────────────────┐
│ MCP Server │
│ (Playwright) │
└─────────────────┘
│
▼
┌─────────────────┐
│ Browser │
│ (Chromium) │
└─────────────────┘
Navigate to the project directory:
cd playwright-ai-integration
Install dependencies:
npm install
Install Playwright browsers:
npm run install-browsers
Set up environment variables:
cp .env.example .env
Edit .env and add your OpenAI API key:
OPENAI_API_KEY=your_openai_api_key_here
Start the main server:
npm start
Open your browser and navigate to:
http://localhost:3000
Start a Session:
Submit a Prompt:
Watch the Magic:
Basic Navigation:
Go to example.com and take a screenshot
Form Interaction:
Navigate to httpbin.org/forms/post, fill in the customer name field with "John Doe", and submit the form
Search Functionality:
Go to google.com, search for "playwright testing", and click on the first result
Complex Workflows:
Open github.com, click on sign in, wait for the login form to appear, and take a screenshot
The MCP server provides the following tools for browser automation:
launch_browser - Launch a new browser instancenavigate_to - Navigate to a specific URLclick_element - Click on elements using CSS selectorsfill_input - Fill input fields with textwait_for_element - Wait for elements to appeartake_screenshot - Capture screenshotsget_page_content - Get page informationgenerate_test - Generate Playwright test codeclose_browser - Close the browser instanceplaywright-ai-integration/
├── src/
│ ├── server.js # Express server with WebSocket support
│ ├── ai-integration.js # AI service for processing prompts
│ └── mcp-server.js # MCP server for browser automation
├── public/
│ └── index.html # Web interface
├── tests/
│ └── example.spec.js # Example generated test
├── package.json
├── playwright.config.js
└── README.md
npm run dev
This starts the server with file watching enabled.
npm run mcp-server
npm test
Or with UI mode:
npm run test:ui
POST /api/start-session - Initialize AI integration sessionPOST /api/process-prompt - Process a natural language promptGET /api/session-status - Get current session statusPOST /api/stop-session - Stop the current sessionOPENAI_API_KEY - Your OpenAI API key (required)OPENAI_MODEL - OpenAI model to use (default: gpt-4o-mini)
gpt-4o-mini, gpt-4o, gpt-4-turbo, gpt-3.5-turbogpt-4o-mini is recommended for better availability and lower costsPORT - Server port (default: 3000)HEADLESS - Run browser in headless mode (default: false)The project includes a playwright.config.js file with optimized settings for:
"MCP server not connected" error:
"Browser not launched" error:
npm run install-browsers to install Playwright browsers429 Rate Limit Error:
This error indicates you've hit OpenAI's rate limits. Solutions:
OPENAI_MODEL=gpt-4o-mini to your .env file
gpt-4o-mini has higher rate limits and is more cost-effectiveOpenAI API errors:
Element not found errors:
Set environment variable for verbose logging:
DEBUG=* npm start
This project is licensed under the MIT License.
Submit natural language prompts to an AI chatbot, which will use a browser through an MCP (Model Context Protocol) server to perform actions and generate Playwright tests automatically.
Araçlar
Henüz araç listesi yok. Uzak sunucular ilk sağlık kontrolünden sonra bir liste alır.
SSS
Bu sayfadan Cursor, Claude Desktop, Claude Code veya VS Code için stdio yapılandırmasını kopyalayın. PlugMCP proxy'sini değil, yayıncının kurulumunu kullanır.
Bu kayıtta gerekli bir ortam değişkeni listelenmiyor.
Playwright Ai Integration yerel olarak stdio üzerinden çalışır.
Son kontrol: 2026-10-28. Submit natural language prompts to an AI chatbot, which will use a browser through an MCP (Model Context Protocol) server to perform actions and generate Playwright tests automatically.