Get the FREE Ultimate OpenClaw Setup Guide →

selenium

Model Context Protocol server for Selenium WebDriver - enables LLMs to control web browsers

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio raghvendra-raghuvanshi-selenium-mcp-server npx selenium-mcp-server@latest --browser chrome

How to use

This Selenium MCP Server exposes browser automation over the MCP API, enabling large language models and teams to control real browsers through a standard set of commands (navigate, click, type, take_screenshot, etc.). It supports multiple browsers (Chrome, Firefox, Edge, Safari) and presents a visible browser by default for easier onboarding and debugging. Typical workflows include navigating to pages, interacting with UI elements, taking screenshots, extracting page data, and waiting for conditions to appear on the page. Clients can connect to the MCP endpoint and issue high-level browser actions without embedding WebDriver logic directly in their applications.

To use the server, deploy it (e.g., via npx selenium-mcp-server@latest --browser chrome) and configure your MCP client to point at its address. For Cursor or other MCP clients, reference the available tools such as browser_navigate, browser_click, browser_type, browser_wait_for, browser_take_screenshot, and browser_snapshot. Examples include navigating to a URL and taking a screenshot, filling out a form, or extracting data from a page. The server is designed to be team-friendly with a straightforward configuration that maps to MCP client settings, so you can share the same setup across CI pipelines and local development.

How to install

Prerequisites:

  • Node.js 18+ and npm installed on the host
  • Optional: Java (for Selenium WebDriver compatibility, though this server manages drivers internally)

Installation and setup steps:

  1. Install Node.js (18+) and npm from the official website or use your system package manager.
  2. Install and run the MCP server via npm (no permanent install required):

Code:

npm install -g selenium-mcp-server selenium-mcp-server --browser chrome

Alternatively, you can run it with npx (no global install):

Code:

npx selenium-mcp-server@latest --browser chrome

  1. If you plan to publish or share with a team, ensure your package.json is configured as shown in the README example, and publish the package name (selenium-mcp-server) to npm for team-wide access.
  2. Configure your MCP client to connect to the server, for example:

Code:

{ "mcpServers": { "selenium": { "command": "selenium-mcp-server", "args": ["--browser", "chrome"] } } }

  1. Verify the server is reachable from your MCP client and start issuing commands like browser_navigate and browser_take_screenshot.

Additional notes

Tips and common issues:

  • Browser drivers are managed by the server; ensure the host has network access for driver downloads when running for the first time.
  • If a browser is not found, verify that the requested browser is installed or accessible via the server’s executable path (use --executable-path if needed).
  • For CI environments, run the MCP server in the background and point your clients to its port; ensure necessary permissions for headless operation if running in a headless container.
  • You can customize the browser type with the --browser option (chrome, firefox, edge, safari) and enable headless mode with --headless when running in CI.
  • If you require a specific browser version or local browser, use --executable-path to point to the executable.
  • For team onboarding, share the npm package name selenium-mcp-server and provide example configs so new teammates can start quickly.

Related MCP Servers

Sponsor this space

Reach thousands of developers