STEP 01 / GENERATION
What generation produces
Each operation becomes a tool named after its
operationId, described by its summary. Arguments
are namespaced by where they travel, so a single flat object can never
silently collide with another binding:
{id} is passed as bare id, then percent-encoded into the path templatelimit query parameter arrives as query_limitbody object carrying the schema's own properties and required listA spec whose input semantics are ambiguous or unresolvable is rejected outright rather than approximated, because a half-understood bridge is exactly how an agent ends up calling something its operator never meant to expose.
STEP 02 / CONFIGURE
Configure an upstream
Upstreams are declared by the operator, never by request input. The registry is a JSON array capped at sixteen entries:
export MCP_UPSTREAM_SERVERS_JSON='[{"id":"orders","transport":"openapi","baseUrl":"https://orders.example.test","specUrl":"https://orders.example.test/openapi.json","allowedTools":["listOrders","get*"],"readOnlyTools":["listOrders"]}]'
Replace specUrl with an inline spec object to run
fully offline. Any non-empty registry automatically enables the external
effect gate.
STEP 03 / POLICY
The allowlist decides what an agent can see
Matching is exact, a leading prefix*, or the single
* wildcard. The default is not permissive:
get* admits getOrder and leaves createOrder fencedreadOnlyTools are marked side-effect free; everything else requires the external-effect pathSTEP 04 / BOUNDARIES
What gets refused, in the gateway's own words
These are the literal outcomes, not paraphrases:
MCP upstream 'x' requires an https url.MCP upstream registry exceeds the maximum of 16 servers.MCP_UPSTREAM_SERVERS_JSON is not valid JSON.OpenAPI operation has unsupported, ambiguous, or unresolvable input semantics.Outbound request blocked by the gateway network policy.OpenAPI bridge response exceeds the size limit.The destination check runs before any transport is consulted, so a generated tool cannot be aimed at an internal address even when the caller controls nothing but argument values.
STEP 05 / SURFACE
Where the tools appear
{"status":"disabled","upstreamCount":0} when no registry is configuredtoolCount, tools, and servers, scoped to the authenticated identity
Launch it the way the getting-started guide describes and add the
environment variable above:
Getting started covers the
--publish 127.0.0.1:3100:3100 run against the published
ghcr.io/happy520ai/unified-ai-system/ai-gateway-service:0.8.0
image.
EVIDENCE BOUNDARY
How this page was checked
The generated tool names, the argument namespacing, the deny-by-default
behaviour, the matching rules and each quoted error string were produced by
executing the shipped modules at the
v0.8.0 tag -
apps/ai-gateway-service/src/mcpGateway/openApiRestBridge.ts and
mcpGatewayConfig.ts - against a three-operation example spec
with an injected transport. No network call was made, and no provider
credential was used. The container run in the previous section is the
documented one; it was not executed on the machine that wrote this page.
This is a Public Preview of self-hosted software. Nothing here claims production readiness, L5 autonomy, or AGI, and real providers are disabled by default.
See docs/reverse-mcp-governance.md for the full upstream contract