feat(mcp): add --version / -v flag to MCP CLI binary#2291
Open
withsivram wants to merge 1 commit intoupstash:masterfrom
Open
feat(mcp): add --version / -v flag to MCP CLI binary#2291withsivram wants to merge 1 commit intoupstash:masterfrom
withsivram wants to merge 1 commit intoupstash:masterfrom
Conversation
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>
There was a problem hiding this comment.
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, --versionon the MCP CLI using Commander’s.version()withSERVER_VERSION.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.version()toSERVER_VERSION(already read frompackage.json) so that runningnpx @upstash/context7-mcp --versionor-vprints the current package version and exits cleanlypackages/mcp/src/index.tsTest plan
npx @upstash/context7-mcp --versionprints version number and exitsnpx @upstash/context7-mcp -vsame behaviorCloses #2284
🤖 Generated with Claude Code