{
  "markdown": "# Cucumber Studio MCP Server\n\n[![NPM Version](https://img.shields.io/npm/v/cucumberstudio-mcp)](https://www.npmjs.com/package/cucumberstudio-mcp)\n[![NPM Downloads](https://img.shields.io/npm/dm/cucumberstudio-mcp)](https://www.npmjs.com/package/cucumberstudio-mcp)\n[![Docker Pulls](https://img.shields.io/docker/pulls/herosizy/cucumberstudio-mcp)](https://hub.docker.com/r/herosizy/cucumberstudio-mcp)\n[![GitHub Release](https://img.shields.io/github/v/release/HeroSizy/cucumberstudio-mcp)](https://github.com/HeroSizy/cucumberstudio-mcp/releases)\n[![Build Status](https://img.shields.io/github/actions/workflow/status/HeroSizy/cucumberstudio-mcp/release.yml)](https://github.com/HeroSizy/cucumberstudio-mcp/actions)\n[![Test Coverage](https://img.shields.io/badge/coverage-82%25-brightgreen)](https://github.com/HeroSizy/cucumberstudio-mcp)\n[![TypeScript](https://img.shields.io/badge/TypeScript-5.8-blue)](https://www.typescriptlang.org/)\n[![License](https://img.shields.io/github/license/HeroSizy/cucumberstudio-mcp)](https://github.com/HeroSizy/cucumberstudio-mcp/blob/master/LICENSE)\n\n> *Vibe Coded with Claude Code and Pu-Er 🍵*\n\nA Model Context Protocol (MCP) server that provides LLM access to Cucumber Studio's testing platform. This server enables AI assistants to retrieve test scenarios, action words, test runs, and project information from Cucumber Studio.\n\n## Features\n\n- **Dual Transport Support** - STDIO and Streamable HTTP transports with session management\n- **Project Management** - List and retrieve project details\n- **Scenario Access** - Browse test scenarios and search by tags\n- **Action Words** - Access reusable test steps and definitions\n- **Test Execution** - View test runs, executions, and build information\n- **Hot Reload Development** - Instant server restart on file changes with tsx --watch\n- **Configurable Logging** - Structured logging with multiple output destinations\n- **Comprehensive Error Handling** - Robust error handling with detailed feedback\n- **Type Safety** - Full TypeScript implementation with Zod validation\n- **Comprehensive Testing** - 82%+ test coverage with Vitest and MSW\n\n## Installation\n\n### Desktop Extension (MCPB) Installation\n\nThe easiest way to use this MCP server is as a Desktop Extension:\n\n1. **Download Extension**: Get the latest `.mcpb` file from the [releases page](https://github.com/HeroSizy/cucumberstudio-mcp/releases) (automatically built from each release)\n2. **Install Extension**: Import the extension in your compatible AI desktop application\n3. **Configure Credentials**: Set up your Cucumber Studio API credentials through the extension settings:\n   - **Access Token**: Your Cucumber Studio API access token\n   - **Client ID**: Your Cucumber Studio client ID\n   - **User ID**: Your Cucumber Studio user ID\n\nThe extension will automatically handle the MCP server setup and communication.\n\n### Quick Start (Command Line)\n\nRun directly with npx (no installation required):\n```bash\nnpx cucumberstudio-mcp\n```\n\nSet your environment variables first:\n```bash\nexport CUCUMBERSTUDIO_ACCESS_TOKEN=\"your_token\"\nexport CUCUMBERSTUDIO_CLIENT_ID=\"your_client_id\"\nexport CUCUMBERSTUDIO_UID=\"your_uid\"\n```\n\n### Development Installation\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/HeroSizy/cucumberstudio-mcp.git\ncd cucumberstudio-mcp\n```\n\n2. Install dependencies:\n```bash\nnpm install\n```\n\n3. Set up environment variables:\n```bash\ncp .env.example .env\n# Edit .env with your Cucumber Studio API credentials\n```\n\n4. Build the server:\n```bash\nnpm run build\n```\n\n## Docker Support\n\n### Using Pre-built Image (Recommended)\n\nRun the official Docker image from Docker Hub:\n```bash\n# With environment file\ndocker run --env-file .env herosizy/cucumberstudio-mcp\n\n# With environment variables\ndocker run -e CUCUMBERSTUDIO_ACCESS_TOKEN=your_token \\\n           -e CUCUMBERSTUDIO_CLIENT_ID=your_client_id \\\n           -e CUCUMBERSTUDIO_UID=your_uid \\\n           herosizy/cucumberstudio-mcp\n```\n\n### Using Docker Compose\n\n1. Set up environment variables:\n```bash\ncp .env.example .env\n# Edit .env with your Cucumber Studio API credentials\n```\n\n2. Update docker-compose.yml to use the pre-built image:\n```yaml\nversion: '3.8'\nservices:\n  cucumberstudio-mcp:\n    image: herosizy/cucumberstudio-mcp\n    env_file:\n      - .env\n    restart: unless-stopped\n    ports:\n      - \"${MCP_PORT:-3000}:3000\"\n```\n\n3. Run with Docker Compose:\n```bash\ndocker-compose up\n```\n\n### Building Locally\n\n1. Build the image:\n```bash\nnpm run docker:build\n```\n\n2. Run the container:\n```bash\nnpm run docker:run\n```\n\nThe Docker setup includes health checks and automatic restarts for production use. The multi-stage build process creates optimized production images with only runtime dependencies (~150MB).\n\n## Configuration\n\nThe server requires Cucumber Studio API credentials. Get these from your Cucumber Studio account settings:\n\n### Required Environment Variables\n- `CUCUMBERSTUDIO_ACCESS_TOKEN` - Your API access token\n- `CUCUMBERSTUDIO_CLIENT_ID` - Your client ID  \n- `CUCUMBERSTUDIO_UID` - Your user ID\n\n### Optional Configuration\n- `CUCUMBERSTUDIO_BASE_URL` - API base URL (default: https://studio.cucumberstudio.com/api)\n- `MCP_TRANSPORT` - Transport type: `stdio` (default), `http`, or `streamable-http`\n- `MCP_PORT` - HTTP transport port (default: 3000)\n- `MCP_HOST` - HTTP transport host (default: 0.0.0.0)\n- `MCP_CORS_ORIGIN` - CORS origin setting (default: true)\n\n### Logging Configuration\n- `LOG_LEVEL` - Log level: `error`, `warn`, `info`, `debug`, `trace` (default: info)\n- `LOG_API_RESPONSES` - Log Cucumber Studio API responses (default: false)\n- `LOG_REQUEST_BODIES` - Log API request bodies for debugging (default: false)\n- `LOG_RESPONSE_BODIES` - Log API response bodies for debugging (default: false)\n- `LOG_TRANSPORT` - Logging output: `console`, `stderr`, `file`, `none` (default: stderr)\n- `LOG_FILE` - Log file path (required if LOG_TRANSPORT=file)\n\n## Usage\n\n### Transport Options\n\nThe server supports both STDIO and HTTP transports:\n\n#### STDIO Transport (Default)\n```bash\n# Development\nnpm run dev\n\n# Production\nnpm start\n```\n\n#### HTTP Transport\n```bash\n# Development\nnpm run dev:http\n\n# Production\nnpm run start:http\n```\n\n\n### Using with MCP Clients\n\n#### Desktop Extension (Recommended)\nImport the `.mcpb` extension file directly into your compatible AI desktop application. The extension handles all configuration through its settings interface.\n\n#### Manual MCP Configuration\n\nFor manual MCP client configuration:\n\n##### Option 1: NPX (Recommended)\n```json\n{\n  \"mcpServers\": {\n    \"cucumberstudio\": {\n      \"command\": \"npx\",\n      \"args\": [\"cucumberstudio-mcp\"],\n      \"env\": {\n        \"CUCUMBERSTUDIO_ACCESS_TOKEN\": \"your_token\",\n        \"CUCUMBERSTUDIO_CLIENT_ID\": \"your_client_id\",\n        \"CUCUMBERSTUDIO_UID\": \"your_uid\"\n      }\n    }\n  }\n}\n```\n\n##### Option 2: Local Installation\n```json\n{\n  \"mcpServers\": {\n    \"cucumberstudio\": {\n      \"command\": \"node\",\n      \"args\": [\"/path/to/cucumberstudio-mcp/build/index.js\"],\n      \"env\": {\n        \"CUCUMBERSTUDIO_ACCESS_TOKEN\": \"your_token\",\n        \"CUCUMBERSTUDIO_CLIENT_ID\": \"your_client_id\",\n        \"CUCUMBERSTUDIO_UID\": \"your_uid\"\n      }\n    }\n  }\n}\n```\n\n##### Option 3: Docker Hub Image\n```json\n{\n  \"mcpServers\": {\n    \"cucumberstudio\": {\n      \"command\": \"docker\",\n      \"args\": [\"run\", \"--rm\", \"-i\", \"--env-file\", \"/path/to/.env\", \"herosizy/cucumberstudio-mcp\"]\n    }\n  }\n}\n```\n\n##### Option 4: Local Docker Build\n```json\n{\n  \"mcpServers\": {\n    \"cucumberstudio\": {\n      \"command\": \"docker\",\n      \"args\": [\"run\", \"--rm\", \"-i\", \"--env-file\", \"/path/to/.env\", \"cucumberstudio-mcp\"]\n    }\n  }\n}\n```\n\n## Available Tools\n\n### Project Tools\n- `cucumberstudio_list_projects` - List all accessible projects\n- `cucumberstudio_get_project` - Get detailed project information\n\n### Scenario Tools\n- `cucumberstudio_list_scenarios` - List scenarios in a project\n- `cucumberstudio_get_scenario` - Get detailed scenario information\n- `cucumberstudio_find_scenarios_by_tags` - Find scenarios by tags\n\n### Action Word Tools\n- `cucumberstudio_list_action_words` - List reusable action words\n- `cucumberstudio_get_action_word` - Get detailed action word information\n- `cucumberstudio_find_action_words_by_tags` - Find action words by tags\n\n### Test Execution Tools\n- `cucumberstudio_list_test_runs` - List test runs\n- `cucumberstudio_get_test_run` - Get detailed test run information\n- `cucumberstudio_get_test_executions` - Get individual test results\n- `cucumberstudio_list_builds` - List builds\n- `cucumberstudio_get_build` - Get build details\n- `cucumberstudio_list_execution_environments` - List execution environments\n\n## Development\n\n### Hot Reload Development\nThe server supports hot reload for rapid development:\n\n```bash\n# STDIO transport with hot reload\nnpm run dev\n\n# HTTP transport with hot reload  \nnpm run dev:http\n```\n\nFiles are automatically recompiled and the server restarts when changes are detected.\n\n### Testing and Quality\n```bash\n# Install dependencies\nnpm install\n\n# Run type checking\nnpm run typecheck\n\n# Run linting\nnpm run lint\n\n# Build for production\nnpm run build\n\n# Run tests\nnpm test\n\n# Run tests in watch mode\nnpm run test:watch\n\n# Run tests with coverage (82%+ coverage)\nnpm run test:coverage\n\n# Run tests with UI\nnpm run test:ui\n```\n\n### Build Options\n```bash\n# Production build (default) - optimized for size, no .d.ts/.js.map files\nnpm run build\n\n# Development build - includes source maps and type declarations for debugging\nnpm run build:dev\n```\n\n### MCPB Extension Development\n\n```bash\n# Validate manifest.json\nnpm run mcpb:validate\n\n# Build complete MCPB extension for local testing (optimized production build)\nnpm run mcpb:build\n\n# Check info about built extension\nnpm run mcpb:info\n\n# Clean up build artifacts\nnpm run mcpb:clean\n```\n\n## Architecture\n\nThe server is built with a modular, production-ready architecture:\n\n### Core Technologies\n- **TypeScript** - Full type safety with strict configuration\n- **Dual Transports** - STDIO for local use, Streamable HTTP for remote access\n- **Zod** - Runtime validation for API inputs and configuration\n- **Axios** - HTTP client with comprehensive error handling and logging\n- **MCP SDK** - Official Model Context Protocol implementation\n- **Express** - HTTP server with CORS, security middleware, and session management\n- **Vitest** - Modern testing framework with 82%+ code coverage\n- **MSW** - Mock Service Worker for realistic API testing\n\n### Key Features\n- **Session Management** - HTTP transport with session tracking and cleanup\n- **Comprehensive Logging** - Structured logging with configurable outputs and levels\n- **Error Handling** - Robust error handling with detailed feedback and recovery\n- **Security** - Origin validation, CORS protection, and input sanitization\n- **Health Monitoring** - Health check endpoints and request/response tracking\n- **Development Workflow** - Hot reload, comprehensive testing, and Docker support\n\n## Testing\n\nThe project includes comprehensive test coverage:\n\n```bash\n# Run all tests\nnpm test\n\n# Run tests with coverage report\nnpm run test:coverage\n\n# Run tests in watch mode (for development)\nnpm run test:watch\n```\n\nTest coverage includes:\n- Unit tests for all modules\n- Integration tests for the MCP server\n- Transport layer testing\n- API client mocking and testing\n- Configuration validation\n- Error handling scenarios\n\n## Publishing and Releases\n\nThis project uses automated releases via GitHub Actions. When a version tag is pushed, it automatically:\n\n1. **Runs full test suite** - Ensures code quality and coverage\n2. **Publishes to NPM** - Makes the package available via `npx cucumberstudio-mcp`\n3. **Builds and publishes Docker image** - Pushes multi-platform images to Docker Hub\n4. **Creates GitHub release** - Generates release notes and links\n\n### Creating a Release\n\n1. Update the version in `package.json`:\n```bash\nnpm version patch|minor|major\n```\n\n2. Push the tag to trigger the release:\n```bash\ngit push origin --tags\n```\n\n3. The GitHub Action will automatically:\n   - Publish to NPM: https://www.npmjs.com/package/cucumberstudio-mcp\n   - Push to Docker Hub: https://hub.docker.com/r/herosizy/cucumberstudio-mcp\n   - Create a GitHub release with changelog\n\n### Required Secrets\n\nFor automated publishing, the following secrets must be configured in the GitHub repository:\n\n- `NPM_TOKEN` - NPM authentication token\n- `DOCKER_USERNAME` - Docker Hub username  \n- `DOCKER_PASSWORD` - Docker Hub password or access token\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Add tests for new functionality\n5. Ensure all tests pass: `npm test`\n6. Submit a pull request\n\n## License\n\nMIT License - see LICENSE file for details\n\n## Resources\n\n- [Cucumber Studio API Documentation](https://studio-api.cucumberstudio.com/#introduction)\n- [Cucumber Studio API Reference](https://github.com/SmartBear/cucumberstudio-api-documentation)\n- [Model Context Protocol](https://modelcontextprotocol.io/)\n- [MCP TypeScript SDK](https://github.com/modelcontextprotocol/typescript-sdk)",
  "bytes": 13073,
  "sha": "a3b467630348dc9e52cdb49a430c66d102e94b08625c3716ad2f5123ac4879c8",
  "repo_slug": "herosizy/cucumberstudio-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_herosizy_cucumberstudio_fb6f230e/readme"
}