Provides comprehensive web browser automation tools including multi-browser support (Chrome, Firefox, Edge), element interaction (click, type, hover, drag & drop), navigation control, wait strategies, and JavaScript execution for automated testing and web scraping.
Selenium MCP Server
A Model Context Protocol (MCP) server for Selenium that provides comprehensive Selenium WebDriver automation tools for AI assistants and applications. This server enables automated web browser interactions, testing, and scraping through a standardized interface.
🚀 Overview
The Selenium MCP Server bridges the gap between AI models and web automation by providing a robust set of tools for browser control, element interaction, and web testing. Built with TypeScript and modern ES modules, it offers type-safe browser automation capabilities through the Model Context Protocol.
✨ Key Features
- Multi-Browser Support: Chrome, Firefox, and Edge browser automation
- Comprehensive Element Interaction: Click, type, hover, drag & drop, file uploads
- Advanced Navigation: Forward, backward, refresh, window management
- Wait Strategies: Intelligent waiting for elements and page states
- Type Safety: Full TypeScript implementation with Zod validation
🤝 Integration
MCP Client Integration
Configure your MCP client to connect to the Selenium server:
Standard Configuration (applicable to Windsurf, Warp, Gemini CLI etc)
Installation in VS Code
Update your mcp.json
in VS Code with below configuration
NOTE: If you're new to MCP servers, follow this link Use MCP servers in VS Code
Example 'stdio' type connection
Example 'http' type connection
After installation, the Selenium MCP server will be available for use with your GitHub Copilot agent in VS Code.
To install the Selenium MCP server using the VS Code CLI
To install the package using either npm, or Smithery
Using npm:
Using
To install Selenium MCP for Claude Desktop automatically via Smithery:
Claude Desktop Integration
Add to your Claude Desktop configuration:
Screenshot
🛠️ MCP Available Tools
Browser Management Tools
Tool | Description | Parameters |
---|---|---|
browser_open | Open a new browser session | browser , options |
browser_navigate | Navigate to a URL | url |
browser_navigate_back | Navigate back in history | None |
browser_navigate_forward | Navigate forward in history | None |
browser_title | Get the current page title | None |
browser_refresh | Refresh the current page | None |
browser_resize | Resize browser window | width , height |
browser_switch_tab_or_window | Switch to a tab or window | handle |
browser_switch_to_original_window | Switch to the original window | None |
browser_close | Close current browser session | None |
Element Interaction Tools
Tool | Description | Parameters |
---|---|---|
browser_find_element | Find an element on the page | by , value , timeout |
browser_click | Click on an element | by , value , timeout |
browser_type | Type text into an element | by , value , text , timeout |
browser_get_element_text | Get text content of element | by , value , timeout |
browser_file_upload | Upload file via input element | by , value , filePath , timeout |
browser_clear | Clear text from an element | by , value , timeout |
browser_get_attribute | Get element attribute value | by , value , attribute , timeout |
browser_element_is_displayed | Check if element is displayed | by , value , timeout |
browser_switch_to_frame | Switch to a frame by locator | by , value , timeout , timeout |
Advanced Action Tools
Tool | Description | Parameters |
---|---|---|
browser_hover | Hover over an element | by , value , timeout |
browser_double_click | Double-click on an element | by , value , timeout |
browser_right_click | Right-click (context menu) | by , value , timeout |
browser_drag_and_drop | Drag from source to target | by , value , targetBy , targetValue , timeout |
browser_wait_for_element | Wait for element to appear | by , value , timeout |
browser_scroll_to_element | Scroll element into view | by , value , timeout |
browser_execute_script | Execute JavaScript code | script , args |
browser_screenshot | Take a screenshot | filename (optional) |
browser_select_dropdown_by_text | Select dropdown option by visible text | by , value , text , timeout |
browser_select_dropdown_by_value | Select dropdown option by value | by , value , dropdownValue , timeout |
browser_key_press | Press a keyboard key in the browser | key , timeout |
Element Locator Strategies
id
: Find by element IDcss
: Find by CSS selectorxpath
: Find by XPath expressionname
: Find by name attributetag
: Find by HTML tag nameclass
: Find by CSS class name
📋 Requirements
- Node.js: Version 18.0.0 or higher
- Browsers: Chrome, Firefox, or Edge installed
- WebDrivers: Automatically managed by selenium-webdriver
- Operating System: Windows, macOS, or Linux
🚦 Development
Getting Started
- Clone the repository:
- Install dependencies:
- Build the project:
Running the Server
Production Mode
Development Mode (with auto-reload)
Direct Execution
Using as CLI Tool
After building, you can use the server as a global command:
📝 License
MIT License - see LICENSE file for details.
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
📊 Version History
- 0.2.0 - Selenium MCP Server
- Multi-browser support (Chrome, Firefox, Edge)
- Complete element interaction toolset
- Advanced action capabilities
- Type-safe TypeScript implementation
- MCP protocol compliance
Built with ❤️ for the Model Context Protocol ecosystem
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
Enables AI assistants to automate web browser interactions through Selenium WebDriver. Supports multi-browser automation, element interaction, navigation, and web testing capabilities.
Related MCP Servers
- AsecurityAlicenseAqualityFacilitates browser automation with custom capabilities and agent-based interactions, integrated through the browser-use library.Last updated -1791MIT License
- -securityAlicense-qualityEmpowers AI agents to perform web browsing, automation, and scraping tasks with minimal supervision using natural language instructions and Selenium.Last updated -4Apache 2.0
- AsecurityAlicenseAqualityAllows AI agents to control web browser sessions via Selenium WebDriver, enabling web automation tasks like scraping, testing, and form filling through the Model Context Protocol.Last updated -6223MIT License
- -securityFlicense-qualityEnables AI assistants to control a browser through a set of tools, allowing them to perform web automation tasks like navigation, typing, clicking, and taking screenshots.Last updated -