# cypress-mcp

> cypress-mcp is an open-source MCP server for qa testing. MCP server that lets AI coding agents run Cypress tests and read compact failure reports. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, API, Self-hosted, macOS, Windows, Linux
- **Repository:** https://github.com/jams4code/cypress-mcp
- **MCP Registry name:** io.github.jams4code/cypress-mcp
- **Categories:** [qa testing](https://ai-powered.com/categories/qa-testing), [security testing](https://ai-powered.com/categories/security-testing)
- **Listing updated:** 2026-11-27

## About

Instead of a raw test log, an agent connected to this server gets each failing test with its file and line, the error, a screenshot and, when it failed, the page state: URL, console errors, failed network requests and selectors that exist on the page. One tool call runs the suite or a single test, and the project's files are left untouched.

The server runs the project's own Cypress install in headless mode and wraps the config so failure context is captured without edits to the codebase. Runs can be repeated to check a fix for flakiness, and results can optionally be recorded to Cypress Cloud with a run URL returned to the agent.

It suits developers who use Claude Code, Cursor, Codex, GitHub Copilot, Gemini CLI or a JetBrains IDE and maintain Cypress end-to-end or component test suites. A CLI with the same output is also included for use without MCP.

## Features

- **Compact failure reports:** Each failure lists its file and line, error message, and screenshot in one short block.
- **Page context at failure:** Shows the URL, console errors, failed requests and a DOM outline at the failing command.
- **Single test runs:** Runs a whole spec, a file glob, or one test by title or line number.
- **Repeat runs for flakiness:** Runs selected tests several times to check whether a fix holds.
- **Optional Cypress Cloud recording:** Records local runs to Cypress Cloud and returns the run URL.
- **Secret masking:** Masks tokens and credentials in page context before they reach the agent.

## Good for

- Have an agent fix a failing Cypress test using the screenshot and page state
- Re-run a single test several times to confirm a flaky fix
- List specs and test titles without running anything
- Check that a Cypress project is set up correctly before running tests
- Run the Cypress suite from a terminal or CI with JSON output

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add cypress-mcp --env CYPRESS_RECORD_KEY='<CYPRESS_RECORD_KEY>' -- npx -y cypress-mcp
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "cypress-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "cypress-mcp"
      ],
      "env": {
        "CYPRESS_RECORD_KEY": "<CYPRESS_RECORD_KEY>"
      }
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "cypress-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "cypress-mcp"
      ],
      "env": {
        "CYPRESS_RECORD_KEY": "<CYPRESS_RECORD_KEY>"
      }
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "cypress-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "cypress-mcp"
      ],
      "env": {
        "CYPRESS_RECORD_KEY": "<CYPRESS_RECORD_KEY>"
      }
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "cypress-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "cypress-mcp"
      ],
      "env": {
        "CYPRESS_RECORD_KEY": "<CYPRESS_RECORD_KEY>"
      }
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add cypress-mcp --env CYPRESS_RECORD_KEY='<CYPRESS_RECORD_KEY>' -- npx -y cypress-mcp
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.cypress-mcp]
command = "npx"
args = ["-y", "cypress-mcp"]
env = { CYPRESS_RECORD_KEY = "<CYPRESS_RECORD_KEY>" }
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "cypress-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "cypress-mcp"
      ],
      "env": {
        "CYPRESS_RECORD_KEY": "<CYPRESS_RECORD_KEY>"
      }
    }
  }
}
```

Or run: gemini mcp add -s user -e CYPRESS_RECORD_KEY='<CYPRESS_RECORD_KEY>' cypress-mcp npx -- -y cypress-mcp

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "cypress-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "cypress-mcp"
      ],
      "env": {
        "CYPRESS_RECORD_KEY": "<CYPRESS_RECORD_KEY>"
      }
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "cypress-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "cypress-mcp"
      ],
      "env": {
        "CYPRESS_RECORD_KEY": "<CYPRESS_RECORD_KEY>"
      }
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "cypress-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "cypress-mcp"
      ],
      "env": {
        "CYPRESS_RECORD_KEY": "<CYPRESS_RECORD_KEY>"
      }
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "cypress-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "cypress-mcp"
      ],
      "env": {
        "CYPRESS_RECORD_KEY": "<CYPRESS_RECORD_KEY>"
      }
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "cypress-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "cypress-mcp"
      ],
      "env": {
        "CYPRESS_RECORD_KEY": "<CYPRESS_RECORD_KEY>"
      }
    }
  }
}
```

The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "cypress-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "cypress-mcp"
      ],
      "env": {
        "CYPRESS_RECORD_KEY": "<CYPRESS_RECORD_KEY>"
      }
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "cypress-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "cypress-mcp"
      ],
      "env": {
        "CYPRESS_RECORD_KEY": "<CYPRESS_RECORD_KEY>"
      }
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "cypress-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "cypress-mcp"
      ],
      "env": {
        "CYPRESS_RECORD_KEY": "<CYPRESS_RECORD_KEY>"
      }
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 1 of 4 tools changes data; 1 name doesn't say. From the server's own tool labels and tool names; not verified by us.

- `cypress_run` (name suggests: changes): Run Cypress tests headless, returning failures with file and line, error, screenshot and page context.
- `cypress_get_failure` (name suggests: reads): Inspect a run's failures, page context, test states, screenshots or output by runId.
- `cypress_list_specs` (name suggests: reads): List spec files and their test counts, optionally with full test titles.
- `cypress_doctor`: Check the Cypress config, package, binary, specs and Cloud settings.

## FAQ

### What do I need installed to use cypress-mcp?

Node.js 22.12 or newer and Cypress installed in the project. It runs the project's own Cypress and does not download one.

### Does cypress-mcp change my test files?

No. Nothing in the project is changed; the wrapper config and runtime live in node_modules cache.

### Which Cypress versions are supported?

Cypress 14.x to 16.x are supported; older versions are not tested.

### Is cypress-mcp free?

It is released under the Apache License 2.0.

### How do I add cypress-mcp to Claude Code?

Run this command in your terminal: claude mcp add cypress-mcp --env CYPRESS_RECORD_KEY='<CYPRESS_RECORD_KEY>' -- npx -y cypress-mcp

### What are the best alternatives to cypress-mcp?

The closest alternatives to cypress-mcp are cypress-mcp and Cypress Cloud MCP.

## Where this comes from

- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [cypress-mcp](https://ai-powered.com/mcp/cypress-mcp-3): cypress-mcp is an open-source MCP server for developer tools.
- [Cypress Cloud MCP](https://ai-powered.com/mcp/cypress-cloud-mcp): Cypress Cloud MCP is an MCP server for qa testing.

---
Source: https://ai-powered.com/mcp/cypress-mcp-2
