# Selenium MCP

> Selenium MCP is an open-source MCP server for browser automation. MCP server giving AI assistants Selenium WebDriver browser automation tools. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, vscode, macOS, Windows, Linux, API
- **Repository:** https://github.com/pshivapr/selenium-mcp
- **MCP Registry name:** io.github.pshivapr/selenium-mcp
- **Categories:** [browser automation](https://ai-powered.com/categories/browser-automation)
- **Listing updated:** 2026-11-18

## About

The README describes this as a bridge between MCP clients and Selenium WebDriver: it exposes WebDriver actions as MCP tools so an assistant can open a browser, move through pages, interact with elements and read results. The tool catalogue is organised into browser management, cookies, windows, frames, forms, scrolling and element state checks, covering roughly sixty named tools.

It is written in TypeScript and runs over stdio, typically launched with npx from the selenium-webdriver-mcp npm package. The README says Chrome, Firefox, Safari and Edge are supported, with WebDrivers managed by selenium-webdriver, and requires Node.js 18 or later.

The server suits developers and QA engineers who want an assistant to drive a real browser for scraping, testing or generating test code. The README's example prompt has an agent register on a demo banking site and then produce page-object tests.

## Features

- **Multi-browser automation:** Drives Chrome, Firefox, Safari and Edge through Selenium WebDriver, according to the README.
- **Broad element interaction:** Tools cover clicking, typing, hovering, drag and drop, dropdowns, checkboxes and file uploads.
- **Window and frame handling:** Switches between browser windows by handle, title, URL or index, and moves in and out of iframes.
- **Cookie management:** Lists, reads, sets and deletes browser cookies through dedicated tools.
- **Screenshots and JavaScript:** Captures screenshots and runs JavaScript in the page context.
- **Typed with Zod validation:** Written in TypeScript and validates tool inputs with Zod, per the README.

## Good for

- Letting an AI assistant walk through a web app to check a user flow
- Generating Selenium test code from a browser session an agent has explored
- Scraping page content and element text for data extraction
- Taking screenshots of pages during automated checks

## Install

### Claude Code (Terminal)

```sh
claude mcp add selenium-mcp --env YOUR_API_KEY='<YOUR_API_KEY>' -- npx -y selenium-webdriver-mcp
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "selenium-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "selenium-webdriver-mcp"
      ],
      "env": {
        "YOUR_API_KEY": "<YOUR_API_KEY>"
      }
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "selenium-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "selenium-webdriver-mcp"
      ],
      "env": {
        "YOUR_API_KEY": "<YOUR_API_KEY>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "selenium-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "selenium-webdriver-mcp"
      ],
      "env": {
        "YOUR_API_KEY": "<YOUR_API_KEY>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "selenium-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "selenium-webdriver-mcp"
      ],
      "env": {
        "YOUR_API_KEY": "<YOUR_API_KEY>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "selenium-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "selenium-webdriver-mcp"
      ],
      "env": {
        "YOUR_API_KEY": "<YOUR_API_KEY>"
      }
    }
  }
}
```

## Tools

- `browser_open`: Open a new browser session
- `browser_navigate`: Navigate to a URL
- `browser_click`: Click on an element
- `browser_type`: Type text into an element
- `browser_find_element`: Find an element on the page
- `browser_screenshot`: Take a screenshot
- `browser_execute_script`: Execute JavaScript code
- `browser_get_cookies`: Get all cookies from the current browser session
- `browser_close`: Close current browser session

## FAQ

### How is the server started?

The README's standard configuration runs npx -y selenium-webdriver-mcp@latest as a stdio command in MCP clients such as Claude Desktop and VS Code.

### What license does it use?

The README states the project is released under the MIT License.

### What does it require to run?

The README lists Node.js 18.0.0 or higher, an installed Chrome, Firefox, Safari or Edge browser, and Windows, macOS or Linux.

### Is Selenium MCP free?

Yes. Selenium MCP is open source, so you can use and self-host it for free.

### How do I add Selenium MCP to Claude Code?

Run this command in your terminal: claude mcp add selenium-mcp --env YOUR_API_KEY='<YOUR_API_KEY>' -- npx -y selenium-webdriver-mcp

### What are the best alternatives to Selenium MCP?

The closest alternatives to Selenium MCP are Selenium Webdriver MCP, Chrome DevTools MCP, MCP Browser, MCP Browser Extension and Turbo-Browser-MCP.

## Where this comes from

- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Selenium Webdriver MCP](https://ai-powered.com/mcp/selenium-webdriver-mcp): Selenium Webdriver MCP is an open-source MCP server for browser automation.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-4): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [MCP Browser](https://ai-powered.com/mcp/mcp-browser-3): MCP Browser is an open-source MCP server for browser automation.
- [MCP Browser Extension](https://ai-powered.com/mcp/mcp-browser-extension): MCP Browser Extension is an open-source MCP server for browser automation.
- [Turbo-Browser-MCP](https://ai-powered.com/mcp/turbo-browser-mcp): Turbo-Browser-MCP is an open-source MCP server for browser automation.
- [Scrapling MCP Server](https://ai-powered.com/mcp/scrapling-mcp-server): Scrapling MCP Server is an open-source MCP server for web search and scraping.
- [Cdpilot](https://ai-powered.com/mcp/cdpilot): Cdpilot is an open-source MCP server for browser automation.
- [Glovebox MCP](https://ai-powered.com/mcp/glovebox-mcp): Glovebox MCP is an open-source MCP server for browser automation.

---
Source: https://ai-powered.com/mcp/selenium-mcp-2
