cypress-mcp-server
Integrates with Cypress testing framework, enabling AI-powered test automation, debugging, and script generation. Provides tools to run tests, generate tests from descriptions, validate test files, retrieve results, screenshots, and videos.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@cypress-mcp-server Run all Cypress tests in headless mode"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Cypress MCP Server
A Model Context Protocol (MCP) server implementation that integrates Cypress with Cursor AI, enabling AI-powered test automation, debugging, and script generation.
๐ Features
Full Cypress Integration: Supports all major Cypress commands and features
MCP Standard Compliant: Follows the official Model Context Protocol specification
Cursor AI Compatible: Seamlessly integrates with Cursor's AI assistant
Comprehensive Tool Set:
Run tests in headless or headed mode
Validate test files and code
Generate tests from descriptions
Retrieve test results, screenshots, and videos
Execute Cypress commands programmatically
Security: Configurable command allowlist and execution time limits
Logging: Comprehensive logging with Winston
Flexible Configuration: YAML-based configuration with environment variable support
Related MCP server: AI Customer Support Bot - MCP Server
๐ Prerequisites
Node.js 18.0.0 or higher
npm or yarn package manager
Cypress project (existing or new)
๐ง Installation
Option 1: Install from npm (when published)
npm install -g cypress-mcp-serverOption 2: 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โ๏ธ Configuration
1. Create Configuration File
Copy the example configuration file:
cp cypress-mcp.config.yaml.example cypress-mcp.config.yaml2. Configure Cursor
Add the MCP server to Cursor's configuration. Open Cursor settings and add:
On macOS/Linux: ~/.cursor/mcp.json
On Windows: %APPDATA%\Cursor\mcp.json
{
"mcpServers": {
"cypress": {
"command": "node",
"args": ["/path/to/cypress-mcp-server/src/index.js"],
"env": {
"CYPRESS_MCP_CONFIG": "/path/to/cypress-mcp.config.yaml"
}
}
}
}Or if installed globally:
{
"mcpServers": {
"cypress": {
"command": "cypress-mcp-server"
}
}
}3. Customize Configuration
Edit cypress-mcp.config.yaml:
cypress:
projectPath: /path/to/your/cypress/project
browser: chrome
headless: true
baseUrl: http://localhost:3000
viewportWidth: 1280
viewportHeight: 720
defaultCommandTimeout: 4000
requestTimeout: 5000
responseTimeout: 30000
mcp:
name: cypress-mcp-server
version: 1.0.0
security:
allowedCommands:
- '*'
maxExecutionTime: 300000๐ฏ Usage
Once configured, you can use natural language prompts in Cursor to interact with Cypress:
Running Tests
Run all Cypress tests in headless modeRun the test file cypress/e2e/login.cy.js using FirefoxRun Cypress tests with baseUrl set to http://localhost:8080Generating Tests
Generate a Cypress test that validates user login. The test should visit the login page, enter credentials, click login, and verify redirect to dashboard. Save it to cypress/e2e/login.cy.jsValidating Tests
Validate the Cypress test file cypress/e2e/checkout.cy.js for syntax errorsGetting Results
Show me the results from the last Cypress test runGet all screenshots from failed tests๐ Available Tools
The MCP server exposes the following tools:
cypress_run
Run Cypress tests with specified options.
Parameters:
spec(string, optional): Specific test file or glob patternbrowser(string, optional): Browser to use (chrome, firefox, edge, electron)headless(boolean, optional): Run in headless modebaseUrl(string, optional): Base URL for the applicationenv(object, optional): Environment variablesconfig(object, optional): Additional Cypress configuration
cypress_open
Open Cypress Test Runner in headed mode for interactive debugging.
Parameters:
browser(string, optional): Browser to openproject(string, optional): Path to Cypress project
cypress_validate
Validate a Cypress test file or test code.
Parameters:
testFile(string, optional): Path to test filetestCode(string, optional): Test code to validate
cypress_generate
Generate a Cypress test file from a description.
Parameters:
description(string, required): Description of the testtestName(string, optional): Name for the testoutputPath(string, optional): Path to save the generated test
cypress_get_results
Get test results from previous runs.
Parameters:
runId(string, optional): Specific run ID, or omit for all results
cypress_get_screenshots
Get screenshots captured during test runs.
Parameters:
runId(string, optional): Filter by run IDtestPath(string, optional): Filter by test path
cypress_get_videos
Get videos recorded during test runs.
Parameters:
runId(string, optional): Filter by run ID
cypress_execute_command
Execute a Cypress command directly (placeholder for advanced use cases).
๐ Examples
See the examples/ directory for:
Example Cypress test files
Sample Cursor prompts
Configuration examples
๐งช Testing
Run the test suite:
npm testRun tests with coverage:
npm run test:coverage๐ Security
The MCP server includes several security features:
Command Allowlist: Configure which Cypress commands are allowed
Execution Time Limits: Prevent long-running tests from blocking
Input Validation: All inputs are validated before execution
Error Handling: Comprehensive error handling prevents crashes
๐ Logging
Logs are written to:
Console (development mode)
logs/error.log(errors only)logs/combined.log(all logs)
Set the log level with the LOG_LEVEL environment variable:
LOG_LEVEL=debug node src/index.js๐ Troubleshooting
Server won't start
Check Node.js version:
node --version(should be 18+)Verify dependencies:
npm installCheck configuration file syntax
Review logs in
logs/directory
Tests not running
Verify Cypress is installed:
npx cypress verifyCheck project path in configuration
Ensure baseUrl is accessible
Check browser permissions
Cursor not connecting
Verify MCP configuration in Cursor settings
Check file paths are absolute
Restart Cursor after configuration changes
Check console for connection errors
Browser issues
Ensure Chrome/Firefox is installed
Check browser permissions
Try running Cypress manually:
npx cypress openReview Cypress documentation for browser setup
๐ค Contributing
Contributions are welcome! Please:
Fork the repository
Create a feature branch
Make your changes
Add tests
Submit a pull request
๐ License
MIT License - see LICENSE file for details
๐ Links
๐ Acknowledgments
Anthropic for the Model Context Protocol specification
The Cypress team for an amazing testing framework
Cursor for AI-powered development tools
๐ง Support
For issues, questions, or contributions:
Open an issue on GitHub
Check existing documentation
Review example files
Note: This is a community project and is not officially affiliated with Cypress, Cursor, or Anthropic.
Available Tools
8 toolscypress_execute_commandC
Execute a Cypress command with chaining support. This is a lower-level tool for executing specific Cypress commands.
Inputs: command (required), args, selector, options.
cypress_generateC
Generate a Cypress test file from a description
Inputs: description (required), testName, outputPath.
cypress_get_resultsA
Get test results from a previous Cypress run by run ID, or all results if no ID provided
Inputs: runId.
cypress_get_screenshotsC
Get screenshots captured during test runs
Inputs: runId, testPath.
cypress_get_videosC
Get videos recorded during test runs
Inputs: runId.
cypress_openB
Open Cypress Test Runner in headed mode for interactive debugging
Inputs: browser, project.
cypress_runB
Run Cypress tests with specified options. Returns test results including pass/fail counts, duration, and run ID.
Inputs: spec, browser, headless, baseUrl, +2 more.
cypress_validateB
Validate a Cypress test file or test code for syntax and best practices
Inputs: testFile (required), testCode.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
TDQS
Scored across 8 tools
Each tool has a distinct purpose: running, generating, validating, retrieving results/screenshots/videos, and opening the runner. No two tools overlap in function; the boundaries are clear.
All tools follow a consistent 'cypress_verb_noun' pattern in snake_case, making them predictable and easy to differentiate.
With 8 tools, the set covers core Cypress workflows (generate, run, validate, retrieve artifacts) without being overly large or sparse.
The set covers the major stages of Cypress testing: generation, validation, execution, and artifact retrieval. Missing a tool to explicitly list or delete tests, but the core lifecycle is well-supported.
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yoโฆ
Run, debug, and triage tests from your IDE using natural language, no dashboard switching, no manual data transfers. The TestMu AI (formerly LambdaTest) MCP Server is a single remote server exposing four tool suites: HyperExecute โ analyze your project, generate YAML configs and test runner commands, then monitor jobs and sessions. Automation โ pull a TestID's details plus command, network, and console logs into one chat for instant root-cause analysis. Includes mobile app upload. SmartUI โ explain pixel, layout, DOM, and perceptual changes in a visual regression run, with context-aware React/HTML/CSS fixes. Accessibility โ audit any public URL or a local React app against WCAG and get ready-to-apply remediation steps. Connects over https://mcp.lambdatest.com/mcp using OAuth 2.1 โ no API keys in your config. One-click install in Cursor; works with Claude, GitHub Copilot, Cline, and any MCP client. Tests execute on the TestMu AI cloud: 3,000+ browsers and 10,000+ real devices.
A Model Context Protocol server for Wix AI tools
MCP server for building and testing AI agents with multi-model experimentation and insights.
Related MCP Servers
- AlicenseAqualityDmaintenanceA Model Context Protocol (MCP) server for Cursor IDE that simplifies the installation and configuration of other MCP servers.312 npm75MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server that provides AI-powered customer support using Cursor AI and Glama.ai integration.4MIT

Testomatio MCP Serverofficial
AlicenseNot gradedqualityAmaintenanceA Model Context Protocol server that enables AI assistants like Cursor to interact with Testomatio test management platform, allowing users to query test cases, runs, and plans through natural language.842 npm8MIT- AlicenseBqualityDmaintenanceA Model Context Protocol server that integrates Shortcut project management functionality with AI assistants like Cursor, Windsurf, Claude Code, and Zed.33MIT