Skip to content

fix: handle CLI metadata flags before auth#259

Open
xianzuyang9-blip wants to merge 1 commit into
firecrawl:mainfrom
xianzuyang9-blip:codex/cli-metadata-flags
Open

fix: handle CLI metadata flags before auth#259
xianzuyang9-blip wants to merge 1 commit into
firecrawl:mainfrom
xianzuyang9-blip:codex/cli-metadata-flags

Conversation

@xianzuyang9-blip

Copy link
Copy Markdown

Summary

  • handle --version / -v and --help / -h before starting FastMCP/authentication
  • print package version/help and exit cleanly without requiring Firecrawl credentials
  • leave normal server startup unchanged when no metadata flag is present

Fixes #256.

Reproduction

Current published package fails metadata flags without Firecrawl env:

npx --yes firecrawl-mcp@3.20.2 --version
Either FIRECRAWL_API_KEY or FIRECRAWL_API_URL must be provided

npx --yes firecrawl-mcp@3.20.2 --help
Either FIRECRAWL_API_KEY or FIRECRAWL_API_URL must be provided

Validation

npm install
npm run build
node dist/index.js --version   # 3.20.2
node dist/index.js --help      # prints help, exits 0
node dist/index.js -h          # prints help, exits 0

npm test -- --runInBand currently cannot start because jest is not installed by this package's devDependencies (Cannot find module ... node_modules/jest/bin/jest.js), so I used the focused build + CLI checks above for this CLI metadata fix.

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.

CLI metadata flags require FIRECRAWL_API_KEY instead of printing help/version

1 participant