nipunsaini/selenium-spring-mcp
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
๐ 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]