selenium_mcp logo

selenium_mcp

Community
amandeep-sg

MCP tools build using selenium to automate web testing or scraping

Publisheramandeep-sg
Repositoryselenium_mcp
LanguagePython
Forks
0
Stars
3
Available tools
20
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    selenium_mcp exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 20 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    3 stars and 0 forks from the linked repository.

Selenium mcp logo Selenium mcp logo

Static Badge Static Badge Static Badge Static Badge

Introduction

This server is implemented in python to bridge the gap between the AI Assistant or (custom MCP clients) and Selenium Webdrivers. It exposes selenium webdriver functionalities as MCP tools allowing AI assistanct/MCP clients to user them to perform task for web automation, web testing or web scraping.

Release Notes

Version 2.0.1 - Release 11 April 2026

In this version, minor enhancements are made in error code, return types and readme file

  1. Retun type changes from Union[None, dict], int, bool to str in
    1. cookies.py
    2. find.py
    3. get.py
    4. input.py

Version 2.0.0 - Release 4 April 2026

In this version, we have done some structural changes like seperating functions into save and get. Now save is just focused on saving files on the disk. And get is where LLM wants to get the data from the browser.

Following are the list of enhancements:

  1. Get: To get webpage as markdown, html, screenshot, element's screenshot, list of urls
  2. JS Executor: To execute javascript code for interacting with the webpage
  3. Files: To upload and download files
  4. Alerts: To handle alerts
  5. Click: Added drag and drop of elements by xpath
  6. File: To save webpage as pdf on disk

Version 1.0.0 - Release 31 March 2026

  1. Web Driver: Create new or quit exiting webdiver sessions
  2. Cookies: To manage cookies (add, delete, get, clear)
  3. Clicks: To perform clicks on elements (left client, right click, double click)
  4. Browser: To navigate urls and manage browser capabilities like resize, maximize, minimize, fullscreen, etc.
  5. Scroll: To scroll the entire webpage
  6. Input: Input text into elements and select/unselect checkbox, radio buttons, dropdowns options, etc.
  7. Find: To find element by xPaths

Key Features

  1. Humanised error handleing, enables LLM to intreperate errors and reconfigure tool usage accordingly
  2. Comprehensive element interaction: Clicks, input, select are performed by checking if element is visible, enabled, clickable, etc
  3. Full Navigation control: Open New url, click forward, backward, refresh, etc

The tools leverages following technologies to support

  1. FastMCP: For MCP server implementation
  2. Selenium: For web automation
  3. Google GenAI: For AI assistant

Upcomming

Following are the list of features that will be added in the future:

  1. Tools to support Chrome Dev Tools & BiDi
  2. Enhance save functionality to save files in different formats
  3. Enhanced error handling
  4. Multi browser support (Firefox, Edge, Safari, etc)

Example

Prompt: "Open https://rfpnotification.com and join the waiting list by entering the email address: [test_user@example.com]"

BeforeAfter
BeforeAfter

After running the script, the browser took the screenshot to check if the email was entered successfully. Screenshot

Test In Action

Test in action

Dev Setup

Clone the repository

git clone {url}

Create virtual environment

bash
python3 -m venv venv
source venv/bin/activate

Install dependencies

bash
pip install -r requirements.txt

Run the server

bash
python server.py

The package comes with a lightweight MCP client using Google GenAI SDK to test the server. It is implemented in server.py file. To use it, you need to have a Google GenAI API key. Set it in the .env file as GEMINI_API_KEY={your_api_key}.

Run the client

bash
python server.py

Architecture

The mcp has a very somple architecture as shown below. If this MCP is hosted locally then it communicates via stdio, if it is hosted on cloud then it communicates via http.

Architecture

Available Tools

  • create_webdriver

    Create a new selenium webdriver session

  • quit_webdriver

    Quit existing webdriver session

  • navigate_to_url

    Navigate browser to a specific URL

  • click_element

    Perform left click, right click, or double click on elements

  • input_text

    Input text into form fields and elements

  • find_element

    Find elements on the page by xpath

  • get_screenshot

    Take screenshot of webpage or specific elements

  • get_page_html

    Get HTML content of the current page

  • get_page_markdown

    Get page content converted to markdown format

  • scroll_page

    Scroll the webpage up or down

  • manage_cookies

    Add, delete, get, or clear browser cookies

  • select_dropdown

    Select options from dropdown menus

  • handle_checkbox

    Select or unselect checkboxes and radio buttons

  • execute_javascript

    Execute custom JavaScript code on the page

  • handle_alerts

    Handle browser alert dialogs

  • drag_and_drop

    Drag and drop elements by xpath

  • upload_file

    Upload files through file input elements

  • download_file

    Download files from the webpage

  • save_as_pdf

    Save current webpage as PDF file

  • resize_browser

    Resize, maximize, minimize, or fullscreen browser window

Use selenium_mcp MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once selenium_mcp is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add selenium_mcp as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the selenium_mcp MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "selenium-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the selenium_mcp MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the selenium_mcp MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use selenium_mcp to help me with this task?
selenium_mcp
Sure. I read it.
Here is what I found using selenium_mcp.

Frequently asked questions

What is the selenium_mcp MCP server used for?

selenium_mcp is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use selenium_mcp MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use selenium_mcp with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use selenium_mcp MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With selenium_mcp connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect selenium_mcp MCP to TypingMind?

selenium_mcp runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does selenium_mcp MCP provide in TypingMind?

selenium_mcp exposes 20 MCP tools that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use selenium_mcp MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If selenium_mcp requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