Fix MCP not loaded on GitHub Copilot CLI - #56
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
This PR fixes MCP server startup on GitHub Copilot CLI by handling the legacy server/discover probe that Copilot CLI sends before initialize. When that probe has no _meta field (i.e. the tool-cache cold-start probe from older Copilot CLI versions), compatible_stdio() responds with a JSON-RPC -32601 error and then hands the remaining stdin back to rmcp. When _meta is present (the modern 2026-07-28 protocol variant), the line is prepended back to stdin and passed through unchanged. The change also upgrades the rmcp dependency from 2.2.0 → 3.4.1 and renames ServerInfo → ServerConfig throughout, with the transport::stdio import removed since rmcp 3.x accepts a (AsyncRead, AsyncWrite) tuple directly.
The core logic to review is compatible_stdio() and legacy_discovery_response() in crates/xcrs/src/mcp.rs.
Automated review by siGit Code Review · commit 4dce6e1 · see the review dashboard
Related Issue
Fixes #55
Description
Type of Change
How Has This Been Tested?
cargo test --all-featuressmb <command>)Checklist
cargo check --workspacepassescargo clippy --workspace --tests -- -D warningspassescargo fmt --all -- --checkpassesunwrap()orexpect()calls in production codemod.rsfiles introducedCargo.tomland inherited with{ workspace = true }Release Notes