OpenAPI to MCP
The openapi-to-mcp plugin turns an API described by an OpenAPI document into an MCP (Model Context Protocol) server without requiring changes to the API. It derives tools from the API operations, handles tool discovery and invocation over Streamable HTTP or Server-Sent Events (SSE), and translates tool calls into upstream HTTP requests.
The plugin is available in APISIX and API7 Gateway, but the products process MCP traffic differently. APISIX runs the MCP implementation inside the gateway. API7 Gateway forwards MCP traffic to a separate OpenAPI-to-MCP service deployed alongside the gateway.
MCP Request Flow
- APISIX
- API7 Gateway
APISIX fetches the OpenAPI document, generates tools, and sends tool calls to the described API inside the gateway process.
API7 Gateway validates the plugin configuration and forwards MCP traffic to the OpenAPI-to-MCP service. The service fetches the document, generates tools, and calls the described API.