bdd-regression-test-generator
Parses OpenAPI/Swagger service contracts to generate BDD Gherkin feature files and TypeScript Jest regression tests for API endpoints.
Click on "Install 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., "@bdd-regression-test-generatorgenerate Gherkin and Jest tests from ./petstore.yaml"
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.
bdd-regression-test-generator
An autonomous agent that analyzes REST API endpoints and OpenAPI/Swagger service contracts to generate:
BDD Gherkin specifications (
.featurefiles) describing all happy-path and edge-case scenarios.TypeScript regression test scripts (Jest + Playwright-ready) ready to run against real services.
It exposes two interfaces:
Interface | Description |
CLI |
|
MCP Server | Model Context Protocol server exposable to any MCP-aware host (e.g. IBM Bob, Claude Desktop) |
Features
Parses OpenAPI 3.x and Swagger 2.0 contracts (JSON or YAML).
Extracts all paths, HTTP methods, parameters, request bodies, and response schemas.
Generates one
.featurefile per endpoint tag group.Generates one
*.spec.tsfile per endpoint tag group with fully typed Jest test cases.Supports custom base-URL injection at generation time.
MCP server exposes
analyze_contract,generate_gherkin, andgenerate_teststools.
Related MCP server: Swagger Testcase MCP
Installation
npm install
npm run buildTo use as a global CLI after building:
npm linkCLI Usage
# Generate both Gherkin and Jest tests from an OpenAPI YAML spec
bdd-gen generate --input ./petstore.yaml --output ./generated --baseUrl https://api.example.com
# Generate only Gherkin feature files
bdd-gen generate --input ./petstore.json --output ./generated --only gherkin
# Generate only Jest test scripts
bdd-gen generate --input ./petstore.json --output ./generated --only jest
# Analyze a contract and print a summary (no file generation)
bdd-gen analyze --input ./petstore.yamlCLI Options
Option | Alias | Description | Default |
|
| Path to the OpenAPI/Swagger contract file | required |
|
| Directory where generated files will be written |
|
|
| Base URL to embed in the generated test files |
|
| Generate only | both | |
|
| Enable verbose logging |
|
MCP Server
Start the MCP server with:
npm run mcpThe server registers the following tools:
analyze_contract
Parses an OpenAPI/Swagger contract from a file path or raw JSON/YAML string.
Input:
{ "source": "./petstore.yaml" }Output: A structured ContractSummary JSON object with paths, methods, parameters, and schemas.
generate_gherkin
Generates Gherkin .feature content from a parsed contract.
Input:
{
"source": "./petstore.yaml",
"outputDir": "./generated"
}Output: List of written .feature file paths.
generate_tests
Generates TypeScript Jest test scripts from a parsed contract.
Input:
{
"source": "./petstore.yaml",
"outputDir": "./generated",
"baseUrl": "https://api.example.com"
}Output: List of written .spec.ts file paths.
Project Structure
bdd-regression-test-generator/
├── src/
│ ├── parser/
│ │ └── contract-analyzer.ts # OpenAPI/Swagger parser and extractor
│ ├── generator/
│ │ ├── gherkin-builder.ts # Gherkin .feature file builder
│ │ └── jest-builder.ts # TypeScript Jest spec builder
│ ├── mcp/
│ │ └── server.ts # MCP server exposing generation tools
│ └── cli.ts # Commander-based CLI entry point
├── tests/
│ └── generator.test.ts # Unit tests for parser and generators
├── dist/ # Compiled output (after build)
├── package.json
├── tsconfig.json
└── README.mdRunning Tests
npm testWith coverage:
npm run test:coverageExample: Generated Gherkin
Feature: Pets
Background:
Given the API base URL is "https://api.example.com"
Scenario: GET /pets - list all pets - success
Given I have valid authentication credentials
When I send a GET request to "/pets"
Then the response status code should be 200
And the response body should match the "PetList" schema
Scenario: GET /pets - list all pets - unauthorized
Given I have invalid or missing authentication credentials
When I send a GET request to "/pets"
Then the response status code should be 401Example: Generated Jest Test
import axios from 'axios';
const BASE_URL = 'https://api.example.com';
describe('Pets', () => {
describe('GET /pets', () => {
it('should return 200 for a valid request', async () => {
const response = await axios.get(`${BASE_URL}/pets`);
expect(response.status).toBe(200);
});
});
});License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP server for the comprehensive analysis of Swagger 2.0 and OpenAPI 3.x contracts. It allows users to extract detailed information about endpoints, request/response schemas, parameters, and security configurations from API documentation.
- AlicenseAqualityFmaintenanceMCP server for API test case generation from Swagger/OpenAPI specs. Parses Swagger 2.0 and OpenAPI 3.x, generates test cases across 8 categories (positive, negative, boundary, auth, security, idempotency, pagination, business logic), and exports to Postman, TestRail, Allure, k6, pytest, Gherkin, and CSV. Supports internal corporate APIs with auth headers. Auto-saves export files to your working di10112MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that automates Playwright-based UI and API testing, supporting test case generation from requirements or API specs, and execution with detailed reports.121MIT
- AlicenseNot gradedqualityCmaintenanceHigh-performance MCP server for OpenAPI specifications that parses specs, diffs versions, tracks dependencies, and generates code (TypeScript, Rust, Python).222MIT
Related MCP Connectors
MCP server for AI access to Swagger by SmartBear.
MCP server for AI access to SmartBear tools, including BugSnag, Reflect, Swagger, PactFlow, QTM4J.
Generate a typed SDK, CLI, and MCP server from any OpenAPI or GraphQL spec, and keep them current.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/felipeassis10/bdd-regression-test-generator'
If you have feedback or need assistance with the MCP directory API, please join our Discord server