Skip to content

Context7 Platform -- Up-to-date docs for AI agents

feat(mcp): add --version/-v flag to CLI (#2325)

vincent658ec6796ec2
diff --git a/.changeset/bright-pandas-dance.md b/.changeset/bright-pandas-dance.md
new file mode 100644
index 00000000..a6009128
--- /dev/null
+++ b/.changeset/bright-pandas-dance.md
@@ -0,0 +1,5 @@
+---
+"@upstash/context7-mcp": patch
+---
+
+Add --version/-v flag to MCP CLI
diff --git a/packages/mcp/src/index.ts b/packages/mcp/src/index.ts
index aaa9fb85..2314f2b9 100644
--- a/packages/mcp/src/index.ts
+++ b/packages/mcp/src/index.ts
@@ -18,6 +18,7 @@ const DEFAULT_PORT = 3000;
// Parse CLI arguments using commander
const program = new Command()
+ .version(SERVER_VERSION, "-v, --version", "output the current version")
.option("--transport <stdio|http>", "transport type", "stdio")
.option("--port <number>", "port for HTTP transport", DEFAULT_PORT.toString())
.option("--api-key <key>", "API key for authentication (or set CONTEXT7_API_KEY env var)")