Static Configurations
By default, the plugin proxies MCP traffic to the OpenAPI-to-MCP service at 127.0.0.1:3000.
The file to update depends on how the gateway is deployed:
- Host or Docker
- Kubernetes (Helm)
For host or Docker deployments, configure the following settings:
plugin_attr:
openapi-to-mcp:
port: 4000
Then reload the gateway for static configuration changes to take effect.
For Helm deployments, set the following values in the API7 Gateway Helm chart. Keep the plugin attribute port and the chart-managed sidecar port the same.
openapiToMcp:
enabled: true
port: 4000
pluginAttrs:
openapi-to-mcp:
port: 4000
Then apply the values file to the existing gateway release:
helm upgrade <gateway-release-name> api7/gateway -n <namespace> -f values.yaml
When changing this value outside Helm, you must also update the OpenAPI-to-MCP service to listen on the same port, otherwise the plugin will fail with a 503.
Parameters
See plugin common configurations for configuration options available to all plugins.
transport
string
default:
ssevaild vaule:
sseorstreamable_httpTransport method for client-server communication. The
streamable_httpmethod is recommended for production deployments, as it supports stateless communication suitable for multiple gateway instances. Thessemethod is stateful and may exhibit unexpected behavior when multiple gateways are deployed.The
streamable_httptransport is available from API7 Enterprise version 3.8.15.openapi_url
string
required
URL of the OpenAPI specification document that defines the API structure to be exposed through MCP.
Note that the plugin supports only OpenAPI Specification (OAS) version 3. OpenAPI v2 (Swagger) is not supported.
Additionally, the plugin has a known parsing issue when handling
oneOfschemas in OpenAPI v3 document retrieved fromopenapi_url. In this case, the MCP client will be stuck at tool loading.base_url
string
required
Base URL of the API service where requests will be forwarded. Support built-in variables in values (available from API7 Enterprise version 3.8.19), for example,
https://${http_baseurl}.swagger.io.allowed_hosts
array[string]
vaild vaule:
Exact host names or wildcard host names such as
api.example.comand*.example.comOptional allow-list of hosts that the resolved
base_urlmay target. When set, requests whose resolved host is not in the list are rejected with HTTP 400. Available in API7 Enterprise from version 3.9.13. Not available in APISIX yet.headers
object
Headers to include in requests to the upstream service. Support built-in variables in values, for example,
$arg_username-$http_apikey.flatten_parameters
boolean
default:
falseWhether to flatten parameters in the tool schema. Flattening of query and path parameters is available from API7 Enterprise version 3.8.21. Support for header parameters defined in the OpenAPI spec (
in: header) is available from version 3.9.8. Not available in APISIX yet.If set to
false, query parameters are nested underqueryParametersand path parameters are nested underpathParameters. From API7 Enterprise version 3.9.8, header parameters are nested underheaderParameters. If set totrue, query and path parameters are placed directly underproperties, and header parameters are also placed directly underpropertiesfrom version 3.9.8.Setting the parameter to
truesimplifies AI model interaction by reducing schema complexity. Keep the parameter atfalsewhen query, path, and header parameters share the same names, to avoid conflicts.