Draft
fix: CLI-mount GitHub MCP server as fallback when native HTTP init fails#44976
Conversation
…NAL_SERVERS Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix registration of GitHub MCP tools in Claude Code
fix: CLI-mount GitHub MCP server as fallback when native HTTP init fails
Jul 11, 2026
pelikhan
reviewed
Jul 11, 2026
| * Note: safeoutputs, mcpscripts, and github are NOT excluded — they are CLI-mounted | ||
| * so agents retain access to their tools even when the native MCP HTTP initialization | ||
| * fails (e.g. a protocol-version mismatch between the engine and the gateway). */ | ||
| const INTERNAL_SERVERS = new Set(); |
Contributor
Author
There was a problem hiding this comment.
Done — removed the INTERNAL_SERVERS constant and the .filter() call entirely in 7f04e26. All 6 tests still pass.
…cli.cjs Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
🤖 PR Triage
MCP server fallback fix. Draft state — promote when ready and confirm CI. Related to #44975 (runtime fix cluster).
|
Contributor
🤖 PR Triage
Rationale: Draft. Fixes CLI-mount MCP server fallback when native HTTP init fails (protocol-version mismatch). Small change (4+/9-). Needs undraft + CI before merge. Triage run §29183606049
|
Contributor
🤖 PR Triage
Draft. CLI-mount MCP server fallback. Small change (+4/-9). Review with other bug fixes.
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Both Claude Code and Copilot report
status: "failed"for thegithubMCP server at init time — likely a protocol-version mismatch between agent clients and gateway v0.4.1 — leaving zeromcp__github__*tools registered in every session.safeoutputsexhibits the same native MCP HTTP failure but recovers via a CLI wrapper;githubhad no equivalent fallback because it was explicitly excluded.Changes
actions/setup/js/mount_mcp_as_cli.cjs: Remove"github"fromINTERNAL_SERVERS(previouslynew Set(["github"])).mount_mcp_as_cli.cjsnow CLI-mounts the GitHub MCP server identically tosafeoutputs: queriestools/listvia a direct HTTP call (using the compatibleprotocolVersion: "2024-11-05"), writes a shell wrapper per tool into${RUNNER_TEMP}/gh-aw/mcp-cli/bin/, and adds that directory to PATH. Agents can invoke GitHub tools via Bash (github list_dependabot_alerts ...) even when native MCP initialization fails..changeset/: Updated changeset description to accurately reflect the actual fix.The native MCP config is left unchanged (
githubstays inmcp-servers.json/mcp-config.json), so if the underlying gateway compatibility issue is resolved in a future release, nativemcp__github__*registration will also work without further changes.