> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paradime.io/llms.txt
> Use this file to discover all available pages before exploring further.

# MongoDB

> Connect MongoDB to Paradime so DinoAI can browse databases and collections, infer schemas, and run read-only find and aggregation queries while you model data.

[MongoDB](https://www.mongodb.com/) is a document database for storing JSON-like data. Connecting it lets DinoAI explore your MongoDB instance and use it as context while you model and analyse your data.

## What you can do

Once connected, DinoAI can explore your MongoDB instance on your behalf using the [MongoDB Tools](/products/dino-ai/tools-and-features/warehouse-tool/mongodb-tools):

* List the databases and collections in the connected instance.
* Infer a collection's schema by sampling documents, and detect schema drift.
* Run read-only `find`, `count`, and aggregation queries to understand your data.
* Inspect collection indexes and database storage statistics.

<Info>
  The MongoDB Tools are available in DinoAI **Copilot** only. Queries are read-only: aggregation stages that mutate data or run server-side code (for example `$out`, `$merge`, `$function`) are always rejected.
</Info>

## Prerequisites

* A running MongoDB instance (self-hosted or MongoDB Atlas) reachable from Paradime.
* A MongoDB user with read access to the databases you want DinoAI to explore.
* Your MongoDB [connection string](https://www.mongodb.com/docs/manual/reference/connection-string/).

## Connect MongoDB to Paradime

Paradime connects to MongoDB through the `MONGODB_CONNECTION_STRING` environment variable. Once it is set, the MongoDB Tools become available to DinoAI automatically.

### Step 1: Get your connection string

Use a standard MongoDB connection URI, including credentials:

* Standard: `mongodb://<user>:<password>@<host>:<port>/`
* Atlas / SRV: `mongodb+srv://<user>:<password>@<cluster>.mongodb.net/`

If you use MongoDB Atlas, allow the [Paradime IP address](/developers/ip-restrictions) in your Atlas network access list so Paradime can reach your cluster.

### Step 2: Add the environment variable in Paradime

Add `MONGODB_CONNECTION_STRING` as a [Code IDE environment variable](/products/settings/environment-variables/code-ide-env-variables) for your own sessions, or as a [Workspace environment variable](/products/settings/environment-variables/index) to share it across the workspace.

| Variable                    | Required | Description                                                                                                      |
| --------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------- |
| `MONGODB_CONNECTION_STRING` | ✅        | A MongoDB connection URI including host and credentials, e.g. `mongodb+srv://user:password@cluster.mongodb.net/` |

Once the variable is saved, ask DinoAI to list your MongoDB databases to confirm the connection.


## Related topics

- [DinoAI Tools](/products/dino-ai/tools-and-features/index.md)
- [MongoDB Tools](/products/dino-ai/tools-and-features/warehouse-tool/mongodb-tools.md)
- [Integrations](/integrations/index.md)
- [Tools Reference](/products/dino-ai/programmable-agents/tools-reference.md)
