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
| Field | Description | Default | Validation |
|---|---|---|---|
apiVersion string | mcp-gateway.ohcs.io/v1alpha1 | ||
kind string | MCPContainerServer | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata. | ||
spec MCPContainerServerSpec | spec defines the desired state of MCPContainerServer. | Required | |
status MCPContainerServerStatus | status defines the observed state of MCPContainerServer. |
MCPContainerServerSpec
| Field | Description | Default | Validation |
|---|---|---|---|
gatewayRef GatewayRef | gatewayRef references the MCPGateway that will route traffic to this server. | Required | |
path string | path is the URL path on the gateway domain for this MCP server. Defaults to “/<name>” if not specified. | ||
replicas integer | replicas is the number of pod replicas to run. | 1 | Minimum: 0 |
transport ContainerTransport | transport 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. | stdio | Enum: [stdio http] |
port integer | port is the container port for HTTP transport. Required when transport is “http”. | ||
container string | container is the name of the container to attach to for STDIO transport. Defaults to the first container if not specified. | ||
template PodTemplateSpec | template is the pod template specification for the MCP server containers. The template is used as-is without modification. | Required |
MCPContainerServerStatus
| Field | Description | Default | Validation |
|---|---|---|---|
phase string | phase represents the current phase of the MCPContainerServer. | ||
conditions Condition array | conditions represent the current state of the MCPContainerServer resource. | ||
endpoint string | endpoint is the full URL where this MCP server is accessible via the gateway (e.g., “https://mcp.example.com/github"). | ||
availableReplicas integer | availableReplicas is the number of available pod replicas. | ||
deploymentName string | deploymentName is the name of the Deployment created for this server. | ||
serviceName string | serviceName is the name of the Service created for this server. | ||
ready boolean | ready indicates whether the server is ready to receive traffic. | ||
gatewayName string | gatewayName 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.
| Field | Description | Default | Validation |
|---|---|---|---|
name string | name 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.
| Field | Description |
|---|---|
stdio | ContainerTransportStdio uses direct STDIO attachment via K8s API. |
http | ContainerTransportHTTP proxies to the container’s HTTP port. |