Skip to content
MCP server

Cypress MCP

Show an AI assistant why your last headless Cypress run failed, with DOM and screenshots

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
Runs
Locally
What it can do
Can change data (1 tool)
Version
0.1.2

Similar MCP servers

Install

Add with the CLI

Run in a terminal

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.

Or share it with your project

Add to .mcp.json

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

Claude Code setup guide

Add to claude_desktop_config.json

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

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

Claude Desktop setup guide

Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

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

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

Cursor setup guide

Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

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

VS Code setup guide

Add with the CLI

Run in a terminal

codex mcp add cypress-mcp -- npx -y @miroslavmyrha/cypress-mcp

Or add to config.toml

Add to ~/.codex/config.toml

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

Codex setup guide

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

{
  "mcpServers": {
    "cypress-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@miroslavmyrha/cypress-mcp"
      ]
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

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

    Antigravity

    Add to ~/.gemini/config/mcp_config.json

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

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

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

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

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

    Junie

    Add to ~/.junie/mcp/mcp.json

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

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

    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.

About Cypress MCP

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.

Tools this server provides (7)

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

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_specsName suggests: reads
List Cypress spec files by glob pattern
read_specName suggests: reads
Read a spec file's content
get_configName suggests: reads
Read the Cypress config with secrets redacted
get_last_runName suggests: reads
Results of the last run with errors, command log and DOM snapshots
get_screenshotName suggests: reads
Return a screenshot from the last run
query_domName suggests: reads
Query a failed test's DOM snapshot with a CSS selector
run_specName suggests: changes
Run a single spec and return the summary

What it does

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

Pricing

Open source

Free open-source npm package

Cypress MCP 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.

How AIPoweredBot checks servers