Skip to content

fix: handle MCP metadata flags before startup - #448

Open
xianzuyang9-blip wants to merge 1 commit into
kychee-com:mainfrom
xianzuyang9-blip:codex/mcp-metadata-flags
Open

xianzuyang9-blip wants to merge 1 commit into
kychee-com:mainfrom
xianzuyang9-blip:codex/mcp-metadata-flags

Conversation

@xianzuyang9-blip

Copy link
Copy Markdown

Summary

  • add run402-mcp --version / -v output sourced from package.json
  • add run402-mcp --help / -h usage output
  • short-circuit these metadata flags before constructing and connecting the MCP stdio server

Reproduction

The published run402-mcp@2.40.0 currently accepts metadata flags but prints nothing:

npm exec --yes --package=run402-mcp -- run402-mcp --version
npm exec --yes --package=run402-mcp -- run402-mcp --help

That makes install/version checks difficult for MCP clients and users debugging npx setup.

Verification

  • npm install
  • $env:npm_config_script_shell='C:\Program Files\Git\bin\bash.exe'; npm run build
  • node dist/index.js --version -> 2.40.0
  • node dist/index.js -v -> 2.40.0
  • node dist/index.js --help prints usage and exits without starting stdio

Note: on Windows, the repo build script needs npm_config_script_shell pointed at Git Bash because it uses POSIX commands such as rm, mkdir -p, and cp.

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.

1 participant