Selenium MCP Server
This server lets MCP/AI clients automate web browsers through Selenium WebDriver.
Launch and manage Chrome, Firefox, Edge, or Safari sessions, including headless/options, resize/maximize, close, navigate, refresh, back/forward, and get title/URL/page source.
Switch windows and iframes, manage cookies, take screenshots, and execute JavaScript.
Find elements and interact: click, type, clear, get text/attributes, upload files, hover, double/right-click, drag-and-drop, select dropdowns/checkboxes, submit forms, focus/blur.
Validate element state (displayed/enabled/selected), wait for elements, press keys, and scroll to elements/top/bottom/coordinates/pixels.
Support automated testing, web scraping, and AI-driven browser workflows.
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.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Selenium MCP Server search for 'selenium webdriver documentation' on google and take a screenshot"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Selenium MCP Server
This is a server implementation that bridges the gap between MCP clients (AI assistants) and Selenium WebDriver. It exposes Selenium WebDriver's functionalities as MCP tools, allowing AI models to utilize them for tasks like:
Browser management (launching, navigating, closing browsers)
Element interaction (clicking, typing, finding elements)
Web scraping and automated testing
Advanced operations like screenshots, cookie management, and JavaScript execution
In essence, the selenium webdriver mcp setup allows AI assistants to leverage the power of Selenium Webdriver for web automation, by communicating with a dedicated Selenium MCP server via the Model Context Protocol. This facilitates tasks such as automated web interactions, testing, and data extraction, all controlled by AI.
🚀 Overview
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.
Built with TypeScript and modern ES modules, it offers type-safe browser automation capabilities through the Model Context Protocol.
Related MCP server: mcp-server-webdriver
✨ Key Features
Multi-Browser Support: Chrome, Firefox, Safari, 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)
{
"servers": {
"selenium-mcp": {
"command": "npx",
"args": ["-y", "selenium-webdriver-mcp@latest"]
}
}
}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
{
"servers": {
"selenium-mcp": {
"command": "npx",
"args": [
"-y",
"selenium-webdriver-mcp@latest"
],
"type": "stdio"
}
},
"inputs": []
}
Example 'http' type connection
{
"servers": {
"Selenium": {
"url": "https://smithery.ai/server/@pshivapr/selenium-mcp",
"type": "http"
}
},
"inputs": []
}
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
# For VS Code
code --add-mcp '{\"name\":\"selenium-mcp\",\"command\": \"npx\",\"args\": [\"selenium-webdriver-mcp@latest\"]}'
# For VS Code Insiders
vscode-insiders --add-mcp '{\"name\":\"selenium-mcp\",\"command\": \"npx\",\"args\": [\"selenium-webdriver-mcp@latest\"]}'To install the package using either npm, or Smithery
Using npm:
npm install -g selenium-webdriver-mcp@latestUsing Smithery
To install Selenium MCP for Claude Desktop automatically via Smithery
npx @smithery/cli install @pshivapr/selenium-mcp --client claudeClaude Desktop Integration
Add to your Claude Desktop configuration:
{
"mcpServers": {
"selenium-mcp": {
"command": "npx",
"args": ["-y", "selenium-webdriver-mcp@latest"]
}
}
}Screenshot

