MCP Server
Rocketship includes an MCP (Model Context Protocol) server that enables AI coding agents to write better Rocketship tests by providing examples, patterns, and guidance.
Philosophy
The Rocketship MCP server is designed as a knowledgeable assistant that helps coding agents understand Rocketship testing patterns and best practices. Unlike traditional code generators, this MCP server:
- Provides guidance, not files: Shows examples and patterns for agents to adapt
- Maintains agent control: The coding agent creates all files and makes all decisions
- Emphasizes learning: Helps agents understand Rocketship concepts deeply
- Focuses on quality: Promotes E2E customer journey testing and best practices
Installation
The MCP server is published as an npm package and can be used with zero installation:
{
"mcpServers": {
"rocketship": {
"command": "npx",
"args": ["-y", "@rocketshipai/mcp-server@latest"]
}
}
}
Available Tools
The MCP server provides six assistant tools that provide guidance rather than generating files:
1. get_rocketship_examples
Get real examples and best practices for specific Rocketship features from the current codebase.
Available Plugins:
http
- API endpoint testing with authentication and validationdelay
- Timing control and wait operationsscript
- Custom JavaScript logic executionsql
- Database operations and validationlog
- Structured logging and debuggingagent
- AI-powered validation and analysisbrowser
- UI automation and testingsupabase
- Direct Supabase API operations
Example Request:
What You Get:
- Real YAML code examples from the codebase
- Best practices for the specific plugin
- Implementation guidance and patterns
- Variable usage examples
2. suggest_test_structure
Suggests proper file structure and test organization based on current project configuration.
Project Types:
frontend
- Browser-based testing with user journeysbackend
- API endpoint testingfullstack
- Combined frontend and backend testingapi
- Pure API testing focusmobile
- Mobile application testing
Example Request:
What You Get:
- Recommended directory structure
- File organization patterns
- Plugin recommendations for your project type
- Test flow suggestions
3. get_schema_info
Provides current schema information for validation and proper syntax.
Schema Sections:
plugins
- Available plugins and their configurationsassertions
- Validation patterns and typessave
- Data extraction and variable storagestructure
- Overall YAML test structurefull
- Complete schema documentation
Example Request:
What You Get:
- Current schema validation rules
- Required and optional fields
- Examples of proper syntax
- Compatibility information
4. get_cli_guidance
Provides current CLI usage patterns and commands from introspection.
Command Types:
run
- Execute tests with various optionsvalidate
- Syntax and schema validationstructure
- File structure and organization guidance
Example Request:
What You Get:
- Current CLI command examples
- Flag explanations and usage
- Common usage patterns
- Version-specific information
5. get_rocketship_cli_installation_instructions
Get step-by-step instructions for installing the Rocketship CLI on different platforms.
Platform Support:
auto
- Auto-detect platform (default)macos-arm64
- macOS with Apple Siliconmacos-intel
- macOS with Intel processorslinux
- Linux distributionswindows
- Windows systems
Example Request:
What You Get:
- Platform-specific installation commands
- Available vs NOT available installation methods
- Post-installation verification steps
- Troubleshooting guidance
- Prerequisites and dependencies
6. analyze_codebase_for_testing
Analyzes a codebase to suggest meaningful test scenarios based on available plugins.
Focus Areas:
user_journeys
- End-to-end customer workflowsapi_endpoints
- API testing strategiescritical_paths
- Business-critical functionalityintegration_points
- Service integration testing
Example Request:
What You Get:
- Suggested test scenarios for your codebase
- Plugin recommendations based on project type
- Critical flow identification
- Testing strategy recommendations
Integration Examples
With Claude Code
Add to your .mcp.json
file in your project root:
{
"mcpServers": {
"rocketship": {
"command": "npx",
"args": ["-y", "@rocketshipai/mcp-server@latest"]
}
}
}
Then ask Claude for help:
Claude will use the MCP server to provide installation instructions and relevant testing examples to help you get started.
With Cursor
- Go to Cursor Settings > Features > Enable Model Context Protocol
- Add to your MCP configuration:
{
"mcpServers": {
"rocketship": {
"command": "npx",
"args": ["-y", "@rocketshipai/mcp-server@latest"]
}
}
}
- Ask Cursor for guidance:
With Windsurf
Add to your Windsurf MCP configuration (~/.codeium/windsurf/mcp_config.json
):
{
"mcpServers": {
"rocketship": {
"command": "npx",
"args": ["-y", "@rocketshipai/mcp-server@latest"]
}
}
}
Then ask for assistance:
"Help me install Rocketship and understand how to use step chaining for a complete e-commerce checkout flow"
With Other MCP Clients
Any MCP-compatible client can use the Rocketship server. The server communicates via JSON-RPC over stdio, making it compatible with various AI assistants and development tools.
Best Practices
1. Ask for Specific Guidance
Instead of asking for complete test generation, ask for guidance on specific aspects:
Good:
- "How do I install Rocketship on my platform?"
- "Show me examples of API authentication testing"
- "What assertions work best for user profile endpoints?"
- "How should I structure an E2E checkout flow test?"
Less Effective:
- "Generate all my tests"
- "Create a complete test suite"
2. Learn the Patterns
Use the MCP server to understand Rocketship concepts:
- Study the examples provided
- Understand the reasoning behind best practices
- Adapt patterns to your specific use case
- Build your own expertise over time
3. Focus on Customer Journeys
The MCP server emphasizes E2E customer journey testing:
- Think about complete user workflows
- Test realistic user scenarios
- Validate data consistency across steps
- Include error and edge cases
4. Iterate and Improve
Use the validation tool to continuously improve:
- Get initial structure guidance
- Create your test implementation
- Validate and get improvement suggestions
- Refine based on feedback
- Learn from the process
Example Workflow
Here's how a typical interaction works:
User: "I need to install Rocketship and test a user registration API
that creates a user, sends an email, and requires email verification"
Agent: *Uses get_rocketship_cli_installation_instructions*
MCP Server: *Returns platform-specific installation instructions with:*
- Installation commands for the user's platform
- Post-installation verification steps
- Troubleshooting guidance
Agent: "First, let's get Rocketship installed..."
*Provides installation guidance*
User: "Great! Now I need help with the test structure"
Agent: *Uses get_rocketship_examples with feature_type="http"*
MCP Server: *Returns HTTP testing examples including:*
- Multi-step workflow patterns
- Email verification testing approaches
- Data validation between steps
- Best practices for user onboarding flows
Agent: "Based on these examples, let me help you create a test..."
*Creates test file incorporating the patterns*
User: "Now I want to add database validation to ensure the user was created correctly"
Agent: *Uses get_plugin_config with plugin="sql"*
MCP Server: *Returns SQL plugin configuration examples*
Agent: *Helps add SQL validation step to the existing test*
User: "Can you review my test and suggest improvements?"
Agent: *Uses validate_and_suggest with the YAML content*
MCP Server: *Returns specific suggestions for improvement*
Agent: *Helps implement the suggested improvements*
Environment Variables
The MCP server respects these environment variables:
ROCKETSHIP_LOG
: Set log level (DEBUG, INFO, ERROR)NODE_ENV
: Development/production mode
Troubleshooting
MCP Server Not Found
If your AI client can't find the MCP server:
- Ensure Node.js 18+ is installed
- Check your MCP configuration syntax
- Restart your AI client after configuration changes
- Verify the npm package is accessible
No Guidance Provided
If the MCP server isn't providing helpful guidance:
- Be more specific in your requests
- Provide context about what you're trying to test
- Ask for specific features or patterns
- Try different tool combinations
Examples Don't Match Your Use Case
If the provided examples don't fit your scenario:
- Ask for multiple feature examples to combine
- Request specific plugin configurations
- Use the validation tool to refine your approach
- Adapt the patterns to your specific needs
Security Considerations
The MCP server:
- Never generates files: Only provides guidance and examples
- No code access: Works with agent's existing knowledge
- Read-only operation: Cannot modify your project
- Local execution: All operations run in your environment
- No data storage: Doesn't store or transmit your code
Future Enhancements
Planned improvements include:
- Enhanced pattern library: More examples for complex scenarios
- Interactive tutorials: Step-by-step guidance for common workflows
- Context-aware suggestions: Better understanding of project structure
- Performance optimization: Faster response times and better caching