What is MCP Browser Server?
A Model Context Protocol (MCP) server that provides browser automation capabilities using Playwright. It enables AI assistants to interact with web pages through a standardized interface, supporting multi-browser automation (Chromium, Firefox, WebKit) with tools for navigation, clicking, typing, screenshotting, and JavaScript execution. It is designed for AI-powered web testing, scraping, and debugging workflows.
How to use MCP Browser Server?
Install dependencies via npm install, build with npm run build, and ensure Playwright browsers are installed using npx playwright install. For VS Code integration, configure the server in settings.json as an MCP server with the command node pointing to the built index.js. Once configured, any MCP-compatible AI assistant (such as Chat.fans agents or GitHub Copilot Chat) can invoke the provided tools.
Key features of MCP Browser Server
- Multi-browser support: Chromium, Firefox, and WebKit
- Comprehensive automation: navigate, click, type, screenshot, and more
- JavaScript execution in the browser context
- Element interaction: wait for elements, get text, interact with forms
- Scroll tool with direction, pixel, and behavior control
- Scrollability check tool
- AI-powered screenshot analysis using Gemma3 via Ollama (optional)
- Type-safe implementation with TypeScript and Zod
Use cases of MCP Browser Server
- Automate web application testing with AI assistants
- Perform web scraping and data extraction
- Debug web pages by capturing screenshots and console logs
- Run custom JavaScript on live pages for verification
- Analyze page structure and content with vision-capable AI models
Comments