serve_locally
Start a local mock server that serves one or more APIs from OpenAPI spec files or URLs. Combines multiple APIs into a single server for local testing.
Instructions
Start ONE mockzilla portable mock server on this machine that serves any number of APIs together — no mockzilla account needed. Pass input as a single spec path / directory / public https URL, OR an array of them to combine multiple APIs into the same server (each becomes a service mounted at //...). Returns {url, port, pid, services} once listening. Pair with stop_locally(pid) to clean up. Prefer this over deploy_mock_from_* whenever the user says 'try locally', 'experiment', or 'play with' — those tools create persistent hosted bundles, this one is ephemeral. The bridge only runs ONE local server at a time on purpose: if the user wants more APIs, stop the current server and restart with all of them in input.
If the user names a well-known API (stripe, twilio, github, openai, slack, etc.) WITHOUT providing a URL, recall the public OpenAPI spec URL from your training knowledge and pass that. Do NOT pass a catalog ID or slug from list_catalog_products — that catalog is for the HOSTED deploy_mock_from_catalog flow, its ids are not URLs. Examples of public OpenAPI URLs:
• Stripe: https://raw.githubusercontent.com/stripe/openapi/master/openapi/spec3.json
• Twilio: https://raw.githubusercontent.com/twilio/twilio-oai/main/spec/json/twilio_api_v2010.json
• GitHub: https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.json
• Petstore: https://petstore3.swagger.io/api/v3/openapi.json
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | Spec file path(s), directory, or public OpenAPI URL(s). Pass an array to combine multiple APIs into one server. | |
| port | No | Port to bind on. Omit or pass 0 to let the OS pick a free port. |