Skip to main content

Documentation Index

Fetch the complete documentation index at: https://onecli.sh/docs/llms.txt

Use this file to discover all available pages before exploring further.

Overview

OneCLI connects AI agents to MongoDB Atlas through the Atlas Administration API. Agents can manage clusters, database users, projects, and organizations. The gateway injects credentials into requests to cloud.mongodb.com automatically. Unlike most integrations, MongoDB Atlas uses service account client credentials (OAuth2 client credentials grant) rather than a browser-based OAuth flow.

Setup

1

Create a service account in Atlas

Go to the MongoDB Atlas dashboard, navigate to Access Manager > API Keys or Service Accounts, and create a new service account with the permissions your agents need.Note the Client ID and Client Secret.
2

Connect in OneCLI

Open the OneCLI dashboard, go to Connections > MongoDB Atlas, and enter your Client ID and Client Secret.OneCLI exchanges these for an OAuth2 access token automatically and refreshes it as needed.

What agents can do

AreaExamples
ClustersList, create, modify, and delete clusters
Database UsersManage database users and roles
ProjectsView and manage Atlas projects
OrganizationsRead organization metadata
Network AccessManage IP access lists
BackupsView and manage backup snapshots

Use cases

  • Infrastructure agents that provision and scale MongoDB clusters
  • Database management agents that create users and configure access
  • Monitoring agents that check cluster health and metrics
  • Migration agents that manage backup and restore operations

Controlling access with rules

Use OneCLI’s rules engine to restrict what agents can do. For example, block cluster deletion or rate-limit API calls. Rules are evaluated before credential injection, so a blocked request never reaches the Atlas API.