Worked example
OpenAPI to MCP Example: Petstore API
The sample loaded in the generator contains three operations: list pets, create a pet, and retrieve one pet by ID. It is intentionally small enough to make each OpenAPI-to-MCP mapping visible.
Generate your MCP serverGET /pets becomes list_pets
The optional limit query parameter becomes an integer property in the MCP input schema. When the tool runs, the API client serializes it into the URL query string.
POST /pets becomes create_pet
The JSON requestBody schema becomes a required body property. Bearer auth is represented by an environment variable and is injected by the server, never exposed as a tool argument.
GET /pets/{petId} becomes get_pet
The required path parameter becomes a required MCP input. The executor URL-encodes the supplied value before replacing the path placeholder.
GET /pets/{petId}
→ tool: get_pet
→ input: { pet_id: string }Frequently asked questions
Can I load the example without uploading a file?
Yes. The homepage opens with the compact YAML example and includes a Load sample action.
Does the generator call the example API?
No. It generates execution code but never calls the upstream API from the website.