MCPContainerServer

MCPContainerServer is the Schema for the mcpcontainerservers API. It defines an MCP server that runs as a container. Supports both STDIO (gateway attaches directly) and HTTP (gateway proxies to Service) transports.

Spec

FieldDescriptionDefaultValidation
apiVersion stringmcp-gateway.ohcs.io/v1alpha1
kind stringMCPContainerServer
metadata ObjectMetaRefer to Kubernetes API documentation for fields of metadata.
spec MCPContainerServerSpecspec defines the desired state of MCPContainerServer.Required
status MCPContainerServerStatusstatus defines the observed state of MCPContainerServer.

MCPContainerServerSpec

FieldDescriptionDefaultValidation
gatewayRef GatewayRefgatewayRef references the MCPGateway that will route traffic to this server.Required
path stringpath is the URL path on the gateway domain for this MCP server. Defaults to “/<name>” if not specified.
replicas integerreplicas is the number of pod replicas to run.1Minimum: 0
transport ContainerTransporttransport specifies how the gateway communicates with the container. “stdio”: Gateway attaches to container STDIO directly (like kubectl attach). “http”: Gateway proxies to container’s HTTP port via Service.stdioEnum: [stdio http]
port integerport is the container port for HTTP transport. Required when transport is “http”.
container stringcontainer is the name of the container to attach to for STDIO transport. Defaults to the first container if not specified.
template PodTemplateSpectemplate is the pod template specification for the MCP server containers. The template is used as-is without modification.Required

MCPContainerServerStatus

FieldDescriptionDefaultValidation
phase stringphase represents the current phase of the MCPContainerServer.
conditions Condition arrayconditions represent the current state of the MCPContainerServer resource.
endpoint stringendpoint is the full URL where this MCP server is accessible via the gateway (e.g., “https://mcp.example.com/github").
availableReplicas integeravailableReplicas is the number of available pod replicas.
deploymentName stringdeploymentName is the name of the Deployment created for this server.
serviceName stringserviceName is the name of the Service created for this server.
ready booleanready indicates whether the server is ready to receive traffic.
gatewayName stringgatewayName is the name of the MCPGateway this server is attached to.

Supporting Types

GatewayRef

GatewayRef references an MCPGateway resource in the same namespace. Cross-namespace gateway references are not supported for security reasons.

FieldDescriptionDefaultValidation
name stringname is the name of the MCPGateway resource in the same namespace.MinLength: 1, Required

ContainerTransport

ContainerTransport defines the transport protocol for container-based MCP servers.

FieldDescription
stdioContainerTransportStdio uses direct STDIO attachment via K8s API.
httpContainerTransportHTTP proxies to the container’s HTTP port.