Alpha Release of MongoDB CLI

This is a pre-release early version of MongoDB CLI. Do not use MongoDB CLI to manage production environments.


Command Errors

mongocli: command not found

The mongocli executable might be in a directory which is not in your path. You can either add the directory to your path, move the executable to a directory which is in your path, or run the executable directly from its location.

401 (request “Unauthorized”) You are not authorized for this resource.

The credentials you have provided are not valid for the project specified in your MongoDB CLI command. Check your public and private key strings for accuracy.

If your credentials are stored in a configuration file, make sure that the configuration file is in the correct location. The default location is the .config folder of your home directory. If you move the configuration file somewhere else, be sure to specify the location in the $XDG_CONFIG_HOME environment variable.

If MongoDB CLI cannot find your configuration file and no credentials are stored in environment variables, a 401 error will result.

401 (request “Unauthorized”) Current user is not authorized to perform this action.

The API key specified in your configuration file does not have permission to perform the requested action. API keys are configured with specific permission levels, from Project Read Only (minimum permission level) up to Project Owner (full permissions).

401 (request “Unauthorized”) The currently logged in user does not have the group creator role in organization <org-id>.

This error might appear when trying to create a new project. Your specified API key must have the Organization Project Creator role at the organization level in order to create new projects.

403 (request “Forbidden”) IP address <ip-address> is not allowed to access this resource.

The API key specified in your configuration file is not whitelisted for the requested project.

404 (request “Not Found”) An invalid group ID <group-id> was specified.

The project ID entered with the command does not exist. Check your project ID by navigating to the Settings sub-section of the Project section in the Atlas left-side navigation.


group ID and project ID are synonymous in MongoDB cloud services.

404 (request “Not Found”) Organization <org-id> is not an Atlas organization.

To use the MongoDB CLI with Cloud Manager or Ops Manager, you must specify the service in your configuration file. If you don’t specify a service, MongoDB CLI defaults to Atlas.

Unsupported service: <service-name>

Some operations are available only for Atlas, while others are available only for Cloud Manager or Ops Manager. This error might appear if you request an operation which is not available for the specified service.

Configuration Errors

Blank output when reading home directory

This error might appear if MongoDB CLI cannot access your home directory.


This error might appear if MongoDB CLI cannot access your home directory.