Skip to content

Conversation

@bug-ops
Copy link
Owner

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

Summary

Add --from-config flag to the introspect command, enabling users to load server configuration from ~/.claude/mcp.json instead of specifying command/args manually.

  • Add --from-config <NAME> argument to introspect command
  • Reuse existing load_server_from_config() function from generate command
  • Apply security improvements to error messages (remove server list exposure)
  • Update logging level from info! to debug! for config loading
  • Add integration tests for new functionality
  • Update help text with Configuration Modes section
  • Bump dependency versions

Example Usage

# Before (manual args)
mcp-execution-cli introspect /opt/homebrew/bin/npx -a "-y" -a "@upstash/context7-mcp@latest"

# After (from config)
mcp-execution-cli introspect --from-config context7

Test plan

  • All existing tests pass (556/556)
  • cargo clippy --workspace -- -D warnings passes
  • cargo +nightly fmt --check passes
  • 3 new integration tests added:
    • test_run_from_config_not_found
    • test_run_from_config_takes_priority
    • test_run_manual_mode_backward_compatible
  • Help text updated with Configuration Modes section
  • Security review: approved with recommendations applied
  • Performance review: approved (zero regressions)
  • Code review: approved

Files Changed

  • crates/mcp-cli/src/main.rs - CLI argument definitions and help text
  • crates/mcp-cli/src/commands/introspect.rs - Config loading logic + tests
  • crates/mcp-cli/src/commands/common.rs - Security improvements to error messages
  • crates/mcp-cli/src/commands/generate.rs - Logging level consistency
  • Cargo.toml, Cargo.lock - Dependency updates

Add the ability to load server configuration from ~/.claude/mcp.json
when using the introspect command, matching existing functionality
in the generate command.

Changes:
- Add --from-config flag to introspect command in main.rs
- Update introspect::run() to support config loading
- Apply security improvements to error messages
- Change config loading logs from info! to debug! level
- Update all existing tests for new function signature
- Bump dependency versions (handlebars, rmcp, schemars, tempfile, tokio)

Security improvements:
- Remove server list from "not found" error messages
- Use user-friendly path (~/.claude/mcp.json) in error messages
@github-actions github-actions bot added crate: mcp-cli Changes to mcp-cli crate (command-line interface) type: dependencies Dependency updates (Cargo.toml, Cargo.lock) build Build configuration changes (build.rs, toolchain) workspace Workspace-wide changes affecting multiple crates release Release preparation (changelog, version bumps) labels Jan 3, 2026
@codecov-commenter
Copy link

codecov-commenter commented Jan 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #39   +/-   ##
=======================================
  Coverage   92.41%   92.41%           
=======================================
  Files          21       21           
  Lines        4749     4749           
=======================================
  Hits         4389     4389           
  Misses        360      360           
Flag Coverage Δ
unittests 92.41% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cc795d6...4e3077e. Read the comment docs.

🚀 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.

Add 3 tests for introspect --from-config functionality:
- test_run_from_config_not_found: config error handling
- test_run_from_config_takes_priority: config path selection
- test_run_manual_mode_backward_compatible: backward compat
Add Configuration Modes section and examples showing
--from-config usage, matching generate command documentation.
- Update version from 0.6.2 to 0.6.3 in Cargo.toml
- Add CHANGELOG entry for --from-config introspect feature
- Add diff links to all CHANGELOG releases
- Expand introspect documentation in mcp-cli README
- Fix config path inconsistency (~/.claude/mcp.json)
- Update README CLI commands section with v0.6.3 examples
@github-actions github-actions bot added type: documentation Documentation changes (*.md, docs/, comments) breaking change Contains breaking API changes (requires major version bump) labels Jan 3, 2026
@bug-ops bug-ops merged commit b5b21f0 into master Jan 3, 2026
16 checks passed
@bug-ops bug-ops deleted the feature/introspect-from-config branch January 3, 2026 22:09
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) build Build configuration changes (build.rs, toolchain) crate: mcp-cli Changes to mcp-cli crate (command-line interface) release Release preparation (changelog, version bumps) type: dependencies Dependency updates (Cargo.toml, Cargo.lock) type: documentation Documentation changes (*.md, docs/, comments) workspace Workspace-wide changes affecting multiple crates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants