Get an OpenAPI spec from your framework
An OpenAPI (Swagger) file lists every endpoint of your API: its path, method, inputs and which key it needs. It is the most exact way to give your API to MCPEasy. Pick your framework for the exact packages, code and commands. New to this? Read how an OpenAPI spec becomes an MCP server first.
First, check if you already have one
Many APIs already publish their spec. Open your API's address followed by each of these. If one shows a page of JSON or YAML with "paths" in it, you are done: paste that link into MCPEasy.
/openapi.json/swagger.json/docs-json/v3/api-docs/api-docs/openapi/v1.json/swagger/v1/swagger.jsonPick your framework
- ExpressNode.js (JavaScript or TypeScript) · swagger-autogenswagger-autogen reads your routes and writes openapi.json. No comments needed.
- NestJSNode.js (TypeScript) · @nestjs/swaggerAdd @nestjs/swagger and its CLI plugin. The spec is served at /docs-json.
- FastifyNode.js (JavaScript or TypeScript) · @fastify/swaggerRegister @fastify/swagger before your routes. The spec is served at /documentation/json.
- FastAPIPython · Built inNothing to install. Your spec is already live at /openapi.json.
- Django REST FrameworkPython · drf-spectacularInstall drf-spectacular and run one command to write openapi.yaml.
- FlaskPython · flask-smorestPlain Flask has no spec. flask-smorest adds one, but routes must use its blueprints.
- LaravelPHP · ScrambleInstall Scramble and run php artisan scramble:export. No annotations needed.
- Ruby on RailsRuby · rspec-openapi or rswagHave request specs? rspec-openapi writes the file when you run them. Otherwise use rswag.
- Spring BootJava or Kotlin · springdoc-openapiAdd the springdoc dependency. The spec is served at /v3/api-docs.
- ASP.NET CoreC# (.NET) · Microsoft.AspNetCore.OpenApi or Swashbuckle.NET 9+: AddOpenApi() and MapOpenApi() serve /openapi/v1.json. .NET 8: Swashbuckle.
- Go (gin, echo, chi, net/http)Go · swagswag builds the spec from comments above your handlers. swag init writes docs/swagger.json.
Give it to MCPEasy
Have a link? Paste it (best)
In MCPEasy, create a server, choose OpenAPI URL and paste the link, for example https://api.example.com/openapi.json. Later changes to your API can be picked up with a sync.
Have a file? Upload it
Choose Upload file and drop in the .json or .yaml file (up to 5 MB). MCPEasy turns each endpoint into a tool, and you review them all before anything goes live.
No spec, but you use Postman?
- Open Postman and find your collection in the left sidebar.
- Click the three dots next to its name, then Export.
- Choose Collection v2.1 and click Export. A .json file is saved.
- In MCPEasy, choose Postman and drop that file in.
None of these?
In MCPEasy choose From code (GitHub). It reads your routes and inputs straight from the repository, read-only, in any language. Or choose Enter by hand for a few endpoints, about a minute each.
More guides for MCP and OpenAPI
- OpenAPI to MCP serverHow a spec maps to MCP tools, which endpoints to keep, and how auth works.
- REST API to MCP serverConvert any API, with or without a spec: Postman, cURL, code, plus a worked example.
- OpenAPI spec from FastAPINothing to install: FastAPI already serves your spec at /openapi.json.
- OpenAPI spec from ExpressThe packages, code and commands to produce a spec from an Express app.