mcp-server icon indicating copy to clipboard operation
mcp-server copied to clipboard

fix: handle cli metadata flags

Open Viodmian opened this issue 5 months ago • 2 comments

Summary

  • handle ui5mcp --help / -h before server startup and print usage
  • handle ui5mcp --version / -v before server startup and print the package version
  • keep unsupported arguments on the existing error path with exit code 2
  • add CLI coverage for help/version and isolate process.argv between serial tests

Reproduction

With the published @ui5/[email protected] package, metadata flags currently fail as unsupported arguments:

node ./bin/ui5mcp.js --help
# exits 2: Unexpected arguments: This command does not accept any arguments.

node ./bin/ui5mcp.js --version
# exits 2: Unexpected arguments: This command does not accept any arguments.

These flags are useful for package managers, MCP client diagnostics, and quick installation checks that should not need to start the MCP server.

Verification

npm ci --ignore-scripts --no-audit --no-fund
npx ava test/lib/cli.ts
npm run build-test -- --pretty false
npx eslint src/cli.ts test/lib/cli.ts
npm run build
git diff --check
node bin/ui5mcp.js --help
node bin/ui5mcp.js --version
node bin/ui5mcp.js --definitely-not-real

After the fix, --help, -h, --version, and -v exit 0 without constructing the server. Unknown arguments still exit 2.

Viodmian avatar Jun 08 '26 03:06 Viodmian

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

cla-assistant[bot] avatar Jun 08 '26 03:06 cla-assistant[bot]

Thank you for your interest in contributing to this project. I noticed this PR appears to have been created by an AI bot.

Before we can review and consider this contribution, we need to clarify a few things:

CLA Requirement: All contributions to SAP open source projects require signing our Contributor License Agreement (CLA). A CLA is a legal agreement that requires legal capacity to enter into — something an AI bot cannot do on its own. Therefore, we need a human or legal entity to take responsibility for this contribution and sign the CLA.

Human Review: Our guidelines for AI-generated code contributions place obligations on contributors to review AI-generated output for compliance with licensing terms, third-party IP considerations, and tool-specific filtering requirements. These responsibilities require human judgment and accountability.

Could you please clarify:

  1. Is there a human maintainer or organization behind this bot who can review this contribution, take responsibility for its content, and sign the CLA?
  2. Has a human reviewed this PR for compliance with the project's license and our AI contribution guidelines?

Without a human in the loop who can sign the CLA and assume responsibility for the contribution, we unfortunately cannot accept this PR.

RandomByte avatar Jun 09 '26 08:06 RandomByte