Kubernetes & Helm

mcp-anything is designed for Kubernetes. It ships with a Helm chart, MCPProxy and MCPUpstream CRDs, and an operator for declarative management.

Deployment — Helm

The quickest path to production is the included Helm chart:

helm install mcp-anything ./charts/mcp-anything \
  --namespace mcp \
  --create-namespace \
  -f examples/kraken/helm-values.yaml

Deployment — plain Kubernetes

Mount the config as a ConfigMap and mount specs/overlays as separate ConfigMaps so they can be updated independently:

apiVersion: v1
kind: ConfigMap
metadata:
  name: mcp-config
data:
  config.yaml: |
    upstreams:
      - name: kraken
        type: http
        tool_prefix: kraken
        base_url: https://api.kraken.com
        openapi:
          source: /etc/mcp-anything/specs/spec.yaml
        overlay:
          source: /etc/mcp-anything/overlays/overlay.yaml
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: mcp-anything
spec:
  replicas: 2
  template:
    spec:
      containers:
        - name: proxy
          image: ghcr.io/gaarutyunov/mcp-anything:latest
          ports:
            - containerPort: 8080
              name: mcp
            - containerPort: 9090
              name: metrics
          livenessProbe:
            httpGet:
              path: /healthz
              port: 8080
          readinessProbe:
            httpGet:
              path: /readyz
              port: 8080
          volumeMounts:
            - name: config
              mountPath: /etc/mcp-anything/config.yaml
              subPath: config.yaml
            - name: specs
              mountPath: /etc/mcp-anything/specs
            - name: overlays
              mountPath: /etc/mcp-anything/overlays
      volumes:
        - name: config
          configMap:
            name: mcp-config
        - name: specs
          configMap:
            name: mcp-specs
        - name: overlays
          configMap:
            name: mcp-overlays

Kubernetes Operator

The operator watches MCPProxy and MCPUpstream custom resources and manages proxy deployments declaratively.

apiVersion: mcp.gaarutyunov.github.io/v1alpha1
kind: MCPUpstream
metadata:
  name: kraken
spec:
  type: http
  toolPrefix: kraken
  baseUrl: https://api.kraken.com
  openapi:
    source: /etc/mcp-anything/specs/spec.yaml
  overlay:
    source: /etc/mcp-anything/overlays/overlay.yaml
apiVersion: mcp.gaarutyunov.github.io/v1alpha1
kind: MCPProxy
metadata:
  name: market-proxy
spec:
  upstreamSelector:
    matchLabels:
      app: market-data
  server:
    port: 8080
    transport:
      - streamable-http
      - sse
  resources:
    requests:
      cpu: 100m
      memory: 128Mi
    limits:
      cpu: 500m
      memory: 256Mi

Install the operator

helm install mcp-operator ./charts/mcp-anything \
  --set operator.enabled=true \
  --namespace mcp-system \
  --create-namespace

ConfigMap hot-reload

Kubernetes updates ConfigMaps by atomically replacing a symlink. The proxy's fsnotify watcher detects this and reloads config and specs without restarting. There is no need for a restart annotation or a rolling update just to push a config change.

RBAC

The Helm chart creates a minimal ServiceAccount and ClusterRole for the operator:

# Required operator permissions
rules:
  - apiGroups: [mcp.gaarutyunov.github.io]
    resources: [mcpproxies, mcpupstreams]
    verbs: [get, list, watch, create, update, patch, delete]
  - apiGroups: [apps]
    resources: [deployments]
    verbs: [get, list, watch, create, update, patch]

Health probes

PathUse as
GET /healthzlivenessProbe
GET /readyzreadinessProbe

See also