mongodb / v3.6 / reference / reference-method-version.html

version()

version ( )
Returns: The version of the mongo shell as a string.