> Documentation index: https://metorial.com/llms.txt. Every page is available as Markdown by adding .md to its URL.

# Set up MongoDB Atlas in Metorial for Claude, ChatGPT and Cursor
URL: https://metorial.com/docs/integrations/mongodb-atlas
Last updated: 2026-11-24

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 will 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](https://metorial.com/docs/platform/workforce/portals) with at least one access group
- An account with MongoDB Atlas for each person who connects
- For the CLI steps: the [Metorial CLI](https://metorial.com/docs/platform/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.

1. **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**.

2. **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.

3. **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

1. **Open Shared Resources**

   Open **Workforce**, choose the portal, and select **Shared Resources** under **Access**.

2. **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.

3. **Limit the tools**

   Under **Tool Filters**, set the write and destructive groups to **Reject** if agents should only read from MongoDB Atlas.

4. **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:

```bash
metorial-admin portals access list <portal-id> --type provider_template --search "mongodb atlas"
```

## Employee: connect MongoDB Atlas

### In the portal

1. **Open MongoDB Atlas in the catalog**

   Sign in to your portal and open MongoDB Atlas. The status reads **Available**.

2. **Authenticate**

   Under **Quick setup**, select **Authenticate**. A MongoDB Atlas sign-in tab opens. Sign in and approve the permissions listed.

3. **Confirm**

   The status changes to **Configured**. If it later reads **Needs reconnect**, select **Reconnect** and sign in again.

### With the CLI

```bash
metorial catalog search "mongodb atlas"
metorial setup <catalog-item-id>
```

`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.

```bash
metorial list "mongodb atlas"
metorial client list
metorial install <client-identifier> <integration-id>
```

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](https://metorial.com/docs/platform/guides/tool-permissions).

## Check it worked

```bash
metorial list "mongodb atlas"
metorial tools <integration-id>
metorial call <integration-id> get_cluster_metrics -d '{"action":"list_processes"}'
```

`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. Needs `processId` and `action`.
- `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. Needs `action`.
- `list_events`: Retrieve audit events for a MongoDB Atlas project or organization.
- `list_access_logs`: Return MongoDB Atlas database access history for one cluster. Needs `clusterName`.

### Write tools (10)

- `manage_network_peering`: Manage VPC/VNet network peering connections between MongoDB Atlas and your cloud provider (AWS, Azure, GCP). Needs `action`.
- `manage_alerts`: Create, update, list, or delete alert configurations in a MongoDB Atlas project. Needs `action`.
- `manage_backups`: Manage cloud backup snapshots and restore jobs for MongoDB Atlas clusters. Needs `clusterName` and `action`.
- `manage_online_archive`: Configure Online Archive rules to automatically move infrequently accessed data from Atlas clusters to cheaper cloud object storage. Needs `clusterName` and `action`.
- `manage_ip_access_list`: Manage the IP access list (whitelist) that controls which IP addresses can connect to Atlas clusters in a project. Needs `action`.
- `manage_search_indexes`: Create, update, list, or delete Atlas Search indexes on MongoDB collections. Needs `clusterName` and `action`.
- `manage_database_user`: Create, update, list, or delete database users in a MongoDB Atlas project. Needs `action`.
- `manage_cluster`: Create, update, or retrieve MongoDB Atlas clusters. Needs `action`.
- `manage_flex_cluster`: Create, update, list, retrieve, or delete MongoDB Atlas Flex clusters. Needs `action`.
- `manage_maintenance_window`: Get, update, reset, or defer the MongoDB Atlas maintenance window for a project. Needs `action`.

## 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](https://metorial.com/docs/platform/clients/claude-code), [Cursor](https://metorial.com/docs/platform/clients/cursor), [Codex](https://metorial.com/docs/platform/clients/codex) and [ChatGPT](https://metorial.com/docs/platform/clients/chatgpt): connect each client to your portal and use MongoDB Atlas there
- [Create custom OAuth credentials](https://metorial.com/docs/platform/integrations/create-custom-oauth-credentials): the Provider Auth screens in more detail
- [Tool permissions](https://metorial.com/docs/platform/guides/tool-permissions): tool filters and what employees see
- [MongoDB Atlas on metorial.com](https://metorial.com/integrations/mongodb-atlas): the integration overview