Seleniumboot MCP
Generates Gherkin feature files and Java step definitions from recorded browser sessions for Cucumber BDD test frameworks.
Allows selecting Firefox as the browser for automation via Selenium, with options like headless mode and window size.
Generates GitHub Actions CI workflow YAML files to run generated tests on push or pull request.
Integrates with GitHub Copilot in VS Code to allow browser automation commands and test generation through the MCP server.
Generates GitLab CI pipeline (.gitlab-ci.yml) to run generated tests.
Generates Jenkins Pipeline (Jenkinsfile) to run generated tests in a CI/CD environment.
Generates JUnit 5 test classes from recorded browser sessions for Java test automation.
Generates pytest test classes from recorded browser sessions for Python test automation.
Provides tools to control web browsers via Selenium WebDriver for automated testing, including navigation, element interaction, assertions, and code generation.
seleniumboot-mcp
A Python Model Context Protocol (MCP) server for Selenium WebDriver automation. Let Claude or GitHub Copilot control a real browser — navigate pages, interact with elements, run assertions, and generate ready-to-run Java TestNG / JUnit 5 / Cucumber / pytest test code from recorded sessions. 82 tools. No ChromeDriver setup. Browser auto-starts on first use.
Demo
Related MCP server: selenium-mcp-server
Installation
pip install seleniumboot-mcpRequires Python 3.10+ and Chrome. No separate ChromeDriver needed — Selenium Manager handles it automatically.
Setup
VS Code — Marketplace Extension (easiest)
Install Seleniumboot MCP from the VS Code Marketplace.
The extension automatically:
Registers the MCP server with GitHub Copilot (no config file needed)
Creates a
.mcp.jsonin your project so Claude Code detects it on next openPrompts to
pip install seleniumboot-mcpif the Python package is missing
When Claude Code asks "Allow MCP server seleniumboot?" — click Allow.
VS Code — Manual
Add .vscode/mcp.json to your project root (for GitHub Copilot):
{
"servers": {
"selenium": {
"type": "stdio",
"command": "seleniumboot-mcp"
}
}
}For Claude Code, add .mcp.json to your project root:
{
"mcpServers": {
"seleniumboot": {
"command": "seleniumboot-mcp",
"args": []
}
}
}Open the project in VS Code → Claude Code will prompt to approve the server → done.
Claude Desktop
Edit your Claude Desktop config:
Windows:
%APPDATA%\claude-desktop\config.jsonmacOS:
~/.config/claude-desktop/config.json
{
"mcpServers": {
"selenium": {
"command": "seleniumboot-mcp"
}
}
}Restart Claude Desktop.
How to use
Once the server is running, talk to Claude naturally — no start_browser call needed, Chrome launches automatically on first use:
Go to https://myapp.com and fill the login form with admin/password, then click LoginAssert the dashboard heading is visibleGenerate a Java TestNG test class for everything we just didGenerate a Gherkin feature file and step definitions for the login flowClaude controls the real browser, records every action, and on request generates complete test code ready to paste into your Maven or Gradle project.
Tools (84 total)
Browser
Tool | Description |
| Optional — Chrome auto-starts on first use. Use this to pick Firefox, enable headless, or set window size |
| Go to a URL |
| Capture page as an inline image |
| Return page title |
| Return current URL |
| Return full HTML source |
| Run JavaScript |
| Browser history |
| Reload page |
| Switch between tabs by index |
| Open a new browser tab, optionally at a URL |
| Close the active tab and switch to the previous |
| List all open tabs with index, title, and URL |
| Quit the browser |
| Scroll page to the top |
| Scroll page to the bottom |
| Scroll page by x/y pixels |
| Emulate a mobile device (iPhone, iPad, Pixel, Galaxy) via CDP |
| Get browser console errors/warnings/info (Chrome) |
| Read or write a cookie |
| Remove cookies |
| Read or write localStorage |
| Read or write sessionStorage |
| Wait until XHR/fetch traffic is quiet — essential for SPAs |
| Discover all inputs, buttons, selects, links with best-fit CSS selectors |
| Captured XHR/fetch requests — method, URL, status, timing |
| Stub fetch/XHR by URL pattern with a canned response |
| Remove all active mock rules |
| Pixel diff against a saved baseline — visual regression |
| Built-in WCAG audit — alt text, labels, headings, keyboard access |
Elements
Tool | Description |
| Find element, return tag/text/state |
| Find all matching elements |
| Click with explicit wait |
| Clear + type into input |
| Get visible text |
| Get any attribute value |
| Select from |
| Mouse hover |
| Double click |
| Context menu click |
| Drag source → target |
| Check visibility |
| Check enabled state |
| Wait: visible / clickable / present / invisible |
| Scroll element into view |
| Clear input field |
| Send special keys (Tab, Enter, Escape, Ctrl+A, F5, …) |
| Upload a file via |
| Handle JS alert/confirm dialogs |
| Read the message from an alert |
| Type into a JS prompt and accept |
| Focus into an iframe by index, name, or selector |
| Return to the main page from a frame |
| Find element inside a shadow DOM |
| Extract an HTML table as a formatted text grid |
| Fill multiple fields at once — auto-detects input/select/checkbox/radio |
| View all self-healed selector mappings for the session |
| Reset the self-healing cache |
Assertions
Tool | Description |
| Page title equals/contains |
| URL equals/contains |
| Element text equals/contains |
| Element is visible |
| Element is hidden or absent |
| Element attribute has expected value |
| Page body contains a string |
| Count of matching elements equals expected |
Codegen
Tool | Description |
| Java TestNG test class from session |
| Java JUnit 5 test class from session |
| Java Page Object class + test class from session |
| Gherkin |
| pytest class from session |
| C# NUnit + Selenium test class from session |
| GitHub Actions CI workflow YAML (Maven / Gradle / pytest) |
| Declarative Jenkinsfile (Maven / Gradle / pytest) |
| GitLab CI |
| Equivalent Playwright TypeScript code from session |
| View recorded actions |
| Reset the session recording |
Codegen Examples
Java TestNG
Go to https://myapp.com/login, enter admin/password, click Login
→ Generate a Java TestNG testpublic class LoginTest {
@BeforeMethod public void setUp() { driver = new ChromeDriver(); ... }
@AfterMethod public void tearDown() { driver.quit(); }
@Test
public void recordedFlowTest() {
driver.get("https://myapp.com/login");
WebElement f = wait.until(visibilityOf(By.cssSelector("#username")));
f.clear(); f.sendKeys("admin");
wait.until(elementToBeClickable(By.cssSelector("button[type='submit']"))).click();
}
}Page Object Model
Generate a Java Page Object for the login page// LoginPage.java
public class LoginPage {
private final By usernameField = By.cssSelector("#username");
private final By submitButton = By.cssSelector("button[type='submit']");
public LoginPage enterUsernameField(String text) { ... return this; }
public LoginPage clickSubmitButton() { ... return this; }
}
// LoginTest.java
public class LoginTest {
@Test public void recordedFlowTest() {
driver.get("https://myapp.com/login");
page.enterUsernameField("admin").clickSubmitButton();
}
}Cucumber / Gherkin
Generate a Gherkin feature file and step definitions for the login flowFeature: Login
Scenario: User logs in with valid credentials
Given I navigate to "https://myapp.com/login"
And I enter "admin" in the username field
And I enter "password" in the password field
And I click the submit button// LoginSteps.java
public class LoginSteps {
@Given("I navigate to {string}")
public void iNavigateTo(String url) { driver.get(url); }
@And("I enter {string} in the username field")
public void iEnterInUsernameField(String text) { ... el.sendKeys(text); }
@And("I click the submit button")
public void iClickTheSubmitButton() { wait.until(...).click(); }
}Self-Healing Locators
When a selector fails to find an element, seleniumboot-mcp automatically tries alternative strategies before giving up:
Primary selector | Alternatives tried |
|
|
|
|
|
|
|
|
| tries A first, then B |
Successful fallbacks are cached so the healed selector is reused automatically. Use get_healed_locators to inspect the cache and update your test code, and clear_healed_locators to start fresh.
Links
VS Code Marketplace: marketplace.visualstudio.com
Roadmap
Java TestNG / JUnit 5 / Python pytest code generation
Screenshot returned as
ImageContent(renders inline in Claude)Full session recording — hover, double_click, right_click, scroll, select_option
Codegen for hover, drag-and-drop, select, scroll in Java and Python templates
Auto-start browser on first use (no explicit
start_browserneeded)Page Object Model generation (
generate_java_page_object)Cucumber / Gherkin step generation (
generate_gherkin)Self-healing locators — automatic fallback when a selector breaks
Alert/dialog handling, iframe switching, shadow DOM, table extraction
Cookie, localStorage, sessionStorage management
Mobile device emulation via Chrome DevTools Protocol
Special key sending (Tab, Enter, F-keys, Ctrl+A, …)
File upload via
<input type="file">Browser console log capture
Multi-tab management (open, close, list)
Page scroll (top, bottom, by pixels)
C# NUnit + Selenium codegen
GitHub Actions CI workflow generator (Maven / Gradle / pytest)
Playwright TypeScript migration hints
CI/CD config for Jenkins / GitLab CI
License
MIT
Maintenance
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/seleniumboot/selenium-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server