Set up MongoDB Atlas in Metorial for Claude, ChatGPT and Cursor
Share MongoDB Atlas with your team in Claude, ChatGPT and Cursor through Metorial: OAuth or API key sign-in, 15 tools (5 read-only).
To give your team MongoDB Atlas in Claude, ChatGPT, Cursor and other AI clients, an admin shares the MongoDB Atlas integration in a Metorial portal, and each person signs in to MongoDB Atlas with their own account. Agents can manage MongoDB Atlas cloud database infrastructure programmatically. The integration has 15 tools, 5 read-only and 10 write, plus 2 triggers.
What you'll learn
- How an admin shares MongoDB Atlas in a portal and how each person connects
- The 1 OAuth scope MongoDB Atlas can request, and what each one allows
- How to keep the 5 read-only tools and reject the other 10
Before you start
- A portal with at least one access group
- An account with MongoDB Atlas for each person who connects
- For the CLI steps: the Metorial CLI, signed in to your portal
Sign-in methods
| Method | Type | What a person provides |
|---|---|---|
| Service Account (OAuth 2.0) (default) | OAuth | Signs in to MongoDB Atlas |
| API Key (Digest Auth) | Custom credentials | publicKey and privateKey |
The portal and metorial setup use Service Account (OAuth 2.0) unless someone picks another method.
Service Account (OAuth 2.0)
People sign in to MongoDB Atlas and approve the scopes you allow. The integration can request:
| Scope | Name | What it allows |
|---|---|---|
openid | Full Access | Full access to Atlas Administration API resources scoped to the service account roles |
API Key (Digest Auth)
To connect, a person enters these values:
publicKey: Atlas API public key (username)privateKey: Atlas API private key (password)
Setup settings
Whichever method you pick, setup also asks for:
projectId(optional): Atlas Project (Group) ID. Required for most project-level operations.organizationId(optional): Atlas Organization ID. Required for organization-level operations.
Use your own MongoDB Atlas OAuth app
With your own OAuth app, people see your company's name on the MongoDB Atlas consent screen, and the client ID and secret belong to you.
Start the credentials in Metorial
In the dashboard, select Settings, then Organization Settings. Under Integrations and MCP, select Provider Auth, then Create Auth Credentials. Choose MongoDB Atlas and copy the Redirect URI.
Register the app with MongoDB Atlas
Create an OAuth app or client in MongoDB Atlas and add the redirect URI from Metorial as its redirect or callback URL.
Finish in Metorial
Copy the app's client ID and client secret. Back in Metorial, enter a Name, the Client ID and the Client Secret, review Scopes, and select Create. Then pick these credentials for the MongoDB Atlas integration.
Admin: share MongoDB Atlas in a portal
In the dashboard
Open Shared Resources
Open Workforce, choose the portal, and select Shared Resources under Access.
Share a new integration
Select Share a Resource, then New Integration, and choose MongoDB Atlas. Under Auth Method, keep Service Account (OAuth 2.0) or pick another. For how members connect, choose Each person connects, so everyone signs in to MongoDB Atlas as themselves.
Limit the tools
Under Tool Filters, set the write and destructive groups to Reject if agents should only read from MongoDB Atlas.
Choose who gets it
Add the access groups that should see MongoDB Atlas. When a person asks for access from the portal, the request appears under Access Requests.
With the CLI
The CLI cannot create the per-user MongoDB Atlas integration. Once it exists, check which groups have it:
Employee: connect MongoDB Atlas
In the portal
Open MongoDB Atlas in the catalog
Sign in to your portal and open MongoDB Atlas. The status reads Available.
Authenticate
Under Quick setup, select Authenticate. A MongoDB Atlas sign-in tab opens. Sign in and approve the permissions listed.
Confirm
The status changes to Configured. If it later reads Needs reconnect, select Reconnect and sign in again.
With the CLI
catalog search prints the catalog item ID. metorial setup uses Service Account (OAuth 2.0). To connect with API Key (Digest Auth) instead, find its ID with metorial catalog get <catalog-item-id> and add --auth-method <auth-method-id>.
Add it to your AI client
metorial install adds your MongoDB Atlas connection to a local MCP client such as Claude Code, Cursor or Codex. metorial list prints the integration ID and metorial client list the client identifiers.
For a client that takes a server URL, such as ChatGPT, metorial install custom <integration-id> creates an installation token and shows the endpoint details.
Make it read-only
Open the integration's Tool Filters and set the write and destructive groups to Reject. Agents keep the 5 read-only tools, such as list_events and list_projects, and lose the 10 write tools, such as manage_alerts or manage_backups.
Employees see the result on the integration's page in the portal under Tool access. For the full walkthrough, see Tool permissions.
Check it worked
metorial tools lists the 15 tools, minus any you rejected. get_cluster_metrics needs action, so replace the placeholders. It retrieves performance metrics and monitoring data for MongoDB Atlas cluster processes.
To see every input a tool takes, run metorial schema <integration-id> <tool-key>.
Tools
Read-only tools (5)
get_performance_advisor: Retrieve performance optimization recommendations from the Atlas Performance Advisor. NeedsprocessIdandaction.list_projects: Lists all MongoDB Atlas projects (groups) accessible to the authenticated user.get_cluster_metrics: Retrieve performance metrics and monitoring data for MongoDB Atlas cluster processes. Needsaction.list_events: Retrieve audit events for a MongoDB Atlas project or organization.list_access_logs: Return MongoDB Atlas database access history for one cluster. NeedsclusterName.
Write tools (10)
manage_network_peering: Manage VPC/VNet network peering connections between MongoDB Atlas and your cloud provider (AWS, Azure, GCP). Needsaction.manage_alerts: Create, update, list, or delete alert configurations in a MongoDB Atlas project. Needsaction.manage_backups: Manage cloud backup snapshots and restore jobs for MongoDB Atlas clusters. NeedsclusterNameandaction.manage_online_archive: Configure Online Archive rules to automatically move infrequently accessed data from Atlas clusters to cheaper cloud object storage. NeedsclusterNameandaction.manage_ip_access_list: Manage the IP access list (whitelist) that controls which IP addresses can connect to Atlas clusters in a project. Needsaction.manage_search_indexes: Create, update, list, or delete Atlas Search indexes on MongoDB collections. NeedsclusterNameandaction.manage_database_user: Create, update, list, or delete database users in a MongoDB Atlas project. Needsaction.manage_cluster: Create, update, or retrieve MongoDB Atlas clusters. Needsaction.manage_flex_cluster: Create, update, list, retrieve, or delete MongoDB Atlas Flex clusters. Needsaction.manage_maintenance_window: Get, update, reset, or defer the MongoDB Atlas maintenance window for a project. Needsaction.
Triggers
MongoDB Atlas has 2 triggers, which fire on events in MongoDB Atlas:
alert_notification: Receives alert notifications from MongoDB Atlas via webhook when alert conditions are triggered.project_events: [Polling fallback] Polls for new events in a MongoDB Atlas project.
Next steps
- Claude Code, Cursor, Codex and ChatGPT: connect each client to your portal and use MongoDB Atlas there
- Create custom OAuth credentials: the Provider Auth screens in more detail
- Tool permissions: tool filters and what employees see
- MongoDB Atlas on metorial.com: the integration overview