Skip to content

feat(mcp): add --version / -v flag to MCP CLI binary#2291

Open
withsivram wants to merge 1 commit intoupstash:masterfrom
withsivram:feat/version-flag
Open

feat(mcp): add --version / -v flag to MCP CLI binary#2291
withsivram wants to merge 1 commit intoupstash:masterfrom
withsivram:feat/version-flag

Conversation

@withsivram
Copy link
Copy Markdown

Summary

  • Wires commander's .version() to SERVER_VERSION (already read from package.json) so that running npx @upstash/context7-mcp --version or -v prints the current package version and exits cleanly
  • One-line change in packages/mcp/src/index.ts

Test plan

  • npx @upstash/context7-mcp --version prints version number and exits
  • npx @upstash/context7-mcp -v same behavior
  • Normal MCP server startup is unaffected

Closes #2284

🤖 Generated with Claude Code

Closes upstash#2284. Wire commander's .version() to SERVER_VERSION (already
read from package.json) so that running:

  npx @upstash/context7-mcp --version
  npx @upstash/context7-mcp -v

prints the current package version and exits cleanly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 20, 2026 16:34
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a standard --version / -v flag to the @upstash/context7-mcp CLI by wiring Commander’s version output to the existing SERVER_VERSION, allowing users (and packaging systems like nixpkgs) to query the binary version without starting the server.

Changes:

  • Register -v, --version on the MCP CLI using Commander’s .version() with SERVER_VERSION.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

[Feature]: add --version/-v to mcp cli

2 participants