Ana içeriğe geç

Create MCP API Proxy

Endpoint​

POST /apiops/projects/{projectName}/apiProxies/mcp/{apiProxyName}/

Creates an API proxy of type MCP. See MCP Gateway for the concepts — Expose Tools vs Passthrough, protocol versions, and the inline-server model.

Authentication​

Requires a Personal API Access Token.

Authorization: Bearer YOUR_TOKEN

Permission: API_MANAGEMENT × MANAGE, or AI_DEVELOPMENT × MANAGE.

Request​

Headers​

HeaderValueRequired
AuthorizationBearer {token}Yes
Content-Typeapplication/jsonYes

Path Parameters​

ParameterTypeRequiredDescription
projectNamestringYesProject name
apiProxyNamestringYesMCP API proxy name. Overrides any name carried in the body.

Request Body​

FieldTypeRequiredDescription
relativePathstringYesClient-facing path the gateway listens on (for example /mcp/support)
descriptionstringNoFree-text description
routingModestringYesTOOL_EXPOSE or PASSTHROUGH. Unlike the AI proxy create endpoint, there is no implicit default — the same fail-closed contract Update MCP Routing uses
protocolVersionstringNoMCP protocol version (2024-11-05, 2025-06-18, 2026-07-28); a blank value uses 2026-07-28
backendServersarrayPASSTHROUGH onlyInline backend MCP servers. PASSTHROUGH requires at least one entry. Each entry has the same shape as in Update MCP Routing (name, endpoint, transport, authScheme and the matching credential fields)

Full JSON Body Example (TOOL_EXPOSE)​

{
"relativePath": "/mcp/support",
"description": "Exposes the support API as MCP tools",
"routingMode": "TOOL_EXPOSE"
}

exposedTools isn't part of this create call — add tool definitions afterward with Update MCP Routing, the same "create first, route afterward" pattern Create AI API Proxy uses for aiRouting.

Full JSON Body Example (PASSTHROUGH)​

{
"relativePath": "/mcp/github",
"routingMode": "PASSTHROUGH",
"backendServers": [
{
"name": "github-mcp",
"endpoint": "https://mcp.github.example.com/mcp",
"transport": "HTTP_SSE",
"authScheme": "BEARER",
"bearerToken": "raw-token-in-transit-only"
}
]
}

Secret fields in backendServers entries (bearerToken, clientSecret, apiKey, basicPassword) are encrypted before they are stored.

Response​

Success Response (200 OK)​

{
"status": "SUCCESS",
"deploymentResult": {
"success": false,
"detailList": []
}
}

Creation does not deploy the proxy. Deploy it separately with POST /apiops/projects/{projectName}/apiProxies/{apiProxyName}/environments/{environmentName}/.

Error Responses​

HTTP CodeCondition
400apiProxyName is empty, request body is missing, relativePath is empty, routingMode is missing, an API proxy with the same name already exists in the project, or routingMode is PASSTHROUGH without a valid backendServers entry
401Token is missing or invalid
500Unexpected server error
{
"status": "FAILURE",
"resultMessage": "routingMode value can not be empty! Must be TOOL_EXPOSE or PASSTHROUGH."
}

Notes and Warnings​

  • routingMode is required, with no default. This mirrors the routing-update endpoint's fail-closed contract — there's no implicit mode to fall back to.
  • Servers are configured inline, not by reference. A PASSTHROUGH target is given in backendServers in this call, or later through Update MCP Routing. Tool definitions for TOOL_EXPOSE (exposedTools) are added with Update MCP Routing as well.
  • Proxy-level settings apply the same as any other proxy type — CORS, cache, error templates, client route, trace and traffic-log settings.
  • Policies (including MCP Call (LLM) / MCP Call (Fixed) on other proxies) are attached the same way as for any other proxy, through POST /apiops/projects/{projectName}/apiProxies/{apiProxyName}/policies/{policyName}/.