Documentation Index
Fetch the complete documentation index at: https://docs.enkryptai.com/llms.txt
Use this file to discover all available pages before exploring further.
MCP Gateways API Documentation
Welcome to the MCP Gateways API documentation. This guide describes how to compose one or more registered MCP servers into a single gateway with input/output guardrail overrides.Purpose
The MCP Gateways API lets you build runtime-ready MCP configurations by referencing registry servers (managed via the MCP Registry Servers API) and applying gateway-specific overrides such as input and output guardrails. The expanded gateway configuration is what the secure-mcp-gateway runtime ultimately consumes. A gateway references one or more registry servers bysaved_name + server_version. When the gateway is expanded, overrides from the gateway take precedence over the base server configuration.
Override Surface
The gateway may override the following fields: Per-server (and also settable gateway-wide incommon_overrides) — override the matching field on the underlying registry server’s mcp_config:
input_guardrails_configoutput_guardrails_config
common_overrides) — applied once across the gateway, no per-server equivalent:
server_tools_guardrails_config— the guardrails policy the MCP Gateway uses when checking server info and tool listings for guardrails violations. Theinputsection of the configured guardrail is what is evaluated, withX-Enkrypt-Mode: prompt.
servers_config.common_overrides— gateway-wide. Whatever you put here is applied to every server in this gateway, so you don’t have to repeat the same guardrail config on every entry.server_tools_guardrails_configmay only be set here.servers_config.servers[i].*— per-server. Set on an individual entry, this overrides the base value for that one server only. Onlyinput_guardrails_configandoutput_guardrails_configare accepted here.
common_overrides always wins on conflict: for any input/output guardrails key that common_overrides sets, the per-server value for the same key is dropped. The semantic of “common” is “the same value for every server” — letting a per-server entry diverge would contradict it. Per-server overrides remain useful for keys that common_overrides does not set.
Everything else (command, args, OAuth, denied tools, source metadata) is inherited unchanged from the registry server. Use get-gateway-config to see the expanded view that the runtime will consume.
How the expanded response is shaped
When you call get-gateway-config, the response is deduplicated:common_overridesis echoed once at the top level of the response.- Each
expanded_servers[i].mcp_configis the registry server’s basemcp_configplus that entry’s per-server overrides, with any key thatcommon_overridessets removed — those keys live only at the top-levelcommon_overrides. This applies even if the per-server entry also set the same input/output key; common wins.server_tools_guardrails_configis gateway-wide only and never appears under an individual server’smcp_config. - Keys that
common_overridesdoes not set continue to flow through per-server overrides onto each server’smcp_config. - The raw stored per-server override block is echoed at
expanded_servers[i].gateway_overridesfor visibility, even where common ends up winning on a specific key.
Example
my-filesystem-serverinheritsinput_guardrails_configfromcommon_overrides. Itsexpanded_servers[i].mcp_configwill not contain that key — it’s only on the top-levelcommon_overrides.my-github-servertries to set its owninput_guardrails_config, butcommon_overrides.input_guardrails_configis also set, so the per-server value is dropped at expansion time — common wins. The effectiveinput_guardrails_configfor both servers is the org-wide one. The per-server attempt is still echoed inexpanded_servers[i].gateway_overridesfor visibility, so you can see what was stored versus what is effective.server_tools_guardrails_configlives once at the top-levelcommon_overrides; the MCP Gateway reads theinputsection of that guardrail (withX-Enkrypt-Mode: prompt) when it checks server info and tool listings for violations.
Offered APIs
Our API suite includes the following endpoints:- add-gateway: Create a new gateway that references one or more registry servers, with optional per-server overrides.
- get-gateway: Retrieve a gateway’s stored configuration (server references and overrides only — not the expanded view).
- get-gateway-config: Retrieve the expanded gateway configuration with server references resolved and overrides applied. This is what runtime consumers should fetch.
-
modify-gateway: Partially update an existing gateway. The
servers_configbody is deep-merged onto the persisted config — fields you don’t send are left untouched. Theserversarray is keyed by(saved_name, server_version), so a patch entry upserts (deep-merges with existing or appends as new). Send_delete: trueon a server entry to remove it. Usenullat any level to delete that key (RFC 7396 / JSON Merge Patch). Inside a guardrails policy,additional_configdeep-merges; arrays (block) and primitives replace wholesale. See the modify-gateway endpoint reference for examples. - delete-gateway: Soft delete a gateway.
-
list-gateways: List all gateways in the project with pagination and an optional
is_activefilter.
Required Headers
apikey(orapi_key): API key for authentication. Required on every call.X-Enkrypt-MCP-Gateway: Required forget-gateway,get-gateway-config,modify-gateway, anddelete-gateway. Set to the gateway’sgateway_saved_name.X-Enkrypt-MCP-Gateway-Version: Optional. Defaults tov1.
Obtaining an API Key
To get started with the MCP Gateways API, you need to obtain an API key. Follow these steps:- Login: Access your account at app.enkryptai.com.
- Get API Key: Navigate to the API section to get your unique API key.
- Authentication: Use this API key in the
apikeyheader of your API calls.

