Skip to content

Proposal: Official MCP server for Cypress (@cypress/mcp) #33412

@yashpreetbathla

Description

@yashpreetbathla

Summary

This is a proposal to add an official Model Context Protocol (MCP) server for Cypress — similar to what the Playwright team recently shipped with @playwright/mcp (27k+ stars in a few months).

What is MCP?

Model Context Protocol is an open standard (backed by Anthropic, adopted by Microsoft, Google, etc.) that lets AI assistants like Claude, Cursor, and VS Code Copilot connect to external tools. An MCP server exposes a set of tools that AI agents can call.

What would @cypress/mcp do?

Let AI agents interact with Cypress directly:

  • cypress_run — Run specs and get structured pass/fail results
  • cypress_list_specs / cypress_read_spec / cypress_write_spec — Manage test files
  • cypress_get_config — Read project config
  • cypress_snapshot — Get the ARIA accessibility tree of a page
  • cypress_navigate, cypress_click, cypress_type — Browser automation
  • cypress_screenshot — Take screenshots

Why this matters for Cypress users

  1. AI-assisted test writing — AI snapshots a page, reads its ARIA tree, writes accurate selectors
  2. AI-driven debugging — AI runs failing tests, reads the output, suggests fixes
  3. Reduced onboarding friction — New team members ask AI to generate tests for existing pages

Proof of concept

I built a working standalone implementation at https://github.com/yashpreetbathla/cypress-mcp:

  • 16 MCP tools implemented
  • 25 unit tests, all passing
  • Verified end-to-end: AI snapshotted a live Todo app, wrote 10 Cypress tests, all 10 passed
  • Supports stdio (Claude Desktop) and HTTP/SSE (VS Code, Cursor) transports

Proposed path

Happy to contribute this as @cypress/mcp following the full Cypress contribution process. Looking for guidance on:

  1. Whether this belongs in the monorepo or as a separate cypress-io/cypress-mcp repo
  2. Which team to coordinate with
  3. Any preferred architecture changes

References

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions