mcp-server
v0.26.0MCP server for letsrunit — AI-agent browser test generation and execution
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
letsrunit_session_start
Launch a new browser session. Does not navigate anywhere — use letsrunit_run with a Given step to navigate. Set baseURL to enable relative paths like "Given I'm on the homepage".
| Parameter | Type | Description |
|---|---|---|
baseURL | string | Base URL for the session, e.g. "http://localhost:3000". Enables relative paths in Given steps like "Given I'm on the homepage" or "Given I'm on page \"/login\"" |
headless | boolean | Run browser in headless mode (default: true) |
language | string | Browser language code, e.g. 'en', 'fr' |
viewportHeight | integer | Viewport height in pixels (default: 720) |
viewportWidth | integer | Viewport width in pixels (default: 1280) |
letsrunit_run
Execute Gherkin steps or a complete feature in the browser. Accepts a single step line, multiple step lines, a full Scenario, or a full Feature. Returns status, steps, reason on failure, and journal entries. Does not return a page snapshot — call letsrunit_snapshot explicitly if you need the DOM.
| Parameter | Type | Description |
|---|---|---|
input * | string | Gherkin text to execute: one or more step lines (e.g. "Given I am on \"https://example.com\""), a Scenario block, or a full Feature block. |
sessionId * | string | Session ID returned by letsrunit_session_start |
letsrunit_snapshot
Get the current page HTML, scrubbed for LLM consumption. Use selector to scope to a DOM subtree.
| Parameter | Type | Description |
|---|---|---|
sessionId * | string | Session ID |
dropHead | boolean | Remove the <head> element (default: true) |
dropHidden | boolean | Remove hidden/inert nodes (default: true) |
pickMain | boolean | Keep only the <main> element (default: auto) |
selector | string | CSS selector — return only the matching element's outer HTML instead of the full page |
stripAttributes | number | Attribute allowlist level: 0=none, 1=semantic (default), 2=aggressive |
letsrunit_screenshot
Take a screenshot of the current page. Optionally crop to a specific element (selector) or highlight elements before capturing (mask).
| Parameter | Type | Description |
|---|---|---|
sessionId * | string | Session ID |
fullPage | boolean | Capture the full scrollable page (default: false) |
mask | array | CSS selectors whose matching elements are highlighted (dark overlay, element spotlighted). |
selector | string | CSS selector — crop screenshot to the bounding box of this element |
letsrunit_debug
Evaluate JavaScript on the current page via Playwright page.evaluate(). Use for debugging — not for test logic.
| Parameter | Type | Description |
|---|---|---|
script * | string | JavaScript expression or function body to evaluate in the page context |
sessionId * | string | Session ID |
letsrunit_session_close
Close a browser session and release its resources.
| Parameter | Type | Description |
|---|---|---|
sessionId * | string | Session ID to close |
letsrunit_list_steps
List available step definitions for a session. Optionally filter by step type (Given/When/Then).
| Parameter | Type | Description |
|---|---|---|
sessionId * | string | Session ID returned by letsrunit_session_start |
type | string | Optional step type filter |
letsrunit_list_sessions
List all active browser sessions.
letsrunit_reload
Reload built-in and project support step definitions without restarting the MCP server.
| Parameter | Type | Description |
|---|---|---|
cwd | string | Project directory to resolve cucumber support files from. Defaults to current project cwd. |
letsrunit_diff
Diff the current live page against the HTML snapshot from the last passing test of a scenario. Pass the scenarioId returned by letsrunit_run. Returns a unified HTML diff and paths to baseline screenshots. By default only considers baseline tests from the current git ancestry (gitTreeOnly: true).
| Parameter | Type | Description |
|---|---|---|
scenarioId * | string | Scenario UUID returned by letsrunit_run |
sessionId * | string | Session ID returned by letsrunit_session_start |
gitTreeOnly | boolean | Restrict baseline to tests from the current git ancestry (default: true) |