
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
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"swagger-testcase-mcp": {
"command": "npx",
"args": [
"-y",
"swagger-testcase-mcp"
]
}
}
}工具
10Fetch 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.
开发工具 分类下的更多 MCP 服务器
Golf
golf-mcpProduction-Ready MCP Server Framework • Build, deploy & scale secure AI agent infrastructure • Includes Auth, Observability, Debugger, Telemetry & Runtime • Run real-world MCPs powering AI Agents
Stakpak Agent CLI
stakpakShip your code, on autopilot. An open source agent that lives on your machines 24/7 and keeps your apps running. 🦀
Code Index MCP
johnhuang316A Model Context Protocol (MCP) server that helps large language models index, search, and analyze code repositories with minimal setup
MCP-Bridge
SecretiveShellA middleware to provide an openAI compatible endpoint that can call MCP tools
MCP Inspector
modelcontextprotocolVisual testing tool for MCP servers
评论