Provides browser automation capabilities for Firefox, enabling navigation, element interaction, form filling, screenshots, and JavaScript execution.
Enhances GitHub Copilot Chat with browser automation capabilities, allowing it to navigate websites, interact with elements, capture screenshots, and execute JavaScript in the browser context.
Enables execution of custom JavaScript in browser contexts, allowing for advanced manipulation and extraction of data from web pages.
Integrates with Ollama to provide AI-powered screenshot analysis using Gemma3 models, allowing for visual interpretation of web pages, structure analysis, and element identification.
Built with TypeScript for type-safety throughout the codebase, providing robust typing for browser automation tools and functions.
Uses Zod for runtime validation of inputs and outputs, ensuring type safety and proper data validation during browser automation tasks.
MCP Browser Server
A Model Context Protocol (MCP) server that provides browser automation capabilities using Playwright. This server enables AI assistants to interact with web pages through a standardized interface.
Perfect for web automation, testing, and debugging workflows with AI assistants including:
- Chat.fans agents - Empower AI agents with web interaction capabilities in VS Code
- GitHub Copilot Chat - Enhance your development workflow with browser automation
- Any MCP-compatible AI assistant - Universal browser automation for AI tools
Features
- Multi-browser support: Chromium, Firefox, and WebKit
- Comprehensive automation: Navigate, click, type, screenshot, and more
- JavaScript execution: Run custom scripts in the browser context
- Element interaction: Wait for elements, get text content, and interact with forms
- Screenshot capabilities: Capture full pages or viewport screenshots
- Type-safe: Built with TypeScript and runtime validation using Zod
Installation
Make sure Playwright browsers are installed:
For system dependencies (Linux):
Usage
VS Code Integration
Configure the MCP server in VS Code by adding to your settings.json
or workspace configuration:
Once configured, Chat.fans agents and GitHub Copilot Chat can use browser automation tools for web testing, scraping, and automation tasks.
Available VS Code Tasks
- Build:
Ctrl+Shift+P
→ "Tasks: Run Task" → "build" - Development Mode:
Ctrl+Shift+P
→ "Tasks: Run Task" → "dev" - Test MCP Server:
Ctrl+Shift+P
→ "Tasks: Run Task" → "test-mcp-server"
Available Tools
- launch_browser - Start a new browser instance
- navigate - Go to a specific URL
- click_element - Click on page elements
- type_text - Enter text into form fields
- screenshot - Capture page screenshots
- get_element_text - Extract text from elements
- wait_for_element - Wait for elements to appear/disappear
- evaluate_javascript - Run custom JavaScript
- get_console_logs - Get browser console logs (log, info, warn, error, debug)
- analyze_screenshot - AI-powered screenshot analysis using Gemma3 (requires Ollama)
- get_page_info - Get current page information
- close_browser - Close the browser instance
Example: Web Application Testing
AI-Powered Screenshot Analysis
The analyze_screenshot
tool provides AI-powered analysis of web pages using local Gemma3 models via Ollama. This feature can describe what's visible on a page, analyze page structure, and look for specific elements based on context.
Prerequisites
- Install Ollama: Download from ollama.ai
- Install Gemma3 model:
- Start Ollama service:
Usage Examples
Basic Screenshot Analysis
Detailed Structural Analysis
Context-Specific Analysis
Parameters
- fullPage (boolean): Capture entire scrollable page vs viewport only
- path (string): Optional file path to save the screenshot
- pretext (string): Additional context or specific instructions for the AI
- model (string): AI model to use (default: "gemma3:4b")
- detailed (boolean): Request detailed structural analysis
Supported Models
gemma3:4b
(default, good balance of speed and quality)- Any other vision-capable model available in your Ollama installation
Development & Testing
Quick Setup
Development Commands
Testing
The project includes comprehensive tests in the tests/
directory:
Development Helper
Use the development helper for common tasks:
For more details about testing, see tests/README.md.
Project Structure
License
Dual License:
- Personal Use: Free for personal, educational, and non-commercial use
- Commercial Use: Requires a separate commercial license
See LICENSE for full terms. For commercial licensing inquiries, please contact us.
This server cannot be installed
A Model Context Protocol server that enables AI assistants to interact with web browsers through Playwright, providing automation capabilities for navigation, interaction, and screenshots.
Related MCP Servers
- AsecurityFlicenseAqualityA server that enables browser automation using Playwright, allowing interaction with web pages, capturing screenshots, and executing JavaScript in a browser environment through LLMs.Last updated -129,4571TypeScript
- AsecurityFlicenseAqualityA Model Context Protocol server that enables AI agents to generate, fetch, and manage UI components through natural language interactions.Last updated -3194TypeScript
- -securityAlicense-qualityA Model Context Protocol server that provides real-time web search capabilities to AI assistants through pluggable search providers, currently integrated with the Brave Search API.Last updated -3TypeScriptMIT License
- -security-license-qualityA Model Context Protocol server that connects to a payments company's developer portal, providing AI assistants with access to payment documentation, APIs, and guides.Last updated -JavaScript