cypress
Model Context Protocol (MCP) server for Cypress, enabling AI-powered test automation in Cursor
claude mcp add --transport stdio glh230-cypress-mcp-server node /path/to/cypress-mcp-server/src/index.js \ --env CYPRESS_MCP_CONFIG="/path/to/cypress-mcp.config.yaml"
How to use
This MCP server integrates Cypress with Cursor AI, enabling AI-powered test automation, debugging, and test generation within the MCP framework. The server exposes tools to run Cypress tests, open the Cypress UI for interactive debugging, validate test files, generate tests from natural language descriptions, and retrieve results, screenshots, and videos from previous runs. You can control Cypress behavior via configuration in cypress-mcp.config.yaml, including project path, browser, headless mode, timeouts, and security settings. Use Cursor prompts to perform actions like running all tests in headless mode, executing specific spec files, generating tests from descriptions, or validating test files, with the MCP server translating prompts into Cypress commands and returning structured results. It supports an allowlist-based security model, execution time limits, and detailed logging to help diagnose issues during automation tasks.
How to install
Prerequisites:
- Node.js 18.0.0 or higher
- npm or yarn
- A Cypress project (existing or new)
Option A: Install from npm (if published)
npm install -g cypress-mcp-server
Option B: Install from source
git clone https://github.com/yourusername/cypress-mcp-server.git
cd cypress-mcp-server
npm install
npm link # Optional: link globally for CLI access
Configure and run (example):
- Create or edit the MCP config YAML at a known path, e.g. /path/to/cypress-mcp.config.yaml
- Start the MCP server using the Node entry point or your preferred launcher, ensuring CYPRESS_MCP_CONFIG points to the YAML:
export CYPRESS_MCP_CONFIG=/path/to/cypress-mcp.config.yaml
node /path/to/cypress-mcp-server/src/index.js
- If you expose a global CLI, you can start via the CLI name configured during npm link, e.g.:
cypress-mcp-server
Note: Adjust paths according to your environment and how you install the server.
Additional notes
Tips and notes:
- Ensure your cypress-mcp.config.yaml is correctly formatted and points to the Cypress project.
- Cursor must reference the MCP server name (e.g., cypress) in its mcp.json configuration to establish the connection.
- The server supports an allowlist of Cypress commands and timeouts; tune security settings in the YAML under security.allowedCommands and security.maxExecutionTime.
- Logs will be written to the configured log locations; ensure the log directory exists or is writable.
- If using the Node-based invocation, ensure the path to src/index.js matches your repository structure; otherwise, adjust to your entry point.
- For local development, you can run Cypress commands manually via npx cypress verify to validate your Cypress installation.
- If you deploy in production, consider locking down environment variables and using absolute paths to configuration files.
Related MCP Servers
zen
Selfhosted notes app. Single golang binary, notes stored as markdown within SQLite, full-text search, very low resource usage
MCP -Deepseek_R1
A Model Context Protocol (MCP) server implementation connecting Claude Desktop with DeepSeek's language models (R1/V3)
mcp-fhir
A Model Context Protocol implementation for FHIR
mcp
Inkdrop Model Context Protocol Server
mcp-appium-gestures
This is a Model Context Protocol (MCP) server providing resources and tools for Appium mobile gestures using Actions API..
dubco -npm
The (Unofficial) dubco-mcp-server enables AI assistants to manage Dub.co short links via the Model Context Protocol. It provides three MCP tools: create_link for generating new short URLs, update_link for modifying existing links, and delete_link for removing short links.