What you will have at the end
A Route, orders-mcp, that an MCP client connects to and finds four tools, one per operation of the orders API’s OpenAPI document, without a line of code written for them. The client authenticates with a key-auth credential like any other caller, each tool call is a request record with the Consumer’s name and the key masked, and the Route’s rate limit counts the calls. This is the form-first counterpart of OpenAPI to MCP, which explains what an agent does with the tools; Securing MCP tools covers the limits and the roles.
Prerequisites
- An API with an OpenAPI document the gateway can fetch. The lab’s orders service serves its own at
/openapi-v2.json, with four operations: list, read, create and cancel an order. - A Route for the MCP endpoint.
orders-mcpserves/mcp/orderswithkey-authandlimit-count; the Consumerorders_assistantholds the key. - Traffic logging turned on under Traffic Explorer › Settings, and a role that may manage Routes. The screenshots below were taken as
nora.becker.
Five fields
Open the Route, Plugins, Add plugin, openapi-to-mcp. Under Basics, OpenAPI document URL is where the document is read from, and Service base URL is where the described operations are called. Under Behavior, Transport is how the client and the endpoint exchange messages, sse by default or streamable_http, the one current clients use; Headers are sent with every call to the service, for an API that wants a key of its own; Flatten parameters puts query and path parameters at the top of each tool’s input instead of nesting them by kind, which is how agents expect them.

Select Add plugin. The Plugins tab draws the request path: key-auth first, then limit-count, then the Plugin, and no Upstream, because the Plugin answers the MCP protocol itself and calls the service on the agent’s behalf.

What an MCP client sees
With the streamable HTTP transport the client sends JSON-RPC over POST. Without the key, nothing:
### initialize without a key
HTTP 401
With the key, the three calls every client makes:
### initialize
{"id":1,"result":{"capabilities":{"tools":{}},"protocolVersion":"2025-03-26","serverInfo":{"name":"openapi2mcp","version":"0.0.1"}},"jsonrpc":"2.0"}
### tools/list
- listOrders · Lists orders, newest first. Filter by status. · input: status
- createOrder · Creates an order for a customer with one or more lines. · input: requestBody
- getOrder · Reads one order by its id. · input: orderId
- cancelOrder · Cancels an open order. Shipped orders cannot be cancelled. · input: orderId
### tools/call getOrder {"orderId":"ord-10421"}
{"id":3,"jsonrpc":"2.0","result":{"content":[{"type":"text","text":"{ \"data\": { \"status\": \"open\", \"customer\": \"cust-8831\", \"currency\": \"EUR\", \"total\": 249.9, \"id\": \"ord-10421\" … }, \"status\": 200 … }"}]}}
The tool names are the document’s operation ids, the descriptions the operations’ description fields, not their shorter summaries, the inputs its parameters, flattened: orderId sits at the top of getOrder’s input, and the one operation with a body, createOrder, takes it under requestBody. A tool call’s result is the service’s answer, status and body, as text for the agent to read.
What Traffic Explorer shows
Each JSON-RPC call is a request record on the Route, with the Consumer’s name beside it, because key-auth identified the caller; the one without a key is a 401. The Upstream node reads gateway for all of them: the Plugin answered the protocol, and its own call to the service is not a request on this Route.

The record of the tool call holds the JSON-RPC body, the tool and its arguments, and the headers with the key masked before it was stored:

mcp-bridge, for an MCP server you already have
For a server that speaks MCP over standard input and output, a filesystem server or one your team wrote, the Plugin mcp-bridge runs it on the gateway host and serves it on the Route. Command is the program started for each session, npx for example; Arguments is a JSON list, each item one argument; Base URI is the path prefix the Plugin answers, serving /sse and /message under it and 404 elsewhere on the Route. The note under Command is the operational fact to weigh first: every session starts its own process on the gateway host, and the process keeps running after the client leaves.

What the audit log keeps
Every change to the Route is a record with the Plugin blocks in the diff: the document URL, the service URL, the transport, the limit. No value in this article’s openapi-to-mcp block is a secret; whether a Headers entry carrying a key for the service is masked was not checked here.

What to do next
- Limit what an agent may call and who may call it: Securing MCP tools.
- Put a token budget and prompt rules on the agent’s model Route: Token budgets per Consumer and Prompt rules at the gateway.
- MCP is on AI Gateway; the gateway Plugins that apply to every tool call,
key-authandlimit-countamong them, are in the capabilities reference.