Skip to content

fix: CLI-mount GitHub MCP server as fallback when native HTTP init fails#44976

Draft
pelikhan with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-github-mcp-tools-registration
Draft

fix: CLI-mount GitHub MCP server as fallback when native HTTP init fails#44976
pelikhan with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-github-mcp-tools-registration

Conversation

Copilot AI commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Both Claude Code and Copilot report status: "failed" for the github MCP server at init time — likely a protocol-version mismatch between agent clients and gateway v0.4.1 — leaving zero mcp__github__* tools registered in every session. safeoutputs exhibits the same native MCP HTTP failure but recovers via a CLI wrapper; github had no equivalent fallback because it was explicitly excluded.

Changes

  • actions/setup/js/mount_mcp_as_cli.cjs: Remove "github" from INTERNAL_SERVERS (previously new Set(["github"])). mount_mcp_as_cli.cjs now CLI-mounts the GitHub MCP server identically to safeoutputs: queries tools/list via a direct HTTP call (using the compatible protocolVersion: "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.
-const INTERNAL_SERVERS = new Set(["github"]);
+const INTERNAL_SERVERS = new Set();
  • .changeset/: Updated changeset description to accurately reflect the actual fix.

The native MCP config is left unchanged (github stays in mcp-servers.json / mcp-config.json), so if the underlying gateway compatibility issue is resolved in a future release, native mcp__github__* registration will also work without further changes.

…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
Copilot AI requested a review from pelikhan July 11, 2026 16:26
Comment thread actions/setup/js/mount_mcp_as_cli.cjs Outdated
* 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();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot remove internal servers all together

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
@github-actions

Copy link
Copy Markdown
Contributor

🤖 PR Triage

Field Value
Category bug
Risk 🟡 Medium
Score 55/100 (Impact 28 + Urgency 12 + Quality 15)
Action 🔄 batch_review
CI ⚪ Unknown (draft)

MCP server fallback fix. Draft state — promote when ready and confirm CI. Related to #44975 (runtime fix cluster).

Generated by 🔧 PR Triage Agent · 180.8 AIC · ⌖ 7.62 AIC · ⊞ 5.6K ·

@github-actions

Copy link
Copy Markdown
Contributor

🤖 PR Triage

Field Value
Category bug
Risk 🟡 medium
Score 50/100 (impact:25 + urgency:15 + quality:10)
Action 📦 batch_review

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

Generated by 🔧 PR Triage Agent · 171.6 AIC · ⌖ 5.63 AIC · ⊞ 5.6K ·

@github-actions

Copy link
Copy Markdown
Contributor

🤖 PR Triage

Field Value
Category bug
Risk 🟡 Medium
Score 55/100 (impact: 25, urgency: 16, quality: 14)
Action batch_review

Draft. CLI-mount MCP server fallback. Small change (+4/-9). Review with other bug fixes.

Generated by 🔧 PR Triage Agent · 48.3 AIC · ⌖ 7.99 AIC · ⊞ 5.6K ·

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.

github MCP tools never registered by Claude Code despite the server answering gateway RPC calls successfully

2 participants