MCP.so
ログイン

Swagger Testcase MCP

@eyaushev

Swagger Testcase MCP について

MCP server for API testing: generates test cases, validates specs, compares versions, and creates mock data from Swagger/OpenAPI specifications

基本情報

カテゴリ

開発者ツール

ライセンス

MIT

ランタイム

node

トランスポート

stdio

公開者

eyaushev

投稿者

Эдуард Яушев

設定

以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。

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

ツール

10

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 a specific endpoint from a loaded Swagger spec. Returns detailed info about parameters, request body, responses, and security.

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 QA test cases for multiple endpoints at once. Optionally filter by tag, methods, or path prefix.

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 two versions of an OpenAPI spec. Detects added/removed/modified endpoints, schema changes, and breaking changes.

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 realistic mock/sample data from an endpoint's request or response schema. Useful for populating Postman, tests, or documentation.

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 cached specs and/or generated test cases. Useful when the spec has been updated and needs to be reloaded.

概要

What is Swagger Testcase MCP?

Swagger Testcase MCP is an MCP server for API testing that generates structured test cases, validates specs, compares versions, and creates mock data from Swagger/OpenAPI specifications. It is built for QA engineers and developers who need to automate baseline test case creation from API specs.

How to use Swagger Testcase MCP?

Install globally with npm install -g swagger-testcase-mcp or run directly with npx swagger-testcase-mcp. Configure the server in your MCP client’s config file (e.g., claude_desktop_config.json). Then load a spec using fetch_swagger, generate test cases for an endpoint, and export to your preferred format.

Key features of Swagger Testcase MCP

  • Parses Swagger 2.0 and OpenAPI 3.x (JSON and YAML)
  • Generates 8 test categories: positive, negative, boundary, auth, business logic, security, idempotency, pagination
  • Exports to 9 formats: Markdown, JSON, CSV, Allure CSV, Gherkin, Postman, k6, pytest, TestRail CSV
  • Validates spec quality with 11 rules and actionable suggestions
  • Compares two spec versions with breaking change detection
  • Creates realistic mock data from schemas with locale support
  • Analyzes test coverage and suggests improvements
  • Supports authenticated access to internal corporate APIs
  • Configurable generation with category, priority, locale, and custom preconditions

Use cases of Swagger Testcase MCP

  • Generate test cases for internal corporate APIs behind VPN or custom auth
  • Compare two versions of an API spec to detect breaking changes
  • Create realistic mock data for development and testing
  • Export test cases in Postman or k6 format for automated execution
  • Validate spec quality and get suggestions for improvement

FAQ from Swagger Testcase MCP

What does Swagger Testcase MCP not cover?

It does not generate test cases for business logic rules, cross-endpoint dependencies, or custom validation constraints beyond what OpenAPI supports. You can compensate by describing business rules in the MCP client chat and asking the LLM to extend the generated cases.

What are the runtime requirements?

Node.js version 18.0.0 or higher is required.

How does it handle authenticated API specs?

You can load specs from internal corporate networks by providing an auth_header parameter (e.g., Bearer eyJ...). The tool supports VPN, SSO, and other auth mechanisms.

What export formats are supported?

Markdown, JSON, CSV, Allure CSV, Gherkin, Postman, k6, pytest, and TestRail CSV (two templates). All exports are automatically saved to the working directory.

Can it work with local files and localhost?

Yes. It accepts file paths (e.g., /path/to/swagger.json), localhost URLs, and public URLs.

コメント

「開発者ツール」の他のコンテンツ