SuperAPIAI Directory

mcp-swagger-server

github.com · AI coding

Converts OpenAPI/Swagger specifications to MCP format so AI assistants can call REST APIs.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux · API

About this tool

MCP Swagger Server (abbreviated as mss) is a tool that converts any REST API conforming to the OpenAPI/Swagger specification into Model Context Protocol (MCP) format, enabling AI assistants to understand and invoke these APIs.

Purpose This tool is aimed at scenarios where AI assistants need to connect to existing REST APIs. By converting the OpenAPI/Swagger specification, the API can then be used as a tool that AI can invoke.

Main capabilities

  • Zero-configuration conversion: input an OpenAPI specification and immediately get MCP tools.
  • Progressive command line: provides a step-by-step guided command-line interface for easy user configuration.
  • Terminal-first experience: uses CLI / interactive terminal as the primary mode of use.
  • Multiple transport protocols: supports SSE, Streamable, and Stdio transports.
  • Secure authentication: supports Bearer Token authentication to protect API access.
  • Swagger 2.0 documents are automatically converted to OpenAPI 3.x at startup (including host/basePath mapping).

Usage Environment requirements: Node.js ≥ 20.0.0, pnpm ≥ 8.0.0 (recommended). Available commands:

  • mss: interactive terminal interface (default).
  • mcp-swagger-server / mcp-swagger: standard command line (suitable for scripts and AI client integration).
  • mss --openapi ...: direct startup mode (skips the interactive interface). Usage notes: STDIO startup is not supported in interactive session mode; if you need STDIO, use mss --openapi ... --transport stdio (compatible alias: mcp-swagger-server --transport stdio ...). If you want to start directly in mss (skipping the interactive interface), explicitly pass the --openapi parameter. If servers.url in the OpenAPI document is a relative path (such as /v1), prefer loading the document using a remote URL, or explicitly pass --base-url. Authentication: mcp-swagger-server supports Bearer Token authentication, which can protect APIs that requireauthenticated API access.

Applicable scenarios Suitable for development scenarios where REST APIs conforming to the OpenAPI/Swagger specification need to be exposed for AI assistants to invoke, and especially suitable for developers who prefer command-line / terminal operations.

Limitations STDIO startup is not supported in interactive session mode; to use STDIO, the transport method must be explicitly specified as described above. Other limitations (such as the specific range of supported specification versions, platform differences, etc.) are not yet provided.

Development and license The project welcomes contributions; see the contribution guide for details on contributing. Licensed under the MIT License; see the LICENSE file for details.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools