Skip to content

fix(cli,server): report correct binary name and server identity#90

Merged
bug-ops merged 1 commit into
masterfrom
89-85-cli-server-identity
May 3, 2026
Merged

fix(cli,server): report correct binary name and server identity#90
bug-ops merged 1 commit into
masterfrom
89-85-cli-server-identity

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented May 3, 2026

Summary

  • Remove hardcoded #[command(name = "mcp-cli")] from Cli in crates/mcp-cli/src/cli.rs so clap derives the binary name from argv[0] at runtime — fixes --version output and generated shell completions targeting the wrong name
  • Replace Implementation::from_build_env() with Implementation::new(env!("CARGO_PKG_NAME"), env!("CARGO_PKG_VERSION")) in crates/mcp-server/src/service.rs — fixes MCP handshake reporting rmcp/1.5.0 instead of mcp-execution-server/<version>

Closes #89, #85.

Test plan

  • cargo run -p mcp-execution-cli -- --version outputs mcp-execution-cli <version>
  • cargo run -p mcp-execution-cli -- completions bash | head -1 shows _mcp-execution-cli()
  • cargo run -p mcp-execution-cli -- completions zsh | head -1 shows #compdef mcp-execution-cli
  • MCP initialize handshake returns "serverInfo": {"name": "mcp-execution-server", "version": "<version>"}
  • All 636 unit tests pass (cargo nextest run --all-features --workspace)
  • test_get_info now asserts correct name and version via env!("CARGO_PKG_NAME") / env!("CARGO_PKG_VERSION")

- Remove `#[command(name = "mcp-cli")]` from `Cli` so clap derives the
  binary name from argv[0] at runtime; fixes `--version` output and
  generated shell completions targeting the wrong name (issue #89)
- Replace `Implementation::from_build_env()` in `get_info()` with a
  direct construction using `env!("CARGO_PKG_NAME")` / `env!("CARGO_PKG_VERSION")`
  so the MCP handshake reports `mcp-execution-server` instead of `rmcp`
  (issue #85)
@github-actions github-actions Bot added crate: mcp-cli Changes to mcp-cli crate (command-line interface) type: documentation Documentation changes (*.md, docs/, comments) breaking change Contains breaking API changes (requires major version bump) release Release preparation (changelog, version bumps) labels May 3, 2026
@bug-ops bug-ops enabled auto-merge (squash) May 3, 2026 13:01
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #90   +/-   ##
=======================================
  Coverage   88.96%   88.97%           
=======================================
  Files          33       33           
  Lines        7706     7708    +2     
=======================================
+ Hits         6856     6858    +2     
  Misses        850      850           
Flag Coverage Δ
mcp-cli 88.97% <100.00%> (+<0.01%) ⬆️
mcp-codegen 88.97% <100.00%> (+<0.01%) ⬆️
mcp-core 88.97% <100.00%> (+<0.01%) ⬆️
mcp-files 88.97% <100.00%> (+<0.01%) ⬆️
mcp-introspector 88.97% <100.00%> (+<0.01%) ⬆️
mcp-server 88.97% <100.00%> (+<0.01%) ⬆️
mcp-skill 88.97% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
crates/mcp-cli/src/cli.rs 94.17% <ø> (ø)
crates/mcp-server/src/service.rs 83.49% <100.00%> (+0.04%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bug-ops bug-ops merged commit 32fc2f5 into master May 3, 2026
17 checks passed
@bug-ops bug-ops deleted the 89-85-cli-server-identity branch May 3, 2026 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change Contains breaking API changes (requires major version bump) crate: mcp-cli Changes to mcp-cli crate (command-line interface) release Release preparation (changelog, version bumps) type: documentation Documentation changes (*.md, docs/, comments)

Projects

None yet

2 participants