Skip to main content

Kubernetes Ephemeral Job

io.github.inhuman/mcp-k8s-ephemeral-job

v0.7.1Updated Jul 20, 2026stdio · Docker

Runs a command in a throwaway Kubernetes pod and returns exit code, output and artifacts.

Install

Replace 1 placeholder with your own values.

Run in your terminal. Replace 1 placeholder.

claude mcp add mcp-k8s-ephemeral-job -e 'MCP_K8S_ALLOWED_IMAGES=<your-mcp-k8s-allowed-images>' -e MCP_K8S_KUBECONFIG=/kube/config -e MCP_K8S_NAMESPACE=mcp-ephemeral -e MCP_K8S_TRANSPORT=stdio -e MCP_K8S_DEFAULT_TIMEOUT_S=60 -e MCP_K8S_MAX_TIMEOUT_S=600 -e MCP_K8S_MAX_OUTPUT_BYTES=1048576 -e MCP_K8S_MAX_ARTIFACT_BYTES=10485760 -e MCP_K8S_MAX_CONCURRENT=10 -e MCP_K8S_DEFAULT_CPU=1 -e MCP_K8S_DEFAULT_MEMORY=512Mi -e MCP_K8S_SIDECAR_IMAGE=busybox:1.36 -- docker run -i --rm -e MCP_K8S_ALLOWED_IMAGES -e MCP_K8S_KUBECONFIG -e MCP_K8S_NAMESPACE -e MCP_K8S_TRANSPORT -e MCP_K8S_DEFAULT_TIMEOUT_S -e MCP_K8S_MAX_TIMEOUT_S -e MCP_K8S_MAX_OUTPUT_BYTES -e MCP_K8S_MAX_ARTIFACT_BYTES -e MCP_K8S_MAX_CONCURRENT -e MCP_K8S_DEFAULT_CPU -e MCP_K8S_DEFAULT_MEMORY -e MCP_K8S_SIDECAR_IMAGE docker.io/idconstruct/mcp-k8s-ephemeral-job:v0.7.1

The registry lists extra launch arguments or environment variables for this server that could change what runs. They are left out here; check its repository before adding any.

Configuration

23 settings.

  • MCP_K8S_ALLOWED_IMAGES
    Env var· required
    Strict image allowlist (CSV). Empty means every call is rejected, so this must be set.
  • MCP_K8S_CLONE_SECRET
    Env var· optional· secret
    Secret with git tokens, mounted only on the cloner. Empty disables the clone field.
  • MCP_K8S_AUTH_TOKEN
    Env var· optional· secret
    Optional X-MCP-AUTH token required on every request (http/sse transports only).
  • MCP_K8S_KUBECONFIG
    Env var· optional
    Path to the kubeconfig inside the container. Empty = use in-cluster credentials.Default: /kube/config
  • MCP_K8S_NAMESPACE
    Env var· optional
    Namespace the ephemeral pods are created in. Needs a Role/RoleBinding for jobs and pods.Default: mcp-ephemeral
  • MCP_K8S_TRANSPORT
    Env var· optional
    MCP transport: stdio | http | sse. Must be 'stdio' for direct docker/stdio use.Default: stdio
Show 17 more
  • MCP_K8S_DEFAULT_TIMEOUT_S
    Env var· optional
    Default wall-clock timeout per job, seconds.Default: 60
  • MCP_K8S_MAX_TIMEOUT_S
    Env var· optional
    Maximum wall-clock timeout a caller may request, seconds.Default: 600
  • MCP_K8S_MAX_OUTPUT_BYTES
    Env var· optional
    Cap on combined stdout/stderr before truncation.Default: 1048576
  • MCP_K8S_MAX_ARTIFACT_BYTES
    Env var· optional
    Cap on the total size of returned artifacts.Default: 10485760
  • MCP_K8S_MAX_CONCURRENT
    Env var· optional
    Maximum ephemeral pods running at the same time.Default: 10
  • MCP_K8S_DEFAULT_CPU
    Env var· optional
    Pod CPU request; limits come from the caller or the namespace LimitRange.Default: 1
  • MCP_K8S_DEFAULT_MEMORY
    Env var· optional
    Pod memory request; limits come from the caller or the namespace LimitRange.Default: 512Mi
  • MCP_K8S_SIDECAR_IMAGE
    Env var· optional
    Helper image used to inject input files and collect artifacts.Default: busybox:1.36
  • MCP_K8S_CLONE_IMAGE
    Env var· optional
    Image carrying git for the clone init container. Empty disables the clone field.
  • MCP_K8S_CACHE_PVC
    Env var· optional
    Existing PVC mounted into every job pod as a shared cache. Empty = no cache.
  • MCP_K8S_CACHE_MOUNT_PATH
    Env var· optional
    Where the cache PVC is mounted, e.g. /go/pkg/mod. Empty = no cache.
  • MCP_K8S_JOB_EXTRA_ENV
    Env var· optional
    JSON object of env vars added to every job pod; caller keys win on collision.
  • --volume
    Argument· optional
    Mount the kubeconfig directory read-only so the server can reach the cluster.
  • --read-only
    Argument· optional
    Read-only root filesystem — the server writes nothing locally.
  • --cap-drop
    Argument· optional
    Drop all Linux capabilities.
  • --security-opt
    Argument· optional
    Block privilege escalation.
  • --memory
    Argument· optional
    Memory limit for the server process itself.

Listed in the official MCP Registry since Jul 20, 2026. Mirrored daily; last checked Nov 26, 2026.