Skip to content

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

Description

@arunoruto

Problem Description

Currently the help menu only displays the following content:

$ context7-mcp -h
Usage: index [options]

Options:
  --transport <stdio|http>  transport type (default: "stdio")
  --port <number>           port for HTTP transport (default: "3000")
  --api-key <key>           API key for authentication (or set CONTEXT7_API_KEY env var)
  -h, --help                display help for command

There is no --version or -v flag
The only way to check the version of the binary is to run it with no arguments and inspect the output string:

$ context7-mcp
Context7 Documentation MCP Server v2.1.4 running on stdio

Proposed Solution

Add a --version and/or -v flag and print out the raw version value

Alternatives Considered

No response

Priority

Would improve my workflow

Additional Context

I mainly request this, so I can package it nicely into nixpkgs with a test version hook. This will make it easier to test if the binary still runs if some changes happen in the future and catch it before it goes into production!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions