Getting startedGuidesReferenceChangelog
Apoxy:// Docs / Reference / MCPRoute

MCPRoute

API reference for MCP Routes (clrk.apoxy.dev/v1alpha1)

API Group: clrk.apoxy.dev/v1alpha1

Operations

List MCPRoute

GET/apis/clrk.apoxy.dev/v1alpha1/mcproutes

List MCPRoute

Response

  • 200: OK

List MCPRoute

GET/apis/clrk.apoxy.dev/v1alpha1/namespaces/{namespace}/mcproutes

List MCPRoute

Response

  • 200: OK

Create MCPRoute

POST/apis/clrk.apoxy.dev/v1alpha1/namespaces/{namespace}/mcproutes

Create a MCPRoute

Request Body

Spec fields (MCPRouteSpec):

FieldTypeDescription
hostnamesstring[]Hostnames scopes to MCP server endpoints by Host header.
parentRefsParentReference[]ParentRefs attaches this route to EgressGateway listeners. (required)
rulesMCPRouteRule[](required)

Response

  • 200: OK
  • 201: Created
  • 202: Accepted

Delete All MCPRoute

DELETE/apis/clrk.apoxy.dev/v1alpha1/namespaces/{namespace}/mcproutes

Delete collection of MCPRoute

Response

  • 200: OK

Get MCPRoute

GET/apis/clrk.apoxy.dev/v1alpha1/namespaces/{namespace}/mcproutes/{name}

Get the specified MCPRoute

Response

  • 200: OK

Replace MCPRoute

PUT/apis/clrk.apoxy.dev/v1alpha1/namespaces/{namespace}/mcproutes/{name}

Replace the specified MCPRoute

Request Body

Spec fields (MCPRouteSpec):

FieldTypeDescription
hostnamesstring[]Hostnames scopes to MCP server endpoints by Host header.
parentRefsParentReference[]ParentRefs attaches this route to EgressGateway listeners. (required)
rulesMCPRouteRule[](required)

Response

  • 200: OK
  • 201: Created

Update MCPRoute

PATCH/apis/clrk.apoxy.dev/v1alpha1/namespaces/{namespace}/mcproutes/{name}

Partially update the specified MCPRoute

Response

  • 200: OK
  • 201: Created

Delete MCPRoute

DELETE/apis/clrk.apoxy.dev/v1alpha1/namespaces/{namespace}/mcproutes/{name}

Delete a MCPRoute

Response

  • 200: OK
  • 202: Accepted

Schema Reference

MCPRouteRule

FieldTypeDescription
backendRefsBackendRef[]BackendRefs optionally routes through an explicit proxy. Empty = passthrough to original destination.
filtersMCPRouteFilter[]Filters apply policy to matched MCP traffic.
matchesMCPRouteMatch[]

MCPRouteFilter

FieldTypeDescription
extensionRefLocalObjectReferenceExtensionRef for cross-cutting policies.
toolPolicyToolPolicyFilterToolPolicy — inline, MCP-specific.
typestringType selects the filter. (required)

ToolPolicyFilter

FieldTypeDescription
allowedToolsstring[]AllowedTools is an explicit allowlist. Supports glob. If set, only matching tools may be invoked.
allowedToolsRegexstring[]AllowedToolsRegex is an explicit allowlist of Go regexp patterns. Evaluated as a union with AllowedTools: when either list is non-empty, the tool must match at least one entry across both.
deniedToolsstring[]DeniedTools blocks specific tools. Evaluated after AllowedTools.
deniedToolsRegexstring[]DeniedToolsRegex blocks tools by Go regexp pattern. Evaluated as a union with DeniedTools; a match in either list denies the call.
maxCallsPerExecutioninteger (int32)MaxCallsPerExecution caps total tool invocations per agent run.
rateLimitsToolRateLimit[]RateLimits enforces per-tool rate limits using the same windowing vocabulary as RateLimitPolicy. Each entry is scoped independently.
requireConfirmationstring[]RequireConfirmation lists tools that need out-of-band human confirmation before execution proceeds.

ToolRateLimit

FieldTypeDescription
requestsinteger (int32)Requests is the maximum number of invocations permitted within Window before further calls are rejected. (required)
scopestringScope chooses the counter dimension. Defaults to PerAgent.
toolsstring[]Tools selects which tools this limit applies to. Supports glob. Empty means all tools matched by the enclosing rule.
toolsRegexstring[]ToolsRegex restricts the limit to tools matching any Go regexp pattern here. Evaluated as a union with Tools; empty Tools and empty ToolsRegex means "any tool matched by the enclosing rule".
windowstringWindow is a Go duration string (e.g. "1m", "1h", "24h") over which Requests are counted. (required)

MCPRouteMatch

FieldTypeDescription
methodsstring[]Methods matches MCP JSON-RPC methods.
resourcesstring[]Resources matches by MCP resource URI pattern.
serversstring[]Servers matches by MCP server identity (URL pattern).
toolsstring[]Tools matches by tool name. Supports glob: "github_*".
toolsRegexstring[]ToolsRegex matches by tool name via Go regexp. Evaluated as a union with Tools; a match on either selects the rule.