LocatorLabs

Provides locators, page analysis, POM generation, test execution, and test script generation for Playwright and Selenium via MCP.
  • typescript

1

GitHub Stars

typescript

Language

5 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "naveenanimation20-locatorlabs-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "locatorlabs-mcp"
      ]
    }
  }
}

LocatorLabs MCP Server provides intelligent locator generation and test-assisted tooling for Playwright and Selenium through a lightweight MCP server. It lets you fetch robust locators, analyze pages, auto-generate Page Object Models, run tests, and generate executable test scripts directly from your IDE or editor, streamlining your test automation workflow.

How to use

You interact with LocatorLabs MCP Server using an MCP client integrated into your IDE or editor. Start the server locally, then connect to it from your editor to request locators, analyze pages, generate POMs, run tests, or generate test scripts. You can phrase requests in natural language, for example: “Get locators for the login button on saucedemo.com” or “Generate a Python Selenium POM for saucedemo.com called LoginPage.” The server returns reliable locators ranked by their usefulness, along with ready-to-run code samples in Playwright or Selenium formats.

Typical workflows include: getting all possible locators for a page element, analyzing an entire page to map interactive elements, generating Playwright or Selenium Page Objects, executing tests in a real browser, and creating executable test scripts. Combine Playwright MCP navigation with LocatorLabs MCP for precise, maintainable locators and tests.

How to install

Prerequisites you need before installing: Node.js 18+ and Playwright browsers (which install automatically on first run). Ensure your environment has access to run npx and npm commands.

Choose the client you use and follow the corresponding setup steps. The most common options are direct one-line commands for your editor, or a manual setup that walks you through the in-editor MCP addition.

One-line installation options you can run in your editor’s integrated terminal are available for multiple environments. Use the following command in the appropriate terminal to add LocatorLabs as an MCP server.

code --add-mcp '{"name":"locatorlabs","command":"npx","args":["-y","locatorlabs-mcp"]}'

Additional installation options by editor

Cursor IDE and VS Code offer quick one-liners to add LocatorLabs as an MCP server. Use the corresponding command in the editor’s terminal to enable MCP integration.

For Windows PowerShell, use the PowerShell-specific command to add the server.

code --add-mcp '{"name":"locatorlabs","command":"npx","args":["-y","locatorlabs-mcp"]}'

Manual setup (Editor integration)

If you prefer a guided setup, you can add the server through the editor’s command palette or settings: select the option to add a new MCP server, then specify the command and arguments to run LocatorLabs.

Available tools

get_locators

Fetch all possible locators for a specified element or page, supporting Playwright and Selenium formats with ranked reliability.

analyze_page

Analyze a page to identify all interactive elements, returning a structured map of element types and potential locators.

generate_page_object

Auto-generate Page Object Models (Playwright: TS/JS/Python; Selenium: Java/Python/C#) for a given URL.

run_test

Execute a test flow in a real browser and report pass/fail status with a compact result summary.

generate_test

Generate executable test scripts for common flows, ready to run with your chosen framework.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational