COR MCP · live on npm

Locators your agent can trust. Graded before they ship.

Your coding agent opens a live page and gets ranked, graded locators back, in the test framework your repo already uses.

One npx command · Node 18+ and Chrome · Claude Code, Codex, Cursor, Copilot

You ask the agent for locators. It calls cor_open on the COR MCP server.COR opens the page in a real Chrome-family browser and returns the 12 controls it finds.cor_inspect returns ranked locators for Sign in, each with a grade and a match count.The agent writes the entry into your repo. cor_check confirms it came from COR.

Example session · illustrative scores

How it works

Open the page. Grade the locators. Place one.

  1. 1

    The agent calls a tool

    It opens the page with cor_open and names the elements the test touches. COR drives a real Chrome-family browser.

    cor_open example.com/login12 controls listed with refs
  2. 2

    COR ranks and grades

    cor_inspect returns ranked locators for each element, with a grade, a match count and the risks of each.

    getByRole('button', { name: 'Sign in' })A 961 match
  3. 3

    The agent places the entry

    Each locator comes as an entry for your locator file, with a short id in a comment. cor_check fails any locator that did not come from COR.

    // COR cor:7f3a2cCOR never edits your files

Install

Add it once. Your agent runs it on demand.

Nothing is installed globally. Every client runs the same command, npx -y @corlabsdev/mcp@latest.

@corlabsdev/mcpNode 18+ · Chrome

Terminal

claude mcp add cor -- npx -y @corlabsdev/mcp@latest --source site_mcp

To share with your team: .mcp.json at the project root

{ "mcpServers": { "cor": { "command": "npx", "args": ["-y", "@corlabsdev/mcp@latest", "--source", "site_mcp"] } } }

Then restart the client and ask: “Use COR to open https://example.com/login and write the locators for the sign-in form.”

Tools

Eight tools, one loop

Open, inspect, place, check. When a test breaks on a locator, grade it and heal it.

  1. cor_open the page, then cor_inspect every element the test touches, in one call.
  2. Place each entry as given, its // COR cor:… comment included, in the file it names.
  3. Run cor_check before the tests. On a broken locator, cor_grade it and cor_heal it.
@corlabsdev/mcp8 tools
cor_openOpen a page; lists its controls with refs
cor_snapshotText, controls and entries within one region of a large page
cor_inspectRanked, graded locators for the elements you name, as entries to place in your code
cor_click, cor_fill, cor_pressAct on the page and report what changed
cor_checkFail any locator in your files that did not come from COR
cor_gradeScore a locator you wrote yourself
cor_healPropose a repair for a locator that stopped matching
cor_closeClose the browser

Entries and records

Every locator carries an id

An entry is the code to place, the file and member it belongs in, and a comment with a short id. Keep the comment: cor_check uses it to tell COR’s locators from typed ones, and a later repair uses it to find what the locator pointed at.

COR also writes one small record per element to .cor/records/ in your project. Commit them, and a repair works on a teammate’s machine or in CI.

.cor/records/7f3a2c.jsonmasked
StoredPage origin and path, tag path, member name, the element’s fingerprint, and up to 12 ranked locators as data.
MaskedEmails, runs of 6+ digits and long tokens are replaced before anything is written.
Never storedInput values, cookies, local storage, or anything from a storage-state file.
OffStart with --no-records or set COR_RECORDS=off.

Requirements and options

Node 18+ and a Chrome-family browser

Google Chrome works. So do Microsoft Edge and Playwright’s Chromium. If no browser is found the server says so: install Chrome, or run npx playwright-core install chromium.

Use COR as the only browser tool for test authoring, not alongside Playwright MCP. With a second browser server attached, an agent can fall back to its snapshots and type its own selectors, which cor_check will then fail.

Optionsappend to args, or after -- in claude mcp add
--headlessRun the browser without a window. Default: visible.
--idle-minutes <n>Close the browser after n idle minutes.
--no-recordsWrite no entry records into your project.

Anonymous usage metrics, on by default

Two events: mcp_installed once per install, and mcp_tool_called per tool call. Page URLs, element text, locators, file paths, input values and cookies are never sent.

Turn it off with COR_TELEMETRY=off. COR_OFFLINE=true stops all outbound data.

Questions

Before you install

Can't find your answer? Ask in Discord or send us a message.

Does it send data off my machine?

Yes, anonymous usage metrics, on by default in the published package. mcp_installed sends package version, Node version and platform. mcp_tool_called sends tool name, duration, outcome and package version. Each install has a random ID in ~/.cor/install-id. Page URLs, element text, locators, file paths, input values, cookies, error messages and email addresses are never sent. Set COR_TELEMETRY=off to turn it off, or COR_OFFLINE=true to stop all outbound data.

Where are the locators stored?

In your project, under .cor/records/. Placed entries are meant to be committed. Entries shown but not yet placed are git-ignored, so they never reach a commit.

Can it run without a visible browser?

Yes. Pass --headless after the package name. The default opens a visible window.

Which test frameworks does it write for?

COR infers your framework and conventions from the repo. The config file names Playwright, Cypress and WebdriverIO. Add a cor.config.js at the project root to override what was inferred.

How do I update or pin a version?

Setup uses @corlabsdev/mcp@latest, so npx checks npm for the newest version each time it starts. To pin one, replace @latest with a version, for example @corlabsdev/[email protected].

Give your agent graded locators

One command adds COR to the agent clients in your project: Claude Code, Codex, Cursor and VS Code.

npx -y @corlabsdev/mcp@latest setup --source site_mcp

Working by hand in the browser? Use COR Lens instead