feat(toolhive): re-enable the GitHub MCP over streamable-http - #4212
Conversation
The server was disabled because ToolHive's virtual-MCP health monitoring repeatedly sends `initialize` to stdio backends, which github-mcp-server answers with `duplicate "initialize" received`, degrading the resources and unified gateways (upstream #5890). The server has supported streamable-http since PR #1849, so the fix is a transport change rather than a different vendor: `args: [http]` instead of `[stdio]`, on v1.7.0. Read-only enforcement in http mode was broken when it first shipped and was fixed in #2208, which is in every release from v1.0.0. http mode does not take a server-side token - unlike the stdio path, its ServerConfig has no Token field and it authenticates per request. So the PAT moves from a `secrets:` env mount to an MCPExternalAuthConfig of type bearerToken, which makes the proxy attach it as an Authorization header. This is the first MCPExternalAuthConfig in the cluster. Scoped to four toolsets, since the full server exposes ~79 tools and every one of them lands in the unified gateway's semantic tool index. Verified: the v1.7.0 image manifest exists on ghcr.io, all four objects pass `kubectl apply --dry-run=server`, and the referenced secret key is present. Not yet verified at runtime - the pods have not been started.
|
Warning Review limit reached
Next review available in: 28 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
@@ (root level) @@
# toolhive.stacklok.dev/v1beta1/MCPToolConfig/ai/github
! - one document removed:
- apiVersion: toolhive.stacklok.dev/v1beta1
- kind: MCPToolConfig
- metadata:
- name: github
- namespace: ai
- labels:
- app.kubernetes.io/name: toolhive
- kustomize.toolkit.fluxcd.io/name: toolhive
- kustomize.toolkit.fluxcd.io/namespace: ai
- spec:
- toolsFilter: []
@@ (root level) @@
# toolhive.stacklok.dev/v1beta1/MCPExternalAuthConfig/ai/github
! + one document added:
+ apiVersion: toolhive.stacklok.dev/v1beta1
+ kind: MCPExternalAuthConfig
+ metadata:
+ name: github
+ namespace: ai
+ labels:
+ app.kubernetes.io/name: toolhive
+ kustomize.toolkit.fluxcd.io/name: toolhive
+ kustomize.toolkit.fluxcd.io/namespace: ai
+ spec:
+ type: bearerToken
+ bearerToken:
+ tokenSecretRef:
+ name: toolhive-secrets
+ key: GITHUB_PERSONAL_ACCESS_TOKEN
@@ (root level) @@
# toolhive.stacklok.dev/v1beta1/MCPServer/ai/github
! + one document added:
+ apiVersion: toolhive.stacklok.dev/v1beta1
+ kind: MCPServer
+ metadata:
+ name: github
+ namespace: ai
+ labels:
+ app.kubernetes.io/name: toolhive
+ kustomize.toolkit.fluxcd.io/name: toolhive
+ kustomize.toolkit.fluxcd.io/namespace: ai
+ spec:
+ resources:
+ limits:
+ cpu: 200m
+ memory: 200Mi
+ requests:
+ cpu: 10m
+ memory: 64Mi
+ image: "ghcr.io/github/github-mcp-server:v1.7.0"
+ mcpPort: 8082
+ proxyPort: 8080
+ transport: streamable-http
+ args:
+ - http
+ - "--read-only"
+ - "--toolsets"
+ - "context,repos,issues,pull_requests"
+ externalAuthConfigRef:
+ name: github
+ groupRef:
+ name: resources
+ permissionProfile:
+ name: network
+ type: builtin
+ podTemplateSpec:
+ spec:
+ containers:
+ - name: mcp
+ resources:
+ limits:
+ cpu: 500m
+ memory: 256Mi
+ requests:
+ cpu: 10m
+ memory: 64Mi
@@ (root level) @@
# toolhive.stacklok.dev/v1beta1/MCPServer/ai/github-opt
! + one document added:
+ apiVersion: toolhive.stacklok.dev/v1beta1
+ kind: MCPServer
+ metadata:
+ name: github-opt
+ namespace: ai
+ labels:
+ app.kubernetes.io/name: toolhive
+ kustomize.toolkit.fluxcd.io/name: toolhive
+ kustomize.toolkit.fluxcd.io/namespace: ai
+ spec:
+ resources:
+ limits:
+ cpu: 200m
+ memory: 200Mi
+ requests:
+ cpu: 10m
+ memory: 64Mi
+ image: "ghcr.io/github/github-mcp-server:v1.7.0"
+ mcpPort: 8082
+ proxyPort: 8080
+ transport: streamable-http
+ args:
+ - http
+ - "--read-only"
+ - "--toolsets"
+ - "context,repos,issues,pull_requests"
+ externalAuthConfigRef:
+ name: github
+ groupRef:
+ name: all
+ permissionProfile:
+ name: network
+ type: builtin
+ podTemplateSpec:
+ spec:
+ containers:
+ - name: mcp
+ resources:
+ limits:
+ cpu: 500m
+ memory: 256Mi
+ requests:
+ cpu: 10m
+ memory: 64Mi
|
AI Automated ReviewAnalysis engine: qwen-3.6-fast@http://litellm.ai.svc.cluster.local/v1 (openai) Recommendation: Approve This PR cleanly re-enables the GitHub MCP server by switching from Change-by-Change Findings
Standards Compliance
Release Notes (github-mcp-server v1.7.0)
Unknowns / Needs Verification
|
Re-enables the GitHub MCP server, disabled since ToolHive v0.40.1 health monitoring re-ran
initializeagainst its stdio backend and degraded theresourcesandunifiedgateways (upstream #5890).Why a transport change, not a different server
octocode-mcpis stdio-only with no container image; Docker Hubmcp/githubwraps the archived implementation, stdio-only,latesttag onlyThe part the transport change forces
httptakes no server-side token. Unlike the stdio path, itsServerConfighas noTokenfield and it authenticates per request, so the PAT cannot stay an env var:So the PAT moves to an
MCPExternalAuthConfigof typebearerToken, which makes the proxy attach it as anAuthorizationheader. This is the first MCPExternalAuthConfig in the cluster.Scoping
--read-onlyplus--toolsets context,repos,issues,pull_requests. The full server exposes ~79 tools and every one lands in the unified gateway's semantic tool index. NoMCPToolConfig:toolsFilter: []is a proven no-op (see #4211), so scoping is done on the server itself.Verified
ghcr.io/github/github-mcp-server:v1.7.0manifest exists on ghcr (amd64+arm64), released 2026-07-23kubectl apply --dry-run=servertoolhive-secretsstill carriesGITHUB_PERSONAL_ACCESS_TOKENNot runtime-verified — no pods have been started. Draft until someone watches the first rollout: confirm the pod goes Ready,
github_*tools appear onvmcp-resources, and theunifiedgateway does not report a degraded backend.