Skip to content
MCP server

cypress-mcp

MCP server that lets AI coding agents run Cypress tests and read compact failure reports

Runs locally

cypress-mcp is an open-source MCP server for qa testing. It runs locally on your machine and is started by your AI client.

Pricing
Open source
Platforms
CLI, API, Self-hosted
Runs
Locally
What it can do
Can change data (1 tool)
Version
0.5.0
Listing updated

Similar MCP servers

Install

Add with the CLI

Run in a terminal

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.

Or share it with your project

Add to .mcp.json

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

Claude Code setup guide

Add to claude_desktop_config.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.

Claude Desktop setup guide

Add to ~/.cursor/mcp.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.

Cursor setup guide

Add to ~/.copilot/mcp-config.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.

VS Code setup guide

Add with the CLI

Run in a terminal

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

Or add to config.toml

Add to ~/.codex/config.toml

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

Codex setup guide

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "cypress-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "cypress-mcp"
      ],
      "env": {
        "CYPRESS_RECORD_KEY": "<CYPRESS_RECORD_KEY>"
      }
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

    Add to ~/.gemini/settings.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

    Antigravity

    Add to ~/.gemini/config/mcp_config.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.

    Gemini CLI and Antigravity setup guide

  • Devin Desktop (formerly Windsurf)

    Add to ~/.config/devin/mcp_config.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.

    Devin Desktop setup guide

  • Cline

    Add to cline_mcp_settings.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.

    Cline setup guide

  • Zed

    Add to Zed settings.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.

    Zed setup guide

  • JetBrains AI Assistant and Junie

    AI Assistant

    Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add

    {
      "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.

    Junie

    Add to ~/.junie/mcp/mcp.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.

    JetBrains AI Assistant and Junie setup guide

  • Kiro

    Add to ~/.kiro/settings/mcp.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.

    Kiro setup guide

Using several servers? Build one config file with the MCP config generator.

Configuration

  • CYPRESS_RECORD_KEYCypress Cloud record key. Only needed to record runs with cloud: {record: true}; never passed through the agent.

About cypress-mcp

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.

Tools this server provides (4)

Taken from the project documentation; the running server may differ.

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_runName suggests: changes
Run Cypress tests headless, returning failures with file and line, error, screenshot and page context.
cypress_get_failureName suggests: reads
Inspect a run's failures, page context, test states, screenshots or output by runId.
cypress_list_specsName 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.

What it does

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

Pricing

Open source

Open source under Apache 2.0; free to use.

cypress-mcp 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.

How AIPoweredBot checks servers