# cypress-mcp

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

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Self-hosted, VS Code, JetBrains
- **Repository:** https://github.com/jadev-corp/cypress-mcp
- **MCP Registry name:** com.jadev-corp/cypress-mcp
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-27

## About

Cypress MCP runs a project's own Cypress tests on demand and returns each failure with its file and line, the error message, a screenshot, and the state of the page at the failing command. The page state covers the URL, console errors, failed network requests, the command log and a trimmed DOM outline, so an agent can diagnose a broken selector or a server error without a manual rerun.

The server is an npm package started with npx and a path to the folder that holds the Cypress config. Four tools are on by default for running specs, reading failures, listing specs and checking the setup, and optional groups add spec analysis and config inspection. It can also be used from a terminal with the same output.

It suits developers and QA engineers who use an AI coding client such as Claude Code, Cursor, Codex or VS Code Copilot and already maintain Cypress end-to-end or component tests. Runs use the project's installed Cypress and leave project files unchanged; results can optionally be recorded to Cypress Cloud.

## Features

- **Failures with file and line:** Each failed test is reported with its location, error text, screenshot and a source excerpt.
- **Page context at failure:** Shows the URL, console errors, failed requests, Cypress command log and DOM outline at the failing step.
- **Single test and repeat runs:** Runs one test by title or line number, and can repeat it to check whether a fix holds.
- **Flaky test detection:** Marks tests that failed and then passed on retry within the same run.
- **Secret masking:** Masks tokens, keys and JWTs in captured URLs, form fields and console text before results reach the agent.
- **Optional Cypress Cloud recording:** Records local runs to Cypress Cloud and returns the run URL when a record key is configured.

## Good for

- Have an AI agent fix a failing Cypress test using the screenshot and page state
- Check that a flaky test fix holds by repeating one test several times
- Run the Cypress suite from a terminal or CI script and get readable failure output
- Set up MCP client configuration for a Cypress project with a single init command

## 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 headless with optional spec, test name, repeat and Cloud recording options; returns failures, flaky tests and a runId.
- `cypress_get_failure` (name suggests: reads): Inspect a run by runId: failures with source excerpts, page context, test states, screenshots or output.
- `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

### Does cypress-mcp need Cypress installed in the project?

Yes. It runs the project's own Cypress install and does not download one.

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

No. Wrapper configs and screenshots are written to node_modules/.cache, and the project's files are not modified.

### Which Cypress versions are supported?

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

### What does cypress-mcp require to run?

Node.js 22.12 or newer and Cypress installed in the project.

### Is cypress-mcp free?

Yes. cypress-mcp is open source, so you can use and self-host it for free.

### 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 Cloud MCP, Api Testing MCP, Api Test MCP, Playwright Report MCP and Qase Test Management.

## 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 Cloud MCP](https://ai-powered.com/mcp/cypress-cloud-mcp): Cypress Cloud MCP is an MCP server for qa testing.
- [Api Testing MCP](https://ai-powered.com/mcp/api-testing-mcp): Api Testing MCP is an open-source MCP server for developer tools.
- [Api Test MCP](https://ai-powered.com/mcp/api-test-mcp): Api Test MCP is an open-source MCP server for developer tools.
- [Playwright Report MCP](https://ai-powered.com/mcp/playwright-report-mcp): Playwright Report MCP is an open-source MCP server for browser automation.
- [Qase Test Management](https://ai-powered.com/mcp/qase-test-management): Qase Test Management is a freemium MCP server for developer tools.
- [M00N Report](https://ai-powered.com/mcp/m00n-report): M00N Report is an open-source MCP server for developer tools.
- [MCP Test Runner](https://ai-powered.com/mcp/mcp-test-runner): MCP Test Runner is an open-source MCP server for developer tools.
- [browserstack](https://ai-powered.com/mcp/browserstack): browserstack is an MCP server for developer tools.

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