-
Notifications
You must be signed in to change notification settings - Fork 0
feat(toolhive): serve GitHub over its hosted MCP endpoint #4239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,40 @@ | ||
| # Disabled: neither transport works on ToolHive v0.40.1. | ||
| # | ||
| # stdio: virtual-MCP health monitoring re-runs `initialize`, which the backend rejects with | ||
| # `duplicate "initialize" received`, degrading the resources and unified gateways (#5890). | ||
| # | ||
| # streamable-http: `server http` takes no server-side token (verified against v1.7.0 --help), | ||
| # so the only path is MCPExternalAuthConfig bearerToken. The operator turns its tokenSecretRef | ||
| # into the thv CLI store reference `toolhive-secrets,target=bearer_token` and never projects | ||
| # the Secret into the proxy pod, so proxyrunner exits on "secrets provider not configured" | ||
| # before it serves. Restore once either is fixed upstream. | ||
| # GitHub's hosted MCP server instead of the self-run container: stdio dies on the | ||
| # virtual-MCP health check re-running `initialize` (#5890, still open in 0.41.0) and | ||
| # the container's http mode has no server-side token path (#4220). A remote entry has | ||
| # neither problem — headerForward injects the PAT server-side, the same shape context7 | ||
| # has run since 2026-04. The endpoint takes a raw PAT (verified: `Bearer <pat>` and a | ||
| # bare `<pat>` both return 200, `token <pat>` returns 400), so the existing secret key | ||
| # goes in unmodified. Despite the hostname, no Copilot entitlement is involved: a token | ||
| # carrying no `copilot` scope lists all 46 repo/issue/PR tools. | ||
| --- | ||
| apiVersion: toolhive.stacklok.dev/v1beta1 | ||
| kind: MCPToolConfig | ||
| kind: MCPServerEntry | ||
| metadata: | ||
| name: github | ||
| spec: | ||
| toolsFilter: [] | ||
| remoteUrl: https://api.githubcopilot.com/mcp/ | ||
| transport: streamable-http | ||
| groupRef: | ||
| name: resources | ||
| headerForward: | ||
| addHeadersFromSecret: | ||
| - headerName: Authorization | ||
| valueSecretRef: | ||
| name: toolhive-secrets | ||
| key: GITHUB_PERSONAL_ACCESS_TOKEN | ||
| --- | ||
| apiVersion: toolhive.stacklok.dev/v1beta1 | ||
| kind: MCPServerEntry | ||
| metadata: | ||
| name: github-opt | ||
| spec: | ||
| remoteUrl: https://api.githubcopilot.com/mcp/ | ||
| transport: streamable-http | ||
| groupRef: | ||
| name: all | ||
| headerForward: | ||
| addHeadersFromSecret: | ||
| - headerName: Authorization | ||
| valueSecretRef: | ||
| name: toolhive-secrets | ||
| key: GITHUB_PERSONAL_ACCESS_TOKEN | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.