swagger-mcp-server

swagger-mcp-server

11

Swagger MCP Server is a tool designed to parse Swagger/OpenAPI documents and generate TypeScript types and API clients. It supports integration through the Model Context Protocol and can handle large documents efficiently with caching and lazy loading.

Swagger MCP Server

A server based on the Model Context Protocol (MCP) designed to parse Swagger/OpenAPI documents and generate TypeScript types and API client code.

Features

  • Parses Swagger/OpenAPI documents supporting v2 and v3
  • Generates TypeScript type definitions
  • Generates API client code for different frameworks (Axios, Fetch, React Query, etc.)
  • Provides functionalities via MCP protocol for easy integration with large language models
  • Optimized for handling large documents with caching and lazy loading strategies

Quick Start

Install dependencies using npm or pnpm, then start the server. Communication is via standard input/output.

Supported Client Frameworks

Supports Axios, Fetch, and React Query frameworks for API clients.

Available MCP Tools

  1. Parse Swagger/OpenAPI documents
  2. Generate TypeScript types
  3. Generate API client code
  4. File writer tool

Instructions for handling large API documents and managing cache using provided tools are included.