Skip to content

MCPServer stays Unhealthy with uvx/npx unless image is explicitly set #76

@rinormaloku

Description

@rinormaloku

Summary
Creating an MCPServer that uses npx (and likely uvx) results in the Deployment being created but the MCPServer never becomes Healthy unless spec.deployment.image is explicitly provided. This suggests no default runtime image is selected for uvx/npx commands.

Repro

  • Apply:
  apiVersion: kagent.dev/v1alpha1
  kind: MCPServer
  metadata:
    name: everything
    namespace: test
  spec:
    deployment:
      cmd: npx
      args: [modelcontextprotocol/server-everything]
      # image omitted on purpose
      port: 3000
    stdioTransport:
      transportType: stdio
  • Verify status:
  kubectl get mcps -n test
  NAME         HEALTH     AGE
  everything   Unhealthy  2m31s
  kubectl get deploy,pods -n test -l app=everything
  NAME                      READY   UP-TO-DATE   AVAILABLE   AGE
  deployment/everything     1/1     1            1           2m31s
  NAME                           READY   STATUS    RESTARTS   AGE
  pod/everything-xxxxx-xxxxx     1/1     Running   0          2m31s
  • Observe: Deployment/Pod exist; MCPServer status stays Unhealthy.

Workaround

  • Set spec.deployment.image: node:24-alpine3.21.

After reconcile:

  kubectl get mcps -n test
  NAME         HEALTH    AGE
  everything   Healthy   3m10s

Expected

  • Auto-select a suitable default image for uvx/npx or fail fast with a clear validation error.

Actual

  • No default image; resource remains Unhealthy without a clear hint.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions