# eyaushev/swagger-testcase-mcp [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/eyaushev/swagger-testcase-mcp  
**GitHub Stars:** 2  
**npm Downloads (last month):** 39  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/eyaushev-swagger-testcase-mcp

## Description
MCP server for API test case generation from Swagger/OpenAPI specs. Parses Swagger 2.0 and OpenAPI 3.x, generates test cases across 8 categories (happy path, validation, auth, error handling, boundary, security injection, idempotency, pagination/concurrency) with export to Markdown, Gherkin, Postman, k6, pytest, Allure, and TestRail.

## Tools
Capabilities this server exposes over MCP:

- **fetch_swagger** — Fetch and parse an OpenAPI/Swagger specification. Supports:
- Public URLs: https://api.example.com/swagger.json
- Internal URLs (accessible from user's machine/VPN): https://internal-api.company.com/docs/swagger.json
- Local files: /path/to/swagger.json, ./api-spec.yaml
- Auth-protected specs: pass auth_header for Bearer/Basic/API-Key auth
- **analyze_endpoint** — Analyze a specific endpoint from a loaded Swagger spec. Returns detailed info about parameters, request body, responses, and security.
- **generate_test_cases** — Generate QA test cases for a specific API endpoint. Produces positive, negative, boundary, auth, security, idempotency, pagination, and business logic test cases based on the OpenAPI spec.
- **generate_test_cases_batch** — Generate QA test cases for multiple endpoints at once. Optionally filter by tag, methods, or path prefix.
- **export_test_cases** — Export previously generated test cases in various formats: markdown, json, csv, allure_csv, gherkin, postman, k6, pytest, testrail_csv (Steps template), testrail_csv_text (Text template).
- **compare_specs** — Compare two versions of an OpenAPI spec. Detects added/removed/modified endpoints, schema changes, and breaking changes.
- **validate_spec** — Validate an OpenAPI spec for quality and completeness. Checks for missing descriptions, orphaned schemas, naming inconsistencies, missing error responses, and more. Returns a quality score (0-100).
- **generate_mock_data** — Generate realistic mock/sample data from an endpoint's request or response schema. Useful for populating Postman, tests, or documentation.
- **suggest_missing_tests** — Analyze test coverage for generated test cases. Shows which response codes, parameters, and boundary conditions are covered or missing. Provides prioritized suggestions for additional tests.
- **clear_cache** — Clear cached specs and/or generated test cases. Useful when the spec has been updated and needs to be reloaded.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "swagger-testcase-mcp": {
    "command": "npx",
    "args": ["-y","swagger-testcase-mcp"]
  }
}
```

## Documentation

## What eyaushev/swagger-testcase-mcp MCP server does

eyaushev/swagger-testcase-mcp MCP server turns Swagger and OpenAPI descriptions into structured QA test cases. It supports Swagger 2.0 and OpenAPI 3.x documents in JSON or YAML form. Specifications can describe public services, internal APIs reachable through a user machine or VPN, localhost files, or protected endpoints accessed with a supplied authentication header.

Generated cases cover positive and negative inputs, boundary constraints, authorization behavior, business-logic responses, security injection scenarios, idempotency, and pagination or sorting. The exact cases depend on endpoint parameters, schemas, constraints, response codes, and security definitions in the loaded specification. Generation can be configured by category and priority, with options such as locale, custom preconditions, maximum fields for negative tests, and skipping deprecated endpoints.

## How it works

Use `fetch_swagger` to load and parse a specification. After loading, `analyze_endpoint` reports an endpoint’s parameters, request body, responses, and security requirements. `generate_test_cases` creates cases for one endpoint, while `generate_test_cases_batch` processes multiple endpoints and can filter by tag, HTTP method, path prefix, or deprecated status.

Generated results remain available for later operations. `export_test_cases` writes them to the working directory in Markdown, JSON, CSV, Allure CSV, Gherkin, Postman, k6, pytest, or either of the supported TestRail CSV templates. `suggest_missing_tests` reviews coverage of response codes, parameters, and boundary conditions, then returns prioritized suggestions. `clear_cache` removes cached specifications and/or generated cases when a source document changes.

## Setup and configuration

Install the package globally with `npm install -g swagger-testcase-mcp`, or run it without a global install using `npx swagger-testcase-mcp`. The package requires Node.js 18 or newer and runs as a stdio MCP server.

MCP client configuration uses the command `npx` with arguments `-y swagger-testcase-mcp`. The README provides configurations for Claude Desktop, Cursor, VS Code with Claude Code, VS Code with Cline, JetBrains IDEs, and Windsurf. When loading a protected specification, pass the applicable `auth_header` to `fetch_swagger`; the supported examples include Bearer, Basic, and API-key authentication.

## Tools and capabilities

- `fetch_swagger`: Load a specification from a URL or local path and parse it.
- `analyze_endpoint`: Inspect one endpoint’s inputs, body, responses, and security.
- `generate_test_cases`: Create configurable cases for one endpoint.
- `generate_test_cases_batch`: Generate cases across selected endpoints.
- `export_test_cases`: Save generated cases in testing and documentation formats.
- `compare_specs`: Identify endpoint changes, schema changes, and breaking changes between two specifications.
- `validate_spec`: Check specification quality and return a score with findings such as missing descriptions, orphaned schemas, naming inconsistencies, and missing error responses.
- `generate_mock_data`: Produce sample data from request or response schemas, with locale support.
- `suggest_missing_tests`: Find coverage gaps and recommend additional tests.
- `clear_cache`: Remove cached specs or generated test cases.

## Limitations and notes

eyaushev/swagger-testcase-mcp MCP server generates a baseline from information present in the specification; it does not replace business-logic or exploratory testing. Security and business-logic cases are derived from documented endpoint details and common scenario categories, so undocumented behavior may require manual additions.

Ensure that URLs, local paths, VPN access, and authentication headers are available from the machine running the MCP server. Use `clear_cache` after updating a specification if cached data is no longer appropriate.

_Full upstream README: https://allmcps.com/mcp/eyaushev-swagger-testcase-mcp/readme_

