Skip to content

Commit 658ec67

Browse files
vincent067liwenjun-devfahreddinozcan
authored
feat(mcp): add --version/-v flag to CLI (upstash#2325)
* docs: add CLAUDE.md with Context7 integration guidelines Add documentation for Claude Code integration including: - Quick setup instructions - Usage examples with popular libraries - Auto-trigger rules for NestJS, Prisma, SvelteKit, etc. - Best practices for library documentation queries Closes upstash#2272 * feat(mcp): add --version/-v flag to CLI Add version flag support using Commander.js .version() method. Uses existing SERVER_VERSION constant from package.json. Fixes upstash#2284 * chore: remove unrelated CLAUDE.md from PR * chore: add changeset for mcp version flag --------- Co-authored-by: liwenjun-dev <liwenjun.dev@gmail.com> Co-authored-by: Fahreddin Özcan <ozcanfahrettinn@gmail.com>
1 parent 3b9c9b2 commit 658ec67

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

.changeset/bright-pandas-dance.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@upstash/context7-mcp": patch
3+
---
4+
5+
Add --version/-v flag to MCP CLI

packages/mcp/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const DEFAULT_PORT = 3000;
1818

1919
// Parse CLI arguments using commander
2020
const program = new Command()
21+
.version(SERVER_VERSION, "-v, --version", "output the current version")
2122
.option("--transport <stdio|http>", "transport type", "stdio")
2223
.option("--port <number>", "port for HTTP transport", DEFAULT_PORT.toString())
2324
.option("--api-key <key>", "API key for authentication (or set CONTEXT7_API_KEY env var)")

0 commit comments

Comments
 (0)