selenium-spring-mcp

nipunsaini/selenium-spring-mcp

3.2

If you are the rightful owner of selenium-spring-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

Selenium MCP server with Spring Boot is a server implementation that integrates Selenium for browser automation with the Model Context Protocol (MCP) using Spring Boot framework.

Selenium MCP with Spring AI ๐Ÿค–๐Ÿงช

A modular command-based Model Context Protocol (MCP) server implementation for Selenium WebDriver, using Spring AI for intelligent browser automation capabilities. This project supports browser-level control via a standardized set of commands, making it ideal for dynamic testing or AI-assisted browser automation.

Demo Video

Watch the video

๐Ÿ›  Pre-requisites

  • Java 17+
  • Maven (for building project)

Supported browsers

  • Chrome
  • Firefox
  • Safari
Note: For Safari browser, enable automation capabilities.
  • Go to Safari > Preferences/Settings > Advanced > check Show Develop menu in menu bar
  • Now go to the Develop menu in the top menu bar > Allow Remote Automation

๐Ÿš€ Features

This tool includes a wide range of browser control commands:

  • โœ… browser_open: Launch the browser with desired configuration.
  • โœ… browser_close: Gracefully shuts down the browser session.
  • โœ… browser_navigate: Navigate to a specific URL.
  • โœ… browser_click: Click on web elements.
  • โœ… browser_send_keys: Type into input fields.
  • โœ… browser_take_screenshot: Capture full-page screenshots.
  • โœ… browser_get_text: Retrieve text content from elements.
  • โœ… browser_hover: Hover over elements.
  • โœ… browser_drag_and_drop: Perform drag-and-drop actions.
  • โœ… browser_double_click: Double-click on elements.
  • โœ… browser_right_click: Right-click/context click on elements.
  • โœ… browser_press_key: Simulate keyboard key press.
  • โœ… browser_upload_file: Upload files using file input elements.
  • โœ… browser_page_source: Extract full HTML page source.
  • โœ… browser_execute_javascript: Run custom JavaScript in the browser context.
  • โœ… browser_tabs: Manage and switch between multiple browser tabs.

๐Ÿ“ฆ Installation

  • Download the latest build (.jar) from Releases section
  • Add the following config to the mcp.json config file of MCP client (Github copilot, Claude desktop etc.)
{
  "servers": {
    "selenium-spring-mcp": {
      "type": "stdio",
      "command": "java",
      "args": [
        "-jar", 
        "path/to/jar/file"
      ]
    }
  }
}

๐Ÿ“ฆ Build Project

  • Run the following commands in terminal
# Clone the repo
git clone https://github.com/nipunsaini/selenium-spring-mcp.git

# move to the project directory
cd selenium-spring-mcp

# build
mvn clean package

๐Ÿค Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you'd like to change or add.

๐Ÿ“„ License

This project is licensed under the MIT License.

Built with ๐Ÿ’ก by [Nipun]