# Cypress MCP

> Cypress MCP is an open-source MCP server for developer tools. Show an AI assistant why your last headless Cypress run failed, with DOM and screenshots. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Self-hosted
- **Repository:** https://github.com/miroslavmyrha/cypress-mcp
- **MCP Registry name:** io.github.miroslavmyrha/cypress-mcp
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools), [browser automation](https://ai-powered.com/categories/browser-automation)
- **Listing updated:** 2026-11-23

## About

This server targets the gap left by Cypress's own AI tooling: headless runs on your machine and in CI. A plugin and a support import record each test's command log, error, screenshot and the page's HTML at the moment of failure into .cypress-mcp/last-run.json, and the server then lets an assistant read that file instead of someone pasting logs into chat.

Its seven tools list and read spec files, read the Cypress config with secret-looking values redacted, return the last run's results, return a screenshot of up to 2 MB, query the saved DOM snapshot of a failed test by CSS selector, and run a single spec. Content from the application under test is marked as untrusted, and the README compares it with cypress tap (live cypress open sessions) and Cypress Cloud MCP (recorded runs).

It needs Cypress 12 or newer. The scoped npm package is @miroslavmyrha/cypress-mcp, because the unscoped name belongs to an unrelated project, and it runs over stdio or an HTTP mode with a bearer token for custom bridges such as Ollama.

## Features

- **Last-run results:** Returns test states, errors, command logs and DOM snapshot paths.
- **DOM at failure:** Saves up to 100 KB of page HTML for failed tests and lets you query it by CSS selector.
- **Screenshot access:** Returns the failed-test image itself up to 2 MB.
- **Spec tools:** Lists and reads spec files and the Cypress config with secrets redacted.
- **Single-spec runs:** Runs one spec file and returns the exit code and summary.
- **Secret redaction:** Redacts secret-looking values and flags app content as untrusted.

## Good for

- Let an assistant diagnose a failing end-to-end test from CI output
- Fix a broken selector by inspecting the page as it was when the test failed
- Rerun one spec after an assistant's proposed change
- Review console and network errors captured during a test

## Install

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

```sh
claude mcp add cypress-mcp -- npx -y @miroslavmyrha/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",
        "@miroslavmyrha/cypress-mcp"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "cypress-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@miroslavmyrha/cypress-mcp"
      ]
    }
  }
}
```

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

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

```json
{
  "mcpServers": {
    "cypress-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@miroslavmyrha/cypress-mcp"
      ]
    }
  }
}
```

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",
        "@miroslavmyrha/cypress-mcp"
      ]
    }
  }
}
```

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 -- npx -y @miroslavmyrha/cypress-mcp
```

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

```toml
[mcp_servers.cypress-mcp]
command = "npx"
args = ["-y", "@miroslavmyrha/cypress-mcp"]
```

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

```json
{
  "mcpServers": {
    "cypress-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@miroslavmyrha/cypress-mcp"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user cypress-mcp npx -- -y @miroslavmyrha/cypress-mcp

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

```json
{
  "mcpServers": {
    "cypress-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@miroslavmyrha/cypress-mcp"
      ]
    }
  }
}
```

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",
        "@miroslavmyrha/cypress-mcp"
      ]
    }
  }
}
```

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",
        "@miroslavmyrha/cypress-mcp"
      ]
    }
  }
}
```

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

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "cypress-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@miroslavmyrha/cypress-mcp"
      ]
    }
  }
}
```

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",
        "@miroslavmyrha/cypress-mcp"
      ]
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "cypress-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@miroslavmyrha/cypress-mcp"
      ]
    }
  }
}
```

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

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

```json
{
  "mcpServers": {
    "cypress-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@miroslavmyrha/cypress-mcp"
      ]
    }
  }
}
```

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",
        "@miroslavmyrha/cypress-mcp"
      ]
    }
  }
}
```

## Tools

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

- `list_specs` (name suggests: reads): List Cypress spec files by glob pattern
- `read_spec` (name suggests: reads): Read a spec file's content
- `get_config` (name suggests: reads): Read the Cypress config with secrets redacted
- `get_last_run` (name suggests: reads): Results of the last run with errors, command log and DOM snapshots
- `get_screenshot` (name suggests: reads): Return a screenshot from the last run
- `query_dom` (name suggests: reads): Query a failed test's DOM snapshot with a CSS selector
- `run_spec` (name suggests: changes): Run a single spec and return the summary

## FAQ

### Does Cypress MCP work with headless runs?

Yes, that is its main purpose, locally and in CI.

### Which Cypress version is needed?

Cypress 12 or newer.

### How is Cypress MCP different from Cypress's own AI tools?

cypress tap reads a live cypress open session and Cypress Cloud MCP reads recorded runs; this reads the last local run.

### Which npm package should I install?

@miroslavmyrha/cypress-mcp; the unscoped cypress-mcp is unrelated.

### 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 -- npx -y @miroslavmyrha/cypress-mcp

### What are the best alternatives to Cypress MCP?

The closest alternatives to Cypress MCP are REA, Browser Use, Scrapling MCP Server, Context7 and Chrome DevTools MCP.

## Where this comes from

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

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Browser Use](https://ai-powered.com/mcp/browser-use): Browser Use is a freemium MCP server for browser automation.
- [Scrapling MCP Server](https://ai-powered.com/mcp/scrapling-mcp-server): Scrapling MCP Server is an open-source MCP server for web search and scraping.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.

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