SeleniumMCP
Provides browser automation capabilities through Selenium WebDriver, allowing AI agents to interact with web pages by navigating, clicking, filling forms, extracting data, taking screenshots, and managing browser state.
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., "@SeleniumMCP navigate to google.com 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
Deployment-ready Python MCP server for Selenium browser automation. It supports local STDIO usage and production-style Streamable HTTP at /mcp, plus health endpoints for container platforms.
Tools
browser_start,browser_stop,browser_reset,browser_statenavigate,go_back,go_forward,refreshset_window_size,open_new_tab,switch_window,close_windowfind_element,wait_for_element,click,type_textget_text,get_attribute,execute_script,scrollpage_source,screenshot,save_screenshotlist_cookies,add_cookie,delete_cookies
Locator strategies: id, name, css selector, xpath, link text, partial link text, tag name, class name.
Related MCP server: Selenium MCP Server
HTTP Endpoints
POST /mcpand related Streamable HTTP MCP callsGET /healthzGET /readyzPOST /browser/startPOST /browser/stop
Local Setup
Windows Python Prerequisite
If PowerShell says Python was not found, install Python 3.11+ first. The quickest options are:
winget install Python.Python.3.12Then close and reopen PowerShell. If python --version still opens the Microsoft Store prompt, disable the python.exe and python3.exe app execution aliases in:
Settings > Apps > Advanced app settings > App execution aliasespython -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"PowerShell:
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -e ".[dev]"Run as a local STDIO MCP server:
selenium-mcpRun as a Streamable HTTP MCP server:
selenium-mcp-httpThen connect MCP clients to:
http://localhost:8000/mcpClaude Desktop Example
{
"mcpServers": {
"selenium": {
"command": "selenium-mcp",
"env": {
"SELENIUM_BROWSER": "chrome",
"SELENIUM_HEADLESS": "true"
}
}
}
}Docker
Build and run with an in-container Chromium browser:
docker build -t selenium-mcp .
docker run --rm -p 8000:8000 selenium-mcpRun with a dedicated Selenium Grid browser container:
docker compose up --buildConfiguration
Copy .env.example to .env and adjust:
SELENIUM_BROWSER=chrome
SELENIUM_HEADLESS=true
SELENIUM_REMOTE_URL=
SELENIUM_IMPLICIT_WAIT_SECONDS=2
SELENIUM_PAGE_LOAD_TIMEOUT_SECONDS=30
SELENIUM_SCRIPT_TIMEOUT_SECONDS=30
SELENIUM_WINDOW_WIDTH=1440
SELENIUM_WINDOW_HEIGHT=1000
SELENIUM_ALLOW_FILE_URLS=false
SELENIUM_DEFAULT_DOWNLOAD_DIR=/tmp/selenium-downloads
SELENIUM_HTTP_HOST=0.0.0.0
SELENIUM_HTTP_PORT=8000
SELENIUM_MCP_TRANSPORT=stdioFor remote Selenium Grid, set:
SELENIUM_REMOTE_URL=http://selenium:4444/wd/hubSecurity Notes
This server can browse the web, execute JavaScript, read page HTML, and save screenshots on the host. In production, run it in a locked-down container or VM, restrict outbound network access, keep SELENIUM_ALLOW_FILE_URLS=false, and put the HTTP MCP endpoint behind your platform authentication layer.
Validation
ruff check .
pytestAvailable Tools
26 toolsadd_cookieB
Add a Selenium cookie dict to the current domain.
Inputs: cookie (required). Returns: object
browser_resetB
Restart the Selenium browser session.
Inputs: no named parameters. Returns: object
browser_startA
Start a Selenium browser session if one is not already running.
Inputs: no named parameters. Returns: object
browser_stateA
Return session id, URL, title, and window information.
Inputs: no named parameters. Returns: object
browser_stopA
Stop the current Selenium browser session.
Inputs: no named parameters. Returns: object
clickC
Click an element located by CSS selector, XPath, id, name, text, tag, or class.
Inputs: strategy (required), value (required), timeout_seconds. Returns: object
close_windowA
Close the active browser window or tab.
Inputs: no named parameters. Returns: object
delete_cookiesA
Delete all browser cookies.
Inputs: no named parameters. Returns: object
execute_scriptC
Execute JavaScript in the active page and return the JSON-serializable result.
Inputs: script (required), args. Returns: object
find_elementD
Find an element and return a compact summary of it.
Inputs: strategy (required), value (required), timeout_seconds. Returns: object
get_attributeB
Return one DOM attribute for an element.
Inputs: strategy (required), value (required), attribute (required), timeout_seconds. Returns: object
get_textC
Return the visible text for an element.
Inputs: strategy (required), value (required), timeout_seconds. Returns: object
go_backA
Navigate one step back in browser history.
Inputs: no named parameters. Returns: object
go_forwardA
Navigate one step forward in browser history.
Inputs: no named parameters. Returns: object
list_cookiesA
Return browser cookies for the current domain.
Inputs: no named parameters. Returns: object
open_new_tabB
Open a new browser tab and optionally navigate it to a URL.
Inputs: url. Returns: object
page_sourceA
Return the current page HTML.
Inputs: no named parameters. Returns: object
refreshA
Refresh the current page.
Inputs: no named parameters. Returns: object
save_screenshotB
Save a PNG screenshot to a server-local path and return the path.
Inputs: path (required). Returns: object
screenshotA
Return a PNG screenshot as base64.
Inputs: no named parameters. Returns: object
scrollC
Scroll the current page by the given x and y offsets.
Inputs: x, y. Returns: object
set_window_sizeC
Set the browser window size.
Inputs: width (required), height (required). Returns: object
switch_windowC
Switch to a browser window or tab by Selenium window handle.
Inputs: handle (required). Returns: object
type_textC
Type text into an element, optionally clearing it first.
Inputs: strategy (required), value (required), text (required), clear_first, +1 more. Returns: object
wait_for_elementC
Wait until an element exists, or until it is visible when requested.
Inputs: strategy (required), value (required), timeout_seconds, visible. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 26 tools
Tools are mostly distinct; find_element and wait_for_element have some conceptual overlap but descriptions clarify their different return behaviors. Overall, tools serve clear, separate purposes.
All tools use consistent snake_case with verb_noun pattern (e.g., add_cookie, close_window, browser_start). Naming is predictable and follows a clear convention.
26 tools cover browser lifecycle, navigation, element interaction, cookies, screenshots, and scripting. Each tool earns its place; the count is well-scoped for a Selenium automation server.
Core workflows are covered (start/stop, navigation, elements, cookies, screenshots). Minor gaps exist (frame switching, alert handling) but do not hinder primary use cases.
Related MCP Connectors
Programmatic headless browser sessions: create, interact, browse, and extract - rendered in a real
Automate cloud Chrome—navigate, click, type, screenshot, run code, record screen video
Control a real browser from AI agents: navigate, click, type, screenshot, read the page.
Official Browserless MCP server: browser automation, scraping, screenshots and PDFs for AI agents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables browser automation using the Selenium WebDriver through MCP, supporting browser management, element location, and both basic and advanced user interactions.1,042 npm429MIT
- AlicenseAqualityDmaintenanceAllows 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.634 npm4MIT
- AlicenseAqualityDmaintenanceProvides browser automation using Selenium WebDriver, enabling web navigation, element interaction, screenshots, and JavaScript execution via MCP.10ISC
- AlicenseNot gradedqualityDmaintenanceProvides browser automation using Selenium, supporting Chrome and Firefox, with tools for navigation, element interaction, screenshots, and more.1Mulan Permissive Software , Version 2