Selenium MCP Server
Provides browser automation using Selenium WebDriver, enabling web navigation, element interaction, screenshots, and JavaScript execution via MCP.
README
Selenium MCP Server
A Model Context Protocol (MCP) server that provides browser automation capabilities using Selenium WebDriver.
Features
- Browser Automation: Navigate, click, type, and interact with web pages
- Element Interaction: Find elements by CSS selectors, wait for elements, get text content
- Screenshots: Capture screenshots of the current page
- JavaScript Execution: Execute custom JavaScript in the browser
- Page Information: Get page title and current URL
- Headless Mode: Run browser in headless mode for CI/CD environments
Prerequisites
- Node.js (v16 or higher)
- Chrome browser (for WebDriver)
- npm
Installation
- Install dependencies:
npm install
- Configure the server by editing
config.json:
{
"selenium": {
"browser": "chrome",
"headless": true,
"timeout": 30000,
"windowSize": {
"width": 1920,
"height": 1080
}
}
}
Usage
Starting the Server
npm start
The server runs on stdio and communicates using the MCP protocol.
Available Tools
The server provides the following tools:
-
navigate - Navigate to a URL
- Parameters:
url(string, required)
- Parameters:
-
click - Click on an element
- Parameters:
selector(string, required) - CSS selector
- Parameters:
-
type - Type text into an element
- Parameters:
selector(string, required),text(string, required)
- Parameters:
-
get_text - Get text content of an element
- Parameters:
selector(string, required)
- Parameters:
-
wait_for_element - Wait for an element to be present
- Parameters:
selector(string, required),timeout(number, optional)
- Parameters:
-
screenshot - Take a screenshot
- Parameters:
filename(string, optional)
- Parameters:
-
get_title - Get the page title
- Parameters: none
-
get_url - Get the current URL
- Parameters: none
-
execute_script - Execute JavaScript
- Parameters:
script(string, required)
- Parameters:
-
close_browser - Close the browser session
- Parameters: none
Configuration
Edit config.json to customize:
- browser: Browser to use (chrome, firefox, etc.)
- headless: Run in headless mode (true/false)
- timeout: Default timeout for operations (milliseconds)
- windowSize: Browser window dimensions
Example Usage
Here's an example of how to use the server tools:
- Navigate to a page:
navigate: { "url": "https://example.com" }
- Wait for an element:
wait_for_element: { "selector": "#login-button" }
- Type into an input:
type: { "selector": "#username", "text": "user123" }
- Click a button:
click: { "selector": "#login-button" }
- Take a screenshot:
screenshot: { "filename": "login.png" }
- Close the browser:
close_browser: {}
Troubleshooting
- Ensure Chrome browser is installed
- Make sure ChromeDriver is compatible with your Chrome version
- Check that the port in config.json is not already in use
- Verify Node.js version is 16 or higher
License
ISC
AI_Automation_Framework_With_MCP_Server
This is an Automation framework which is built with AI using MCP Server,Java MCP Client and Automated Flows of Google Search
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.