Labsco
MCP SERVER

MCP Swagger Server

by zaizaizhao

Convert an OpenAPI or Swagger spec into MCP tools with zero config — a guided interactive CLI, operation filters, Bearer-token auth, and three transports.

MCP Plumbing: Proxies, Registries & Inspectors
Summary
Spec in, MCP tools out — with a guided path.

The differentiator against other spec-to-MCP converters is the onboarding: an interactive terminal walks you through configuration before you commit to flags, which lowers the barrier for a first run. Underneath it is the expected kit — operation filters to trim the surface, Bearer-token auth, custom headers, and a choice of stdio, SSE or Streamable transport. One wrinkle worth noting: the interactive session mode cannot start in stdio, so for a Claude Desktop-style stdio launch you pass the spec and transport as flags directly.

What it is

A tool that turns a REST API's OpenAPI or Swagger specification into MCP tools an AI client can call. It leads with a terminal-first experience: a guided interactive CLI (`mss`) for newcomers, and a direct command mode for scripts and AI-client integration.

What you get
  • An OpenAPI or Swagger spec loaded from a URL or file — `--openapi`; Swagger 2.0 is converted to OpenAPI 3.x on startup
  • A guided interactive terminal (`mss`) for step-by-step configuration, or a one-shot non-interactive launch
  • The exposed operations filtered by HTTP method, path (with wildcards), operation id, status code or parameter
  • Bearer-token authentication, with the token passed directly or read from an environment variable
  • Custom request headers, static or from environment variables, plus a base-URL override
  • Three transports — stdio, SSE and Streamable — selectable with `--transport`
Requirements

Node.js 20.0.0 or higher, and pnpm 8+ recommended. Install with `npm i mcp-swagger-server -g`, which provides `mss` (interactive), and `mcp-swagger-server` / `mcp-swagger` (standard CLI for scripts and AI clients). Configuration can come from flags, a `--config` JSON file, or a `.env` file with `MCP_*` variables. Claude Desktop launches it as `mss` with `--openapi` and `--transport stdio` args. The package.json names the monorepo `mcp-swagger-monorepo` at 1.0.0; the published package is `mcp-swagger-server`. Interactive session mode does not support stdio startup — for stdio, pass `--openapi ... --transport stdio` directly.

Setup effort

One command — npm i mcp-swagger-server -g