cypress-mcp
v0.5.3Run and debug Cypress tests from an AI agent: compact failures with file:line, error, screenshot.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
cypress_run Run Cypress specs
Run Cypress headless in one launch: a spec, path:line, a glob or a list. Returns per failure file:line, error, screenshot and the page at the failure (URL, console and network errors, similar selectors), plus a runId.
| Parameter | Type | Description |
|---|---|---|
browser | string | Browser from `cypress info`: chrome, firefox, edge, electron, chrome:beta... Default: the project's |
cloud | object | Cypress Cloud: record: true needs projectId and CYPRESS_RECORD_KEY in the server env |
component | boolean | Component tests |
env | object | Cypress env values |
headed | boolean | Show the browser |
project | string | Monorepos: folder with cypress.config.* (default: from the spec path) |
repeat | integer | Run the selected tests n times, to prove a flaky fix |
spec | Spec path, "path:line" for the test at that line, a glob such as cypress/e2e/**/*.cy.ts, or a list. Omit for every spec | |
testName | string | Only tests whose full title contains this |
timeout | integer | ms, default 300000 |
verbose | boolean | Also list passing tests |
cypress_get_failure Inspect a Cypress run
Details of a run from cypress_run. view "failures" (default): each failure with source excerpt, error, diff, stack, screenshot. "page": the page at one failure (DOM/ARIA outline, URL, console and network errors, command log, similar selectors). "tests": every test. "screenshots": image links, the last attempt of each retried test. "output": the end of Cypress's output.
| Parameter | Type | Description |
|---|---|---|
attempts | boolean | view "screenshots": also the earlier attempts of retried tests |
failure | integer | Only this failure, by its number in the run result |
image | boolean | Add the screenshots as images, scaled to 1000 px wide |
runId | string | runId returned by cypress_run. "last" is the latest run of this server, which can be another agent's. |
view | string |
cypress_list_specs List Cypress specs
List spec files with their test counts, read statically (nothing runs). titles: true adds each test's full title, the text testName matches. In a monorepo, lists every project's specs.
| Parameter | Type | Description |
|---|---|---|
pattern | string | Glob relative to the project root. Default: the project's specPattern |
project | string | Monorepos: one project folder. Default: every project |
titles | boolean | Include test titles |
cypress_doctor Check the Cypress setup
Check the Cypress setup: config file, Cypress install, specs, support file, failure context, Cloud settings. Starts Cypress once to load the config (about 15 s) unless quick is true. Use it when a run cannot start, not before every session.
| Parameter | Type | Description |
|---|---|---|
project | string | Monorepos: the project folder to check |
quick | boolean | Skip starting Cypress; check files and install only |