Swagger 2.0 support
Swagger to MCP Server Generator
A Swagger file already describes the routes, parameters, request bodies, and authentication used by your REST API. SpecToMCP converts that contract into MCP tool definitions and the code required to call the original API.
Generate your MCP serverWhat the converter reads from Swagger
The generator reads operations under paths, combines path-level and operation-level parameters, derives a base URL from schemes, host, and basePath, and maps supported security definitions to environment variables.
- Path, query, and header parameters
- Swagger body parameters containing JSON schemas
- API key security definitions
- Operation IDs, summaries, and tags
Why the output remains editable
One REST endpoint does not always equal one good agent tool. Generated code is therefore a starting point you own: remove unsafe operations, improve descriptions, combine repetitive calls, and add authorization checks appropriate to your users.
Swagger MVP limitations
The initial browser converter focuses on common JSON APIs. It does not generate OAuth flows, multipart uploads, cookie authentication, callbacks, or external reference files. Bundle external references before pasting the document.
Frequently asked questions
Does Swagger 2.0 need to be upgraded first?
No for common JSON APIs. SpecToMCP reads Swagger 2.0 directly. Complex documents may still benefit from being normalized to OpenAPI 3.0 first.
Does the tool upload my Swagger file?
No. Parsing and ZIP creation run in the browser.