Selenium MCP Server logo

Selenium MCP Server

by PhungXuanAnh

Automates Chrome through Selenium WebDriver with navigation, element actions, screenshots, JavaScript, logs, and local storage tools.

Install Selenium MCP Server

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "phungxuananh-selenium-mcp-server": {
      "command": "uvx",
      "args": [
        "mcp-server-selenium"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

PhungXuanAnh/selenium-mcp-server exposes Selenium WebDriver browser automation through MCP, connecting AI assistants to Chrome for navigation, tab control, element interaction, screenshots, and more. It supports XPath and iframe targeting, JavaScript execution, browser console and network logs, local storage operations, and optional tab video recording. Install it as a Python package or run it from source, then start the server with a port and Chrome user-data directory. Reach for it when an MCP client needs interactive control of a Chrome session rather than browser actions through a site-specific API.

Use cases

  • Navigate through web pages and interact with forms
  • Inspect elements inside iframes with XPath or other selectors
  • Capture screenshots and record browser-tab workflows
  • Read console, network, and local-storage state during testing

Key features

  • Chrome automation through Selenium WebDriver
  • Multi-tab navigation and window-handle control
  • XPath, iframe, and paginated element queries
  • JavaScript execution with optional console output
  • Console and network log inspection
  • Screenshots, video recording, and local-storage CRUD

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 1d ago

Recent health check succeeded.

20/21 checks healthy over the last 91d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 5d ago via OSV.dev · mcp-server-selenium (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars10Stargazers on the source repository.
Last commit8d agoMost recent push to the default branch.
Directory activity3 viewsConfig copies, upvotes, and views on AllMCPs.

How Selenium MCP Server works

What PhungXuanAnh/selenium-mcp-server does

PhungXuanAnh/selenium-mcp-server brings Chrome browser control to MCP clients through Selenium WebDriver. It can open URLs, check page readiness, manage multiple tabs, locate elements, click controls, fill inputs, and capture screenshots. Element queries can use text, class names, IDs, attributes, element types, XPath, or iframe identifiers.

The server also exposes browser-level and page-level inspection capabilities. Agents can retrieve an element's CSS or computed styles, run JavaScript, read console output, inspect network events, and retrieve a response body by request ID. Browser local storage supports adding, reading, updating, and removing values. Video recording can target a fixed tab or follow active-tab switches among selected tabs.

How it works

The MCP process uses Selenium WebDriver to control Chrome. It can connect to an existing Chrome instance or start a new one. Browser operations apply to the active tab unless a tool accepts a window handle or explicitly selects another tab.

Tab handles returned by list_tabs can be passed to switch_tab or close_tab. Element tools accept several selector fields and can target content inside an iframe by ID or name. The server supports a default compact tool profile and an explicit --tool-profile legacy compatibility profile. The legacy profile exposes 24 tools across navigation, element interaction, styling, JavaScript, logging, and local storage.

Screenshot paths use a workspace-oriented default location or an explicitly supplied directory. Video recording supports MP4 output and can add a synthetic URL header; recording should be stopped immediately after the final browser action.

Setup and configuration

The recommended installation uses the Python package:

Terminal
pip install mcp-server-selenium
python -m mcp_server_selenium --port 9222 --user_data_dir /tmp/chrome-debug

For source-based development, clone the repository, install dependencies with uv sync, and run the module with the source directory on PYTHONPATH:

bash
git clone https://github.com/PhungXuanAnh/selenium-mcp-server.git
cd selenium-mcp-server
uv sync
PYTHONPATH=src python -m mcp_server_selenium --port 9222 --user_data_dir /tmp/chrome-debug

Chrome setup is part of the installation process because Selenium drives the browser. The command-line options shown here configure the listening port and Chrome user-data directory. The project also documents MCP Inspector usage for testing and configuration with MCP clients.

Tools and capabilities

The documented tool surface includes:

  • Navigate to pages, wait for readiness, list tabs, open tabs, switch tabs, and close tabs.
  • Find one or many elements, paginate element results, inspect direct children, click elements, and set input values.
  • Retrieve regular or computed styles, with optional HTML output.
  • Execute JavaScript alone or return its value together with newly captured console output.
  • Consume console logs with level filtering and network logs with URL or error filtering.
  • Retrieve a network response body using its request ID.
  • Add, read, update, and remove individual or all local-storage entries.
  • Capture named PNG screenshots and record browser-tab video.

Limitations and notes

The server is designed around Chrome and Selenium WebDriver, so browser setup is required before automation can run. Element operations depend on selectors or identifying fields such as text, IDs, attributes, element types, XPath, or iframe identifiers. Network and console log reads consume the available log entries, and network response retrieval requires a request ID obtained from network logging. The legacy profile is intended as a compatibility fallback; the compact profile is the default.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Selenium MCP Server

PhungXuanAnh/selenium-mcp-server is an MCP server that connects AI assistants to Chrome through Selenium WebDriver. Its main tools navigate pages, manage tabs, find and interact with elements, capture screenshots, execute JavaScript, inspect browser logs, and manage local storage.

Install it with `pip install mcp-server-selenium`, then run `python -m mcp_server_selenium --port 9222 --user_data_dir /tmp/chrome-debug`. For development, clone the repository, run `uv sync`, and start the module with `PYTHONPATH=src`.

Start the server with a port and Chrome user-data directory, such as `--port 9222 --user_data_dir /tmp/chrome-debug`. It can connect to an existing Chrome instance or start a new one through Selenium WebDriver.

Yes, its element tools can target iframe content by iframe ID or iframe name. The same tools also support XPath and other selectors, including text, class, ID, attributes, and element type.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewSelenium MCP Server AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/phungxuananh-selenium-mcp-server?style=directory)](https://allmcps.com/mcp/phungxuananh-selenium-mcp-server)
HTML Embed
<a href="https://allmcps.com/mcp/phungxuananh-selenium-mcp-server"><img src="https://allmcps.com/api/badge/phungxuananh-selenium-mcp-server?style=directory" alt="Selenium MCP Server on AllMCPs" /></a>