Skip to content

MCPServer

This page is auto-generated by scripts/generate-schema-docs.ts. Do not edit manually.

  • Kind: MCPServer
  • API Group: kubemcp.io
  • Version: v1alpha1
  • apiVersion: kubemcp.io/v1alpha1
  • Reference Slug: /reference/mcpserver/
FieldTypeRequiredDescriptionDefault
specobjectYes
statusobjectNo
FieldTypeRequiredDescriptionDefault
replicasintegerNoNumber of MCP server replicas1
imagestringNoImage for the MCP server container”ghcr.io/atippey/mcp-echo-server:latest”
commandarray<string>NoOverride the container entrypoint
argsarray<string>NoArguments passed to the container entrypoint
envarray<unknown | unknown>NoAdditional environment variables for the container
redisobjectYes
ingressobjectNo
toolSelectorobjectYesLabel selector for MCPTool, MCPPrompt, and MCPResource objects
configobjectNo
FieldTypeRequiredDescriptionDefault
namestringYes
valuestringNo
valueFromobjectNo
FieldTypeRequiredDescriptionDefault
serviceNamestringYesName of the Redis service for state storage
FieldTypeRequiredDescriptionDefault
hoststringNoIngress hostname
tlsSecretNamestringNoTLS secret name for HTTPS
pathPrefixstringNoBase path prefix for all MCP endpoints”/mcp”

Label selector for MCPTool, MCPPrompt, and MCPResource objects

FieldTypeRequiredDescriptionDefault
matchLabelsmap<string, string>No
matchExpressionsarray<object>No
FieldTypeRequiredDescriptionDefault
keystringYes
operatorstring ("In", "NotIn", "Exists", "DoesNotExist")Yes
valuesarray<string>No
FieldTypeRequiredDescriptionDefault
requestTimeoutstringNoRequest timeout duration”30s”
maxConcurrentRequestsintegerNoMaximum concurrent requests per replica100
FieldTypeRequiredDescriptionDefault
readyReplicasintegerNoNumber of ready replicas
toolCountintegerNoNumber of registered tools
promptCountintegerNoNumber of registered prompts
resourceCountintegerNoNumber of registered resources
conditionsarray<object>No
FieldTypeRequiredDescriptionDefault
typestringYes
statusstring ("True", "False", "Unknown")Yes
lastTransitionTimestring [date-time]No
reasonstringNo
messagestringNo
# Example MCP resources for testing
# All resources use the label "mcp-server: echo" to be selected by the MCPServer
---
apiVersion: kubemcp.io/v1alpha1
kind: MCPServer
metadata:
name: echo
namespace: mcp-test
spec:
replicas: 1
redis:
serviceName: mcp-redis
toolSelector:
matchLabels:
mcp-server: echo

The operator sets three conditions on every MCPServer during reconciliation.

ConditionReason (True)Reason (False)Description
ToolsDiscoveredResourcesFoundNoResourcesFoundAt least one MCPTool, MCPPrompt, or MCPResource matched spec.toolSelector
ConfigReadyConfigMapCreatedThe generated ConfigMap containing tool/prompt/resource config was written successfully
ReadyDeploymentReadyDeploymentNotReadyThe MCPServer Deployment has at least one ready replica

See the Observability guide for diagnostic patterns using these conditions.

For each MCPServer the operator creates the following resources (all named mcp-server-{name}-* and owned by the MCPServer for automatic cleanup):

ResourceNameNotes
Deploymentmcp-server-{name}Runs spec.image on port 8080
Servicemcp-server-{name}ClusterIP on port 8080, named http
ConfigMapmcp-server-{name}-configMounted read-only at /etc/mcp/config with tools.json, prompts.json, resources.json
NetworkPolicymcp-server-{name}-egressAuto-generated egress to Redis, DNS, and discovered tool/resource services
Ingressmcp-server-{name}Only when spec.ingress is configured

The operator always injects two environment variables into the container before any user-provided spec.env entries:

VariableValue
REDIS_HOSTspec.redis.serviceName
MCP_CONFIG_DIR/etc/mcp/config

Note: spec.config.requestTimeout and spec.config.maxConcurrentRequests are accepted by the CRD schema but are not yet consumed by the operator. They are reserved for a future release.