- Notifications
You must be signed in to change notification settings - Fork969
Description
Describe the bug
The Docker image defined atdockerfile currently does not appear to support a persistent server or daemon mode. As a result, when deploying this image on Kubernetes, the pod remains in a "CrashLoopBackOff" state because the container process exits immediately.
Would it be possible to add a persistent server or daemon mode to the image, so that the main process continues running? This would enable successful deployment and operation within Kubernetes environments. Thank you for considering this.
Affected version
docker run -i --rm ghcr.io/github/github-mcp-server ./github-mcp-server --versionGitHub MCP ServerVersion: v0.4.0Commit: e9f748f246761fb0769e2a5611003939a6274872Build Date: 2025-05-23T13:06:55Z
Steps to reproduce the behavior
- Access to a Google Kubernetes Engine (GKE) cluster with kubectl configured.
- A valid GitHub Personal Access Token
- Create the Kubernetes Secret
kubectl create secret generic mcp-github-secret \ --from-literal=key=<YOUR_GITHUB_TOKEN>
- Create your deploy.yaml file (Example)
apiVersion: apps/v1kind: Deploymentmetadata: name: mcp-github-server labels: app: mcp-github-server annotations: description: "Deployment for MCP GitHub server"spec: replicas: 1 selector: matchLabels: app: mcp-github-server template: metadata: labels: app: mcp-github-server spec: securityContext: fsGroup: 2000 containers: - name: mcp-github-server image: ghcr.io/github/github-mcp-server:latest command: ["./github-mcp-server", "stdio"] env: - name: GITHUB_HOST value: https://github.com/github - name: GITHUB_PERSONAL_ACCESS_TOKEN valueFrom: secretKeyRef: name: mcp-github-secret key: key - name: GITHUB_TOOLSETS value: "repos,issues,pull_requests,code_security,experiments" ports: - containerPort: 3001
- Apply the Deployment YAML
kubectl apply -f deploy.yaml
- Check Pod Status
kubectl get pods
Expected vs actual behavior
Expected Behavior
The Docker image should run in a persistent server or daemon mode, keeping the main process active so that the container remains running.When deployed as a Kubernetes pod, the container should stay in a healthy, running state, supporting typical Kubernetes workloads and allowing for reliable orchestration and scaling.
Actual Behavior
The current Docker image does not include a persistent server or daemon mode; the main process exits immediately after starting.As a result, when deployed in Kubernetes (e.g., on GKE), the pod enters a "CrashLoopBackOff" state because Kubernetes expects the container to keep running, but it exits instead, causing repeated restarts.
Logs
- kubectl get pods
NAME READY STATUS RESTARTS AGEmcp-github-server 0/1 CrashLoopBackOff 31 (3m54s ago) 137m
- kubectl logs mcp-github-server
GitHub MCP Server running on stdio
- kubectl describe
-Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal Pulling 3m35s (x33 over 141m) kubelet Pulling image "ghcr.io/github/github-mcp-server:latest" Warning BackOff 97s (x644 over 141m) kubelet Back-off restarting failed container mcp-github-server in pod mcp-github-server-###)