Skip to content

Fix MCP not loaded on GitHub Copilot CLI - #56

Merged
setoelkahfi merged 1 commit into
developmentfrom
feature/fix-mcp-github-copilot
Sep 30, 2026
Merged

setoelkahfi merged 1 commit into
developmentfrom
feature/fix-mcp-github-copilot

Conversation

@setoelkahfi

Copy link
Copy Markdown
Collaborator

Related Issue

Fixes #55

Description

Type of Change

  • Bug fix
  • New feature
  • Refactor (no functional change)
  • Documentation update
  • CI / tooling change

How Has This Been Tested?

  • cargo test --all-features
  • Manual testing (smb <command>)

Checklist

  • cargo check --workspace passes
  • cargo clippy --workspace --tests -- -D warnings passes
  • cargo fmt --all -- --check passes
  • No new unwrap() or expect() calls in production code
  • No new mod.rs files introduced
  • New dependencies added to root Cargo.toml and inherited with { workspace = true }
  • Error messages are user-friendly and surfaced to the terminal

Release Notes

@setoelkahfi setoelkahfi self-assigned this Sep 27, 2026
@coderabbitai

coderabbitai Bot commented Sep 27, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 6d03b2b3-6230-491f-b915-c0434d315131


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.

❤️ Share

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

@sigit-code-review sigit-code-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

Comment thread crates/xcrs/src/mcp.rs
Comment thread crates/xcrs/src/mcp.rs
Comment thread crates/xcrs/src/mcp.rs
Comment thread crates/xcrs/src/mcp.rs
Comment thread crates/xcrs/src/mcp.rs
@setoelkahfi
setoelkahfi requested a review from paydii September 30, 2026 09:50
@setoelkahfi
setoelkahfi merged commit 3cabc2d into development Sep 30, 2026
7 checks passed
@setoelkahfi
setoelkahfi deleted the feature/fix-mcp-github-copilot branch September 30, 2026 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GitHub Copilot CLI cannot load smbcloud-cli MCP server

3 participants