# Selenium Webdriver MCP

> Selenium Webdriver MCP is an open-source MCP server for browser automation. MCP server that lets AI assistants drive Selenium WebDriver browsers for testing. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** API, CLI, vscode, macOS, Windows, Linux, self-hosted
- **Repository:** https://github.com/pshivapr/selenium-mcp
- **MCP Registry name:** io.github.pshivapr/selenium-webdriver-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. Once connected, an assistant can open Chrome, Firefox, Safari or Edge sessions and call browser actions such as navigating, clicking, typing, uploading files and taking screenshots, all exposed as named MCP tools.

The tool set is broad, grouped into browser management, cookies, window and frame switching, element interaction, scrolling and form handling. Elements can be located by id, CSS selector, XPath, name, tag or class. The project is written in TypeScript and validates inputs with Zod.

It suits developers and QA engineers who want an assistant to generate or run browser tests, or to pull data from pages. The README's example prompt asks an agent to register on a demo banking site and then produce page-object tests, which shows the intended workflow. The package is distributed on npm and is released under the MIT licence.

## Features

- **Multi-browser sessions:** Opens automation sessions in Chrome, Firefox, Safari or Edge.
- **Element interaction tools:** Covers clicking, typing, hovering, drag and drop and file uploads.
- **Cookie and window control:** Reads, sets and deletes cookies and switches between browser windows and frames.
- **Multiple locator strategies:** Finds elements by id, CSS, XPath, name, tag or class name.
- **Screenshots and scripts:** Captures screenshots and runs JavaScript in the page.
- **Typed with Zod validation:** Inputs are checked with Zod schemas in a TypeScript codebase.

## Good for

- Have an AI assistant generate browser test scripts for a web app
- Automate a repetitive form submission or login flow through an agent
- Extract page content or cookies during a scraping task
- Capture screenshots of pages for visual review

## Install

### Claude Code (Terminal)

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

### Claude Desktop (claude_desktop_config.json)

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

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

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

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

```json
{
  "servers": {
    "selenium-webdriver-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-webdriver-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-webdriver-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_screenshot`: Take a screenshot
- `browser_execute_script`: Execute JavaScript code

## FAQ

### Which browsers are supported?

The README lists Chrome, Firefox, Safari and Edge, and says the browsers must be installed on the machine.

### How is it installed?

The README gives an npx command using selenium-webdriver-mcp@latest, a global npm install, and a Smithery install option.

### What license does it use?

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

### Is Selenium Webdriver MCP free?

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

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

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

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

The closest alternatives to Selenium Webdriver MCP are Chrome DevTools MCP, MCP Browser Extension, MCP Browser, Cdpilot and Scrapling MCP Server.

## 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

- [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 Extension](https://ai-powered.com/mcp/mcp-browser-extension): MCP Browser Extension 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.
- [Cdpilot](https://ai-powered.com/mcp/cdpilot): Cdpilot 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.
- [Turbo-Browser-MCP](https://ai-powered.com/mcp/turbo-browser-mcp): Turbo-Browser-MCP is an open-source MCP server for browser automation.
- [Screen Mouse Recorder MCP](https://ai-powered.com/mcp/screen-mouse-recorder-mcp): Screen Mouse Recorder MCP is an open-source MCP server for browser automation.
- [playwright_mcp](https://ai-powered.com/mcp/playwright-mcp-3): playwright_mcp is an open-source MCP server for browser automation.

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