Skip to main content
Glama

Swagger API MCP Server

MIT License
  • Apple
  • Linux

swagger-api-mcp

English | 简体中文

This is a Swagger/OpenAPI documentation fetcher based on MCP (Model Context Protocol). It can fetch and parse Swagger/OpenAPI documentation from a specified URL and supports multiple transport methods.

✨ Features

  • Fetch Swagger/OpenAPI documentation from remote URLs
  • Support for both Swagger 2.0 and OpenAPI 3.x formats
  • Multiple transport methods:
    • stdio: Standard input/output mode
    • http: HTTP server mode
    • sse: Server-Sent Events mode
  • Automatic port allocation and failover
  • CORS support
  • Comprehensive error handling

Getting Started

MacOS / Linux

{ "mcpServers": { "swagger-api-mcp": { "command": "npx", "args": [ "-y", "swagger-api-mcp", "--transport", "stdio", "--doc-url", "xxx" ] } } }

Windows

{ "mcpServers": { "swagger-api-mcp": { "command": "cmd", "args": [ "/c", "npx", "-y", "swagger-api-mcp", "--transport", "stdio", "--doc-url", "xxx" ] } } }

Command Line Arguments

  • --transport <stdio|http|sse>: Choose transport method (default: stdio)
  • --port <number>: HTTP/SSE server port (default: 3000)
  • --doc-url <url>: Swagger/OpenAPI documentation URL (required)

💻 Development

# Clone the repository git clone https://github.com/bluechenchenchen/swagger-api-mcp.git # Install dependencies pnpm install # Run in development mode pnpm dev # Build pnpm build

📋 Requirements

  • Node.js >= 16.0.0
  • npm >= 6.0.0 or pnpm >= 6.0.0

📄 License

MIT

-
security - not tested
A
license - permissive license
-
quality - not tested

A server that fetches and parses Swagger/OpenAPI documentation from specified URLs, supporting multiple transport methods like stdio, HTTP, and SSE.

  1. ✨ Features
    1. Getting Started
      1. MacOS / Linux
      2. Windows
      3. Command Line Arguments
    2. 💻 Development
      1. 📋 Requirements
        1. 📄 License

          Related MCP Servers

          • -
            security
            A
            license
            -
            quality
            A server that enables interaction with any API that has a Swagger/OpenAPI specification through Model Context Protocol (MCP), automatically generating tools from API endpoints and supporting multiple authentication methods.
            Last updated -
            34
            90
            TypeScript
            Apache 2.0
          • A
            security
            F
            license
            A
            quality
            A server based on Model Context Protocol that parses Swagger/OpenAPI documents and generates TypeScript types and API client code for different frameworks (Axios, Fetch, React Query).
            Last updated -
            12
            7
            13
            TypeScript
          • -
            security
            A
            license
            -
            quality
            A LangChain-based server that supports dynamic loading of OpenAPI specifications and enables natural language interaction with web services through Server-Sent Events (SSE) transport.
            Last updated -
            17
            Python
            MIT License
          • -
            security
            A
            license
            -
            quality
            A lightweight server that enables interaction with the Swagger Petstore API using the Model Context Protocol, allowing operations on pets, stores, and users through dynamically loaded OpenAPI specifications.
            Last updated -
            1
            Python
            Apache 2.0

          View all related MCP servers

          MCP directory API

          We provide all the information about MCP servers via our MCP API.

          curl -X GET 'https://glama.ai/api/mcp/v1/servers/bluechenchenchen/swagger-api-mcp'

          If you have feedback or need assistance with the MCP directory API, please join our Discord server