home / mcp / selenium mcp server

Selenium MCP Server

Python-based MCP server for automating Selenium WebDriver actions via Claude with browser control, navigation, interactions, and screenshots.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "jyothishkumarav-selenium-mcp-server-python": {
      "command": "python",
      "args": [
        "server.py"
      ]
    }
  }
}

You can automate web browsers programmatically using a Python MCP server that exposes Selenium WebDriver operations through an MCP client. This server lets you start and manage browser sessions, perform common interactions, take screenshots, and inspect page content, all from a client such as Claude’s desktop application.

How to use

Use an MCP client to connect to the Selenium MCP server and perform browser automation tasks. You can start a browser session, navigate to pages, interact with elements, capture screenshots, manage windows and frames, and access page data such as content and local storage. Workflows typically involve starting a session, performing a sequence of actions, and then closing the session.

How to install

Follow these steps to set up the Selenium MCP Server locally and prepare it for use with your MCP client.

# Clone the project
git clone https://github.com/Jyothishkumarav/selenium-mcp-server-python.git
cd selenium-mcp-server-python

# Install dependencies
pip install -r requirements.txt

# Install the MCP server component in Claude
mcp install server.py

# Run the server locally (this starts the MCP server)
python server.py

Available tools

start_session

Open a new browser session to run automation tasks.

close_session

Close an active browser session and free resources.

switch_window

Switch focus between browser windows within a session.

navigate

Navigate the active browser to a specified URL.

refresh

Refresh the current page.

wait_for_load

Wait for the page to complete loading before proceeding.

find_element

Locate an element on the page for interaction.

click

Click on a located element.

send_keys

Type text into a focused element.

clear

Clear text from an input field.

double_click

Double-click a targeted element.

right_click

Open the context menu on a targeted element.

get_text

Retrieve visible text from an element.

get_attributes

Fetch attributes of a located element.

is_present

Check whether an element exists in the DOM.

is_visible

Check whether an element is visible to the user.

is_selected

Check whether an element is selected (e.g., checkbox, option).

take_screenshot

Capture a screenshot of the current page or element.

get_page_content

Retrieve the full HTML content of the current page.

scroll

Scroll the page in the viewport.

local_storage

Manage local storage for the active page.

switch_to_iframe

Switch context to a specified iframe.

switch_to_default_content

Return to the top-level browsing context.