Skip to content

fix(toolhive): disable the GitHub MCP again, bearerToken is a no-op - #4220

Merged
Tanguille merged 1 commit into
mainfrom
fix/toolhive-github-disable
Jul 27, 2026
Merged

fix(toolhive): disable the GitHub MCP again, bearerToken is a no-op#4220
Tanguille merged 1 commit into
mainfrom
fix/toolhive-github-disable

Conversation

@Tanguille

@Tanguille Tanguille commented Jul 27, 2026

Copy link
Copy Markdown
Owner

github and github-opt have been in CrashLoopBackOff since #4212 merged.

Error: error determining secrets provider type: secrets provider not configured.
Please run 'thv secret setup' to configure a secrets provider first
Check Result
server http --help (v1.7.0) no token flag; per-request auth only, so #4212's premise holds
generated github-runconfig "bearer_token": "toolhive-secrets,target=bearer_token"
proxy pod volumes runconfig ConfigMap only, Secret never projected
proxy pod env identical to a working server; no secrets-provider var
operator version v0.40.1, latest upstream release

The operator rewrites MCPExternalAuthConfig.bearerToken.tokenSecretRef into a thv CLI
store reference and never projects the Secret, so the proxy exits before it serves.
No transport works on v0.40.1: stdio fails the health-check re-init (#5890), and
streamable-http fails this. Back to disabled, with both failure modes recorded.

The commented-out stdio manifests are dropped rather than restored; git history has them.

Summary by CodeRabbit

  • Bug Fixes
    • Temporarily disabled the GitHub integration’s server connections and authentication to address reliability and token-handling issues.
    • Retained the GitHub tool configuration with no tools enabled while the integration is inactive.

The operator turns MCPExternalAuthConfig tokenSecretRef into a thv CLI store
reference and never projects the Secret, so both backends have crashlooped on
"secrets provider not configured" since #4212.
@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a66effbb-4a65-481f-b7fb-0de5388e9edb

📥 Commits

Reviewing files that changed from the base of the PR and between e8e8ac7 and 3bbcdcb.

📒 Files selected for processing (1)
  • kubernetes/apps/ai/toolhive/config/github.yaml
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • Tanguille/LLMKube (auto-detected)

📝 Walkthrough

Walkthrough

The GitHub MCP external authentication and server resources were removed. A single MCPToolConfig named github now defines an empty tools filter, with comments documenting temporarily disabled transport and authentication settings.

Changes

GitHub MCP disablement

Layer / File(s) Summary
Replace GitHub MCP resources
kubernetes/apps/ai/toolhive/config/github.yaml
Removes the GitHub authentication and server resources, and adds an MCPToolConfig with no enabled tools and updated disablement notes.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: disabling the GitHub MCP integration and removing bearerToken wiring.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/toolhive-github-disable

Comment @coderabbitai help to get the list of available commands.

@tanguille-cluster

Copy link
Copy Markdown
@@ (root level) @@
# toolhive.stacklok.dev/v1beta1/MCPExternalAuthConfig/ai/github
! - one document removed:
- 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 removed:
- 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@sha256:c491ffdf6f4c85cb5397021bc655edb8ab825c6f5f568e7597d77a1bd7c4d308"
-   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 removed:
- 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@sha256:c491ffdf6f4c85cb5397021bc655edb8ab825c6f5f568e7597d77a1bd7c4d308"
-   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

@@ (root level) @@
# toolhive.stacklok.dev/v1beta1/MCPToolConfig/ai/github
! + one document added:
+ 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: []

@Tanguille
Tanguille merged commit 3efff2a into main Jul 27, 2026
13 of 14 checks passed
@Tanguille
Tanguille deleted the fix/toolhive-github-disable branch July 27, 2026 21:37
@github-actions

Copy link
Copy Markdown

AI Automated Review

Analysis engine: qwen-3.6-fast@http://litellm.ai.svc.cluster.local/v1 (openai)

Recommendation

Approve. This PR correctly disables the GitHub MCP configuration after PR 4212's re-enablement caused CrashLoopBackOff. The detailed inline comments document both upstream failure modes (stdio initialize re-init and streamable-http bearer token projection), making this a well-documented rollback that preserves git history for future restoration.

Change-by-Change Findings

The diff removes three resources (MCPExternalAuthConfig, two MCPServers) and replaces them with a single empty MCPToolConfig stub carrying comprehensive comments explaining why neither transport works on ToolHive v0.40.1:

  1. stdio transport: Health monitoring re-runs initialize, which the backend rejects with duplicate "initialize" received (upstream PR 5890).
  2. streamable-http transport: server http takes no server-side token flag; the only auth path is MCPExternalAuthConfig.bearerToken, but the operator converts tokenSecretRef into a thv CLI store reference (toolhive-secrets,target=bearer_token) and never projects the Secret into the proxy pod, causing proxyrunner to exit with secrets provider not configured.

The remaining MCPToolConfig resource with toolsFilter: [] is a valid no-op placeholder that prevents the file from being empty while keeping the namespace clean.

Standards Compliance

  • Conventional Commit title: fix(toolhive): disable the GitHub MCP again, bearerToken is a no-op — correct scope and type.
  • Small and focused: Single file change, purely disabling broken config.
  • No secrets committed: The removed MCPExternalAuthConfig referenced toolhive-secrets by name only (no secret values inlined); no new secrets introduced.
  • GitOps pattern: Changes are declarative manifest-only, consistent with repo workflow.

Release Notes

github-mcp-server v1.7.0

The image digest remains at v1.7.0 (not changed by this PR). Key changes in v1.7.0 include:

  • Server-to-server auth support for GitHub Apps via stdio
  • Projects tools improved pagination
  • MCP 2026-07-28 spec compliance via go-sdk 1.7.0-pre.3
  • Lockdown mode improvements

These changes do not affect this PR since the GitHub MCP is being disabled entirely.

ToolHive v0.40.1

The PR body confirms the operator version is v0.40.1 (latest upstream release at time of writing). The bearer token projection bug appears to be an operator limitation rather than a documented breaking change.

Tanguille added a commit that referenced this pull request Jul 28, 2026
The GitHub MCPServers are gone since #4220; the leftover MCPToolConfig
had no referrer, and toolsFilter [] is a verified no-op regardless.
Neither transport is fixed in 0.41.0, so the RCA note moves to the
kustomization in its place.

Chart 0.41.0 lowers GOMEMLIMIT 150MiB -> 110MiB, so the old comment on
the memory override no longer described why we deviate.
Tanguille added a commit that referenced this pull request Jul 28, 2026
The self-run container is unusable on both transports: stdio gets marked
unhealthy when the vMCP health check re-sends `initialize` (#5890, still
open in 0.41.0), and `server http` accepts no server-side token, with the
MCPExternalAuthConfig bearerToken path a no-op (#4220).

MCPServerEntry sidesteps both. headerForward injects the PAT server-side,
which is the capability bearerToken failed to provide, and the remote has
no pod for the health check to re-initialize. Same shape as context7.

The endpoint accepts a bare PAT, so GITHUB_PERSONAL_ACCESS_TOKEN is reused
as-is. No Copilot entitlement: a token with no `copilot` scope lists all 46
repo/issue/PR tools.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant