SeleniumMCP

SeleniumMCP

Enables browser automation using Selenium, including navigation, element interaction, screenshots, and cookie management, through both local STDIO and Streamable HTTP transports.

Category
Visit Server

README

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_state
  • navigate, go_back, go_forward, refresh
  • set_window_size, open_new_tab, switch_window, close_window
  • find_element, wait_for_element, click, type_text
  • get_text, get_attribute, execute_script, scroll
  • page_source, screenshot, save_screenshot
  • list_cookies, add_cookie, delete_cookies

Locator strategies: id, name, css selector, xpath, link text, partial link text, tag name, class name.

HTTP Endpoints

  • POST /mcp and related Streamable HTTP MCP calls
  • GET /healthz
  • GET /readyz
  • POST /browser/start
  • POST /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.12

Then 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 aliases
python -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-mcp

Run as a Streamable HTTP MCP server:

selenium-mcp-http

Then connect MCP clients to:

http://localhost:8000/mcp

Claude 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-mcp

Run with a dedicated Selenium Grid browser container:

docker compose up --build

Configuration

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=stdio

For remote Selenium Grid, set:

SELENIUM_REMOTE_URL=http://selenium:4444/wd/hub

Security 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 .
pytest

Recommended Servers

playwright-mcp

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured