* Agentgateway vNext * Use 1.88 * Fix telemetry * Cleanup * fixes * fix transform trailers * Fix test, and openapi * cleanup protos * Fix timeouts and examples * Fix websockets
OpenAPI Example
This example shows how to use the agentgateway to proxy a OpenAPI as a MCP service.
OpenAPI is the current backbone of the internet, and it's a great way to describe your API. However, it's not geared towards agentic use-cases. Using agentgateway, you can seamlessly integrate OpenAPI APIs into your agentic workflows in a secure and scalable way.
This example will show you how to proxy the Swagger Petstore as the example MCP service.
Running the example
cargo run -- -f examples/openapi/config.yaml
In addition to the basic setup, we have added a new target of type openapi:
name: openapi
openapi:
schema:
file: ./examples/openapi/openapi.json
host: localhost
port: 8080
This will expose each method in the openapi specification as MCP tools, and proxy them to the petstore application (on localhost:8080).
Now that we have the gateway running, we can use the mcpinspector to try it out.
npx @modelcontextprotocol/inspector
Once the inspector is running, it will present the port that it's running on, and then you can navigate to it in your browser.
Once you're connected, you can navigate to the tools tab and see the available tools.
Let's try out one of the tools, like placeOrder.


