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.
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.
The MongoDB Atlas connect window in OneCLI.
OneCLI exchanges these for an OAuth2 access token automatically and refreshes it as needed.
Access is per agent: grant the connection to each agent that needs it, choosing per tool what runs freely, what needs human approval, and what stays blocked — a read-only agent is a single grant. Organization rules add guardrails on top, like rate limits and blanket blocks. Everything is checked before credential injection, so a blocked request never reaches the Atlas API.