Skip to content
MCP server

cypress-mcp

MCP server that lets AI coding agents run Cypress tests and get compact failure context

Runs locally

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

Pricing
Open source
Platforms
CLI, Self-hosted, VS Code
Runs
Locally
What it can do
Can change data (1 tool)
Version
0.5.3
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

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.

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

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

Pricing

Open source

Apache License 2.0, free to use.

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

How AIPoweredBot checks servers