browser-automation-server
A Model Context Protocol (MCP) server that provides browser automation capabilities for Claude and other MCP-compatible AI assistants.
Browser Automation MCP Server
A Model Context Protocol (MCP) server that provides browser automation capabilities for Claude and other MCP-compatible AI assistants.
Features
- Web Automation: Control web browsers programmatically
- Screenshot Capture: Take screenshots of web pages
- Element Interaction: Click, type, and interact with web elements
- Navigation: Navigate between pages and manage browser state
- Form Filling: Automate form filling and submission
- Data Extraction: Extract data from web pages
Installation
# Clone the repository
git clone https://github.com/samihalawa/browser-automation-server.git
cd browser-automation-server
# Install dependencies
npm install
# Build the server
npm run build
Usage
Starting the Server
npm start
Configuration
Add the server to your MCP configuration:
{
"servers": {
"browser-automation": {
"command": "/path/to/node",
"args": ["/path/to/browser-automation-server/build/index.js"],
"enabled": true,
"port": 3008,
"environment": {
"NODE_PATH": "/path/to/node_modules",
"PATH": "/usr/local/bin:/usr/bin:/bin"
}
}
}
}
Available Tools
navigate
Navigate to a URL.
Parameters:
url
(string, required): URL to navigate towaitUntil
(string, optional): Navigation wait condition. Options: 'load', 'domcontentloaded', 'networkidle'. Default: 'load'
screenshot
Take a screenshot of the current page.
Parameters:
fullPage
(boolean, optional): Whether to capture full page or just viewport. Default: falsepath
(string, optional): Path to save the screenshot to. If not provided, returns base64 encoded image
click
Click on an element.
Parameters:
selector
(string, required): CSS selector of the element to clickwaitForSelector
(boolean, optional): Whether to wait for the selector to appear. Default: true
type
Type text into an input field.
Parameters:
selector
(string, required): CSS selector of the input elementtext
(string, required): Text to typedelay
(number, optional): Delay between keystrokes in milliseconds. Default: 0
extract
Extract data from the page.
Parameters:
selector
(string, required): CSS selector of the elements to extractattribute
(string, optional): Attribute to extract. If not provided, extracts text content
evaluate
Evaluate JavaScript in the browser context.
Parameters:
script
(string, required): JavaScript code to evaluateargs
(array, optional): Arguments to pass to the script
Example Usage
-
Navigate to a website:
navigate(url: "https://example.com")
-
Take a screenshot:
screenshot(fullPage: true)
-
Click a button:
click(selector: "#submit-button")
-
Fill a form:
type(selector: "#username", text: "user123") type(selector: "#password", text: "password123") click(selector: "#login-button")
-
Extract data:
extract(selector: ".product-title", attribute: "innerText")
Requirements
- Node.js 14+
- Playwright for browser automation
License
MIT
Related MCP Servers
View all browser_automation servers →Fetch
by modelcontextprotocol
A Model Context Protocol server that provides web content fetching capabilities, enabling LLMs to retrieve and process content from web pages.
markdownify-mcp
by zcaceres
Markdownify is a Model Context Protocol (MCP) server that converts various file types and web content to Markdown format.
mcp-playwright
by executeautomation
A Model Context Protocol server that provides browser automation capabilities using Playwright.
playwright-mcp
by microsoft
Playwright MCP is a Model Context Protocol server that provides browser automation capabilities using Playwright, enabling LLMs to interact with web pages through structured accessibility snapshots.
cursor-talk-to-figma-mcp
by sonnylazuardi
This project implements a Model Context Protocol (MCP) integration between Cursor AI and Figma, allowing Cursor to communicate with Figma for reading designs and modifying them programmatically.
firecrawl-mcp-server
by mendableai
Firecrawl MCP Server is a Model Context Protocol server implementation that integrates with Firecrawl for web scraping capabilities.
ai-agent-marketplace-index-mcp
by AI-Agent-Hub
MCP Server for AI Agent Marketplace Index from DeepNLP, allowing AI assistants to search available AI agents by keywords or categories.