Turn a Swagger 2.0 spec into an MCP server
Plenty of working APIs are still described in Swagger 2.0, and they do not need a migration to reach AI. Import the document as it is and every operation becomes an MCP tool for Claude, ChatGPT or Cursor.
No conversion to OpenAPI 3 first
Older APIs, internal services and many vendor SDKs still publish a Swagger 2.0 document. GetMCP reads it directly, with the same review step as an OpenAPI import.
- Open a server, choose Import, then Swagger
- Paste the document, upload a .json, .yaml or .yml file, or give its URL
- Untick the operations you do not want; every one starts ticked
- Import as drafts to review first, or straight to active
# swagger.json { "swagger": "2.0", "host": "api.mysaas.com", "basePath": "/v1", "schemes": ["https"], "paths": { "/orders": { "post": { "summary": "Create an order", "parameters": [{ "in": "body", "name": "order", … }] } } } } # The MCP tool, calling https://api.mysaas.com/v1/orders create_an_order
What carries over from the spec
Naming, descriptions and tags work exactly as they do for OpenAPI. The Swagger-specific parts map like this.
| In the spec | In the MCP tool |
|---|---|
| schemes, host and basePath | The base URL, using the first scheme listed, or https when none is |
| summary, else operationId | The tool name |
| description and tags | The tool's description and tags |
| Path, query and header parameters | Parameters with type, description, default and required. Path parameters are always required |
| The in: body parameter's schema | Body fields, nested objects flattened so the client can fill them in |
| securityDefinitions | Reported after the import, so you know which auth to set on the server |
Good to know before you import
Auth is set once, by you
Basic, API key and OAuth 2 definitions are detected and listed. Set the matching auth on the server's settings and every imported tool uses it. OAuth needs Pro or above.
Form fields are sent as JSON
formData parameters have no special handling: on POST, PUT and PATCH they go in a JSON body. Test any endpoint that only accepts form posts or file uploads.
Re-importing adds, it does not sync
Import the spec again and GetMCP skips tools that already exist or creates duplicates, your choice. Existing tools are not updated in place.
Questions about Swagger import
Do I need to convert my spec to OpenAPI 3 first?
No. GetMCP reads swagger: "2.0" documents directly. A document that declares OpenAPI 3.0 or 3.1 goes through the OpenAPI importer instead.
Which plans include Swagger import?
Pro, Agency and Unlimited. The free Solo plan includes cURL import and the manual tool builder.
Do I have to import every endpoint?
No. Every operation is listed with a checkbox before anything is created, so you can leave out the ones the AI should not use.
An older spec still makes a modern MCP server.
Import the Swagger document you have, pick the operations, and connect Claude, ChatGPT or Cursor.