Prompts
An example prompt to start AI Agent interaction:
Using selenium mcp tools, navigate to <https://parabank.parasoft.com/> click the 'Register' link and signup using dynamic test data and click register. Then generate selenium tests in <YOUR_FAVOURITE_PROGRAMMING_LANGUAGE> using pom, create tests using cucumber features, steps and execute the tests.
Note: For more prompts, look at examples directory of the project
🛠️ MCP Available Tools
Browser Management Tools
Tool | Description | Parameters |
| Open a new browser session |
|
| Navigate to a URL |
|
| Navigate back in history | None |
| Navigate forward in history | None |
| Get the current page title | None |
| Refresh the current page | None |
| Get the current page URL | None |
| Get the current page HTML source | None |
| Maximize the browser window | None |
| Resize browser window |
|
| Close current browser session | None |
Cookie Management Tools
Tool | Description | Parameters |
| Get all cookies from the current browser session | None |
| Get a specific cookie by name |
|
| Add a new cookie to the browser |
|
| Set a cookie object in the browser |
|
| Delete a specific cookie by name |
|
| Delete all cookies from the current browser session | None |
Window Management Tools
Tool | Description | Parameters |
| Switch to a different browser window by handle |
|
| Switch back to the original browser window | None |
| Switch to a window by its page title |
|
| Switch to a window by its index position |
|
| Switch to a window by its URL |
|
Element Interaction Tools
Tool | Description | Parameters |
| Find an element on the page |
|
| Find multiple elements on the page |
|
| Click on an element |
|
| Type text into an element |
|
| Get text content of element |
|
| Upload file via input element |
|
| Clear text from an element |
|
| Get element attribute value |
|
Element State Validation Tools
Tool | Description | Parameters |
| Check if an element is visible on the page |
|
| Check if an element is enabled for interaction |
|
| Check if an element is selected (checkboxes, radio buttons) |
|
Frame Management Tools
Tool | Description | Parameters |
| Switch to an iframe element |
|
| Switch to the parent frame (from nested iframe) | None |
| Switch back to the main page content | None |
Advanced Action Tools
Tool | Description | Parameters |
| Hover over an element |
|
| Double-click on an element |
|
| Right-click (context menu) |
|
| Drag from source to target |
|
| Wait for element to appear |
|
| Execute JavaScript code |
|
| Take a screenshot |
|
| Select dropdown option by visible text |
|
| Select dropdown option by value |
|
| Press a keyboard key in the browser |
|
Scrolling Tools
Tool | Description | Parameters |
| Scroll to bring an element into view |
|
| Scroll to the top of the page | None |
| Scroll to the bottom of the page | None |
| Scroll to specific coordinates |
|
| Scroll by specified number of pixels |
|
Form Interaction Tools
Tool | Description | Parameters |
| Select/check a checkbox |
|
| Unselect/uncheck a checkbox |
|
| Submit a form element |
|
| Focus on a specific element |
|
| Remove focus from a specific element |
|
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, Safari, or Edge installed
WebDrivers: Automatically managed by selenium-webdriver
Operating System: Windows, macOS, or Linux
🚦 Development
Getting Started
Clone the repository
git clone https://github.com/pshivapr/selenium-mcp.git
cd selenium-mcpInstall dependencies
npm installBuild the project
npm run buildRunning the Server
Production Mode
npm startDevelopment Mode (with auto-reload)
npm run devDirect Execution
node dist/index.jsUsing as CLI Tool
After building, you can use the server as a global command:
npx selenium-webdriver-mcp@latest📝 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
Badges/Mentions
Built with ❤️ for the Model Context Protocol ecosystem
Available Tools
56 toolsbrowser_add_cookie_by_nameC
Add a cookie to the browser
Inputs: name (required), value (required).
browser_blur_elementC
Remove focus from a specific element
Inputs: by (required), value (required), timeout.
browser_clearB
Clears the value of an input element
Inputs: by (required), value (required), timeout.
browser_clickC
Perform a click on an element
Inputs: by (required), value (required), timeout.
browser_closeA
Close the current browser session
Inputs: no named parameters.
browser_delete_cookieC
Delete a cookie from the browser
Inputs: name (required).
browser_delete_cookiesC
Delete cookies from the browser
Inputs: no named parameters.
browser_double_clickC
Perform double click on an element
Inputs: by (required), value (required), timeout.
browser_drag_and_dropC
Perform drag and drop between two elements
Inputs: by (required), value (required), targetBy (required), targetValue (required), +1 more.
browser_element_is_displayedC
Checks if an element is displayed
Inputs: by (required), value (required), timeout.
browser_element_is_enabledC
Checks if an element is enabled
Inputs: by (required), value (required), timeout.
browser_element_is_selectedC
Checks if an element is selected
Inputs: by (required), value (required), timeout.
browser_execute_scriptC
Execute JavaScript in the context of the current page
Inputs: script (required).
browser_file_uploadC
Uploads a file using a file input element
Inputs: by (required), value (required), filePath (required), timeout.
browser_find_elementC
Find an element
Inputs: by (required), value (required), timeout.
browser_find_elementsC
Find multiple elements
Inputs: by (required), value (required), timeout.
browser_focus_elementC
Focus on a specific element
Inputs: by (required), value (required), timeout.
browser_get_attributeC
Gets the value of an attribute from an element
Inputs: by (required), value (required), attribute (required), timeout.
browser_get_cookie_by_nameC
Get a cookie by name
Inputs: name (required).
browser_get_cookiesC
Get all cookies
Inputs: no named parameters.
browser_get_element_textC
Gets the text of an element
Inputs: by (required), value (required), timeout.
browser_get_page_sourceB
Get the current page source
Inputs: no named parameters.
browser_get_urlA
Get the current page URL
Inputs: no named parameters.
browser_hoverC
Hover over an element
Inputs: by (required), value (required), timeout.
browser_key_pressC
Press a key on the keyboard
Inputs: key (required).
browser_maximizeB
Maximize the browser window
Inputs: no named parameters.
browser_openC
Open a new browser session
Inputs: browser (required), options.
browser_refreshA
Refresh the current page
Inputs: no named parameters.
browser_resizeC
Resize the browser window
Inputs: width (required), height (required).
browser_right_clickB
Perform right click (context click) on an element
Inputs: by (required), value (required), timeout.
browser_screenshotC
Take a screenshot of the current page
Inputs: outputPath.
browser_scroll_by_pixelsC
Scroll by a specific number of pixels
Inputs: x (required), y (required).
browser_scroll_to_bottomB
Scroll to the bottom of the page
Inputs: no named parameters.
browser_scroll_to_coordinatesC
Scroll to specific coordinates
Inputs: x (required), y (required).
browser_scroll_to_elementC
Scroll to an element
Inputs: by (required), value (required), timeout.
browser_scroll_to_topA
Scroll to the top of the page
Inputs: no named parameters.
browser_select_checkboxC
Select a checkbox
Inputs: by (required), value (required), timeout.
browser_select_dropdown_by_textC
Select dropdown by visible text
Inputs: by (required), text (required), value (required), timeout.
browser_select_dropdown_by_valueC
Select dropdown by value
Inputs: by (required), value (required), timeout.
browser_set_cookie_objectC
Set a cookie in the browser
Inputs: cookie (required).
browser_submit_formC
Submit a form
Inputs: by (required), value (required), timeout.
browser_switch_to_default_contentB
Switches to the default content
Inputs: no named parameters.
browser_switch_to_frameC
Switches to an iframe element
Inputs: by (required), value (required), timeout.
browser_switch_to_original_windowA
Switches back to the original browser window
Inputs: no named parameters.
browser_switch_to_parent_frameB
Switches to the parent iframe
Inputs: no named parameters.
browser_switch_to_windowC
Switch to a different browser window
Inputs: windowHandle (required).
browser_switch_to_window_by_titleC
Switch to a window by its title
Inputs: title (required).
browser_switch_to_window_by_urlC
Switch to a window by its URL
Inputs: url (required).
browser_switch_window_by_indexC
Switch to a window by its index
Inputs: index (required).
browser_titleA
Get the current page title
Inputs: no named parameters.
browser_typeC
Type into an editable field
Inputs: by (required), text (required), value (required), timeout.
browser_unselect_checkboxC
Unselect a checkbox
Inputs: by (required), value (required), timeout.
browser_wait_for_elementC
Wait for an element to be present
Inputs: by (required), value (required), timeout (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 56 tools
Most tools map to clearly distinct Selenium actions, but window-switching and cookie tools overlap (e.g., add_cookie_by_name vs set_cookie_object, multiple switch_to_window variants), and several scroll tools could be confused without careful reading. Descriptions help, but boundaries are not perfectly crisp.
All names use the browser_ prefix and snake_case, giving the set a predictable, readable structure. However, the verb/noun pattern is not uniform: some are verb-only (browser_refresh, browser_maximize) or noun-only (browser_title), and element-state getters use subject_is_state phrasing.
56 tools far exceeds the 3-15 well-scoped range and passes the 50+ threshold for extreme mismatch. Many granular low-level operations could be consolidated, making the surface unwieldy for an agent.
Core lifecycle and interaction coverage is strong: open/close, navigation, find, click/type/clear, frames, windows, cookies, screenshots, scrolling, upload, and script execution. Notable gaps include alert/dialog handling and explicit wait conditions beyond element presence, so a few common automation workflows may dead-end.
Maintenance
Related MCP Connectors
AI-powered browser automation — navigate, click, fill forms, and extract data from any website.
Control a real browser from AI agents: navigate, click, type, screenshot, read the page.
Stealth web automation for AI agents. Login, signup, navigate, screenshot.
Stealth web automation for AI agents. Login, signup, navigate, screenshot.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to automate browser interactions using Selenium WebDriver, supporting multiple browsers and tools for navigation, clicking, typing, screenshots, and more.MIT
- AlicenseAqualityBmaintenanceEnables AI agents to control a real web browser (Firefox) via Selenium WebDriver, supporting page navigation, interaction, and inspection through natural language.434MIT
- AlicenseNot gradedqualityNot gradedmaintenanceEnables AI assistants to control a browser for web automation tasks like navigation, typing, clicking, and taking screenshots.Apache 2.0
- AlicenseNot gradedqualityNot gradedmaintenanceEnables AI assistants to control a browser for web automation tasks such as navigation, typing, clicking, and taking screenshots.Apache 2.0