Create an MCP Server
Register an upstream MCP server under a gateway and choose how it authenticates upstream.
allowed_toolsdefaults to empty, and empty means no tools. A server created without it advertises nothing ontools/listand refuses everytools/call. The response says so inmeta.notewhen that happens. This is deliberate — a governed gateway does not open by default.server_type: "collection"is refused with422 unsupported_server_type. The forwarder does not serve that type, so the row would fail every call. Onlyupstreamis served.transportmust bestreamable_http. Anything else is422 unsupported_transport; the gateway does not speak the legacy SSE transport.upstream_urlgoes through the SSRF chokepoint at write time and again at connect time. A URL that resolves to a private or link-local address is refused, not dialled.
auth selects how the server reaches its upstream: {"mode": "secret"} (the
default) resolves one credential from your secret store per connection, and
{"mode": "passthrough"} makes each caller supply their own — see
how the server authenticates upstream.
A literal credential in auth.headers is refused at write time; reference a
Secret with {{secret_id:<uuid>}}.
MCP servers are a plan entitlement — creating one beyond your plan’s allowance is
refused.
Requires the create capability on ai_gateway. See the control-plane overview for authentication, the {data, meta} envelope, pagination and error types.Authorizations
OAuth 2.1 authentication — recommended for new integrations. Access tokens
(kc_ prefix) are minted at the root-host token endpoint
https://api.knoxcall.com/oauth/token and passed as Authorization: Bearer <access_token>.
Public clients must use PKCE with the authorization_code grant; confidential
clients may use client_credentials. The first-party SDKs and the
knoxcall login CLI handle token minting, caching, refresh, and DPoP for you.
Path Parameters
The parent AI gateway UUID.
Body
Lowercase letters, numbers and hyphens.
A public https:// MCP endpoint. Private, loopback, link-local and cloud-metadata destinations are refused.
collection is rejected with 422 unsupported_server_type — the forwarder does not serve it yet.
upstream Only streamable_http is accepted. The gateway's connect path always builds a Streamable HTTP transport, so accepting sse would store a silent protocol mismatch.
streamable_http Empty (the default) means the server advertises nothing.
Upstream auth for an MCP server. A secret reference is the only supported path: every header value must contain a {{secret_id:<uuid>}} (or legacy {{secret:<name>}}) placeholder. A literal is refused with 422 plaintext_auth — it would sit in cleartext in the control plane.
A PII policy THIS tenant owns (AIGW-151). A policy id you do not own is refused 422 — the FK is id-only, so the ownership check is the control.
https only; no embedded credentials; SSRF-checked at write time.
off, request, response, both 100 <= x <= 10000fail_open, fail_closed