Skip to content

fix: use dynamic version in CLI help text instead of hardcoded 2.0#3456

Open
saschabuehrle wants to merge 1 commit intoPrefectHQ:mainfrom
saschabuehrle:fix/issue-3455
Open

fix: use dynamic version in CLI help text instead of hardcoded 2.0#3456
saschabuehrle wants to merge 1 commit intoPrefectHQ:mainfrom
saschabuehrle:fix/issue-3455

Conversation

@saschabuehrle
Copy link

Bug

#3455 — Running fastmcp --help displays "FastMCP 2.0" regardless of the installed version, which is confusing on 3.x.

Fix

Replaced the hardcoded "FastMCP 2.0" string in the cyclopts.App help parameter with an f-string that reads fastmcp.__version__ at import time. The version= kwarg already uses fastmcp.__version__, so this just makes the two consistent.

Also updated the test in test_cli.py to assert "FastMCP" is present in the help text without checking a specific version number, matching the existing pattern used for the version attribute.

Testing

Confirmed the help text now shows the actual installed version. The existing test suite passes with the updated assertion.

Happy to address any feedback.

Greetings, saschabuehrle

@marvin-context-protocol marvin-context-protocol bot added bug Something isn't working. Reports of errors, unexpected behavior, or broken functionality. cli Related to FastMCP CLI commands (run, dev, install) or CLI functionality. labels Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working. Reports of errors, unexpected behavior, or broken functionality. cli Related to FastMCP CLI commands (run, dev, install) or CLI functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant