Cypress MCP logo

Cypress MCP

Inspect headless Cypress runs through MCP, including failures, command logs, screenshots, DOM snapshots, and spec execution.

Install Cypress MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "cypress-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@miroslavmyrha/cypress-mcp"
      ],
      "env": {
        "MCP_HTTP_TOKEN": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Claude Code command
claude mcp add --env MCP_HTTP_TOKEN=YOUR_VALUE_HERE --transport stdio cypress-mcp -- npx -y @miroslavmyrha/cypress-mcp

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

Automated check passed— started and listed 7 tools correctly ().

Overview

The cypress-mcp MCP server gives an AI assistant access to Cypress project files and results from the latest test run. It reads captured command logs, failures, screenshots, DOM snapshots, console errors, and network errors, and can execute one spec at a time. Cypress captures run data through a plugin and support import, then stores it in `.cypress-mcp/last-run.json`. Reach for it when Cypress tests run headlessly on a local machine or in CI and an assistant needs evidence for diagnosing failures.

Use cases

  • Inspect failed headless Cypress tests
  • Query a failed test's captured DOM
  • Review Cypress command logs and screenshots
  • Run one Cypress spec through an MCP client
  • Diagnose CI test failures from saved artifacts

Key features

  • Reads the latest Cypress run
  • Captures per-test command logs
  • Queries failed-test DOM snapshots
  • Returns screenshots up to 2 MB
  • Runs individual spec files
  • Supports stdio and Streamable HTTP

Tools7

What Cypress MCP lets your agent do. Expand a tool for its parameters.

Verified live~1.0k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

13/13 checks healthy over the last 52d

What it can do

From the 7 tools this server returned when we ran it.

Handles credentials · 2Read-only tools · 7
Network at startup3 connections
Files written at startupNone
Install scriptsNone
npm provenanceNot published
Package age50 days
Maintainers1

Observed 2026-12-02 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 1d ago via OSV.dev · @miroslavmyrha/cypress-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars1Stargazers on the source repository.
npm downloads240Package downloads in the last 30 days.
Last commit1mo agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed7Callable tools this server registers over MCP.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

How Cypress MCP works

What cypress-mcp MCP server does

The cypress-mcp MCP server connects an MCP client to a Cypress project and its most recent test-run artifacts. It is intended for headless cypress run workflows, including runs on a developer machine and in CI. The server can expose which tests passed or failed, the Cypress commands executed by each test, failure messages, DOM snapshots, screenshots, console errors, and network errors.

It also gives an assistant access to the project’s spec files and Cypress configuration. Configuration values that appear to contain secrets are redacted before being returned. Failed tests can include an HTML snapshot of document.body from the failure point, allowing an assistant to inspect the rendered page rather than relying only on a pasted error.

How it works

Install the package in the Cypress project, register its plugin through setupNodeEvents, and import its support module from cypress/support/e2e.ts. During a Cypress run, the support code records command activity for each test. The plugin receives that information and combines it with test results after each spec completes.

Run data is written beneath .cypress-mcp/, including last-run.json and HTML snapshots for failed tests. The MCP process reads those files when tools are called. In run mode, the captured accumulator is reset before a new run. In interactive mode, results remain accumulated for the lifetime of the Cypress process; the documented run-event behavior also requires Cypress’s experimentalInteractiveRunEvents setting for that mode.

The server supports stdio transport and Streamable HTTP. HTTP mode listens at /mcp and can use a bearer token supplied through MCP_HTTP_TOKEN; otherwise, it generates a token when starting.

Setup and configuration

Install the scoped npm package as a development dependency:

Terminal
npm install -D @miroslavmyrha/cypress-mcp

Use Node.js 18 or newer and Cypress 12 or newer. Set the Cypress project root with --project; it defaults to the current directory. The default transport is stdio. HTTP mode accepts --port, whose default is 3333.

For local MCP clients, configure the server to run with npx -y @miroslavmyrha/cypress-mcp --project /absolute/path/to/your/project. Claude Desktop and Claude Code are shown as stdio clients in the project documentation. HTTP mode is documented for Ollama and custom bridges, but those names do not correspond to compatible-client slugs in this directory.

Add .cypress-mcp/ to .gitignore so generated results and snapshots are not committed.

Tools and capabilities

The cypress-mcp MCP server exposes these tools:

  • list_specs finds Cypress specs, with an optional glob pattern.
  • read_spec returns a spec file by relative path.
  • get_config reads supported Cypress config files with secret-like values removed.
  • get_last_run returns test states, errors, commands, DOM snapshot paths, and related run data.
  • get_screenshot returns a last-run screenshot with path and size metadata; the image is limited to 2 MB.
  • query_dom searches a failed test’s DOM snapshot with a CSS selector.
  • run_spec runs one spec and waits for its exit code and summary.

Limitations and notes

The server reports the latest captured run rather than querying Cypress Cloud. It requires the plugin and support import to collect command logs and results. Screenshots and snapshots must exist in the captured run, and DOM snapshots are available for failed tests. The project uses the scoped package name @miroslavmyrha/cypress-mcp; the unscoped npm name refers to an unrelated project. The package is released under the MIT license.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Cypress MCP

cypress-mcp is an MCP server that connects AI assistants to Cypress projects and saved test-run artifacts. Its main tools list and read specs, inspect Cypress configuration, retrieve the latest run, query failed-test DOM snapshots, fetch screenshots, and execute a single spec while returning its result.

Install it with `npm install -D @miroslavmyrha/cypress-mcp`, then register its Cypress plugin and import its support module. Configure an MCP client to launch the package with `npx` and the project path.

It documents stdio setup for Claude Desktop and Claude Code, plus HTTP usage with Ollama and custom bridges.

It reads the saved latest-run data, including the test error, executed commands, screenshot metadata, and failed-test DOM snapshot. The `query_dom` tool then searches that snapshot with a CSS selector.

Yes. The `run_spec` tool runs one Cypress spec file, waits for completion, and returns its exit code and summary.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewCypress MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/cypress-mcp?style=directory)](https://allmcps.com/mcp/cypress-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/cypress-mcp"><img src="https://allmcps.com/api/badge/cypress-mcp?style=directory" alt="Cypress MCP on AllMCPs" /></a>