MCP-QA

MCP-QA

An 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.

Category
Visit Server

README

MCP-QA: Analizador de Contratos Swagger/OpenAPI

MCP Server para análisis completo de contratos Swagger/OpenAPI con exportación a JSON y generación automática de documentación.

🎯 Características

  • ✅ Soporta Swagger 2.0 y OpenAPI 3.x
  • ✅ Análisis completo de endpoints (paths, métodos HTTP)
  • ✅ Extracción de parámetros (path, query, header, cookie)
  • ✅ Análisis de request bodies con schemas
  • ✅ Análisis de responses (códigos HTTP, schemas, headers)
  • ✅ Extracción de schemas con propiedades, tipos y formatos
  • ✅ Validaciones (obligatoriedad, tipos, formatos UUID/fecha/etc)
  • ✅ Información de servidores y seguridad
  • ✅ Tags y documentación
  • Exportación a JSON con toda la información estructurada
  • Generación de README con documentación estilo Swagger UI

🏗️ Arquitectura

El proyecto sigue arquitectura limpia y principios SOLID con estructura modular donde cada herramienta es completamente autónoma:

mcp-qa/
├── tools/                           # Herramientas de QA (una por subdirectorio)
│   └── swagger_analyzer/            # Analizador de contratos Swagger/OpenAPI
│       ├── src/                     # Código fuente de la herramienta
│       │   ├── domain/              # Capa de dominio
│       │   │   ├── models.py        # Entidades del dominio
│       │   │   ├── interfaces.py    # Abstracciones (Fetcher, Parser, Analyzer)
│       │   │   └── exporters.py     # Interfaces de exportación
│       │   ├── application/         # Capa de aplicación (casos de uso)
│       │   │   ├── swagger_analyzer.py            # Analizador de contratos
│       │   │   ├── complete_analysis_use_case.py  # Orquestador principal
│       │   │   └── export_use_cases.py            # Casos de uso de exportación
│       │   └── infrastructure/      # Capa de infraestructura
│       │       ├── http_fetcher.py           # Obtención HTTP
│       │       ├── contract_parser.py        # Parser YAML/JSON
│       │       ├── json_exporter.py          # Exportador JSON
│       │       └── markdown_generator.py     # Generador de Markdown
│       ├── __init__.py
│       ├── config.py                # Configuración de la herramienta
│       └── tool.py                  # Facade de la herramienta
├── output/                          # Salidas generadas (por herramienta)
│   └── swagger_analyzer/            # Salidas del analizador Swagger
│       ├── swagger-analysis.json
│       └── API-README.md
└── main.py                          # Punto de entrada MCP

Principios SOLID aplicados:

  • S (Single Responsibility): Cada clase tiene una única responsabilidad bien definida
  • O (Open/Closed): Fácil agregar nuevas herramientas sin modificar las existentes
  • L (Liskov Substitution): Las implementaciones son intercambiables vía interfaces
  • I (Interface Segregation): Interfaces específicas y focalizadas
  • D (Dependency Inversion): Dependencias de abstracciones mediante inyección

Estructura modular y escalable:

  • Cada herramienta es autónoma: Tiene su propio src/ con arquitectura limpia completa
  • Alta cohesión, bajo acoplamiento: No hay dependencias entre herramientas
  • Estructura homóloga: Todas las herramientas siguen el mismo patrón arquitectónico
  • Salidas organizadas: Por herramienta en output/
  • Fácil de mantener: Cambios en una herramienta NO afectan a otras
  • Fácil de escalar: Agregar nuevas herramientas es simplemente duplicar la estructura

📦 Instalación

# Instalar dependencias
pip install -e .

🚀 Uso principal:

Análisis completo de contrato Swagger (una herramienta, todo incluido)

# Análisis completo: texto + JSON + README
analizar_contrato_swagger("http://localhost:8080/v3/api-docs")

# Con URL de Swagger UI para incluir en README
analizar_contrato_swagger(
    "http://localhost:8080/v3/api-docs",
    swagger_ui_url="http://localhost:8080/swagger-ui/index.html"
)

# Solo texto, sin generar archivos
analizar_contrato_swagger(
    "https://petstore.swagger.io/v2/swagger.json",
    generar_json=False,
    generar_readme=False
)

# Solo JSON
analizar_contrato_swagger(
    "http://localhost:8080/v3/api-docs",
    generar_readme=False
)

Salidas generadas:

Todos los archivos se guardan automáticamente en output/swagger_analyzer/:

  • swagger-analysis.json: Análisis completo en JSON estructurado
  • API-README.md: Documentación estilo Swagger UI Esto genera un README.md profesional con:
  • Tabla de contenidos
  • Resumen y estadísticas
  • Links a Swagger UI
  • Documentación completa de endpoints
  • Tablas de schemas y propiedades
  • Códigos de estado HTTP

🔍 Información extraída

El analizador extrae:

  • Información general: título, versión, descripción
  • Servidores: URLs y configuraciones
  • Endpoints:
    • Path y método HTTP
    • Parámetros (ubicación, tipo, obligatoriedad)
    • Request body (content types, schemas)
    • Responses (códigos, schemas, headers)
  • Schemas:
    • Propiedades con tipos y formatos
    • Validaciones (min/max length, pattern, enum)
    • Obligatoriedad de campos
    • Formatos especiales (UUID, date, email, etc)
  • Seguridad: esquemas de autenticación
  • Estadísticas: resumen de métodos, códigos HTTP, content types

📄 Licencia

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured