Guide

How to turn Swagger into an MCP server

"Swagger" almost always means one of two things now: the old Swagger 2.0 spec format, or the tooling ecosystem people still call by that name even though the spec itself was renamed OpenAPI in 3.0. Either way, if what you have is a swagger.json or swagger.yaml file, you can hand it straight to the platform — no conversion to OpenAPI 3.x first.

Swagger 2.0 vs. OpenAPI 3.x — why it matters here

The two formats describe request bodies differently, and that's the part most naive "just paste your spec in" tools get wrong:

Swagger 2.0OpenAPI 3.x
Version field"swagger": "2.0""openapi": "3.0.x" / "3.1.x"
Request bodyA parameter with in: "body"A top-level requestBody object
Base URLhost + basePath + schemesA servers[] array

The platform's contract ingestion reads both shapes natively and extracts the same thing either way: a set of operations with a method, a path, and a resolved input schema. You don't need to run your file through an OpenAPI 2→3 converter first — that's an extra lossy step that buys you nothing here.

Go from swagger.json to a live endpoint

  1. Sign up — you land in the console with a tenant and a default environment already provisioned.
  2. API Contracts → Upload OpenAPI — despite the label, this accepts Swagger 2.0 documents too. Paste the JSON/YAML or point at a URL, and review the validation report.
  3. Generate tools — each operation becomes a tool: the operationId becomes the tool name, and the risk class comes straight from the HTTP method (GET/HEAD → low, DELETE → high, other writes → medium). See the full mapping reference if you want the details.
  4. Create an MCP server, attach the tools, and publish. You get a connectable endpoint:
https://mcpplatform.dev/mcp/srv_XXXXXXXXXX

That's the same live MCP Streamable-HTTP JSON-RPC 2.0 endpoint you'd get from a modern OpenAPI 3.x spec — the format you started from doesn't leak into what an agent sees on the other end.

Don't have operationIds in your Swagger doc? Older Swagger docs sometimes omit them. The platform derives a stable id from the method + path when one's missing, so ingestion still succeeds — you'll just want to double-check the generated tool names read sensibly before publishing.

Connect it

Once published, the endpoint works with any MCP client the same way regardless of source format — see connecting to Claude or connecting to ChatGPT.

Working from a modern OpenAPI 3.x document instead? See How to convert OpenAPI to MCP. Don't have a spec at all — just an endpoint or two? See Create an MCP server without code or Add MCP to an existing API.