Skip to main content
Connect Adapt to MongoDB to query your collections and analyze your documents using natural language. Adapt connects to your database through a standard connection string, so you can explore collections and pull insights without writing queries by hand.

Set up credentials

Adapt connects to MongoDB using a connection string (URI). MongoDB Atlas uses the mongodb+srv:// format, and self-hosted deployments typically use mongodb://.
1

Create a read-only database user (recommended)

In MongoDB Atlas, go to Database Access and add a database user with a read-only role (for example readAnyDatabase, or read on a specific database) rather than an admin account. Note the username and password.
2

Allowlist network access

In Atlas, go to Network Access and add the IP addresses that need to connect so Adapt can reach your cluster.
3

Copy your connection string

In Atlas, go to Database > Clusters, click Connect, choose Drivers, and copy the connection string. It looks like:
mongodb+srv://<username>:<password>@cluster0.example.mongodb.net/?retryWrites=true&w=majority
Replace <username> and <password> with your database user’s credentials. For self-hosted deployments, use your mongodb://host:27017/... URI. Any special characters in the password must be percent-encoded.
The mongodb+srv:// format resolves your cluster’s hosts automatically. Use the plain mongodb:// format for standalone or self-managed servers.

Connect to Adapt

1

Open Integrations

In Adapt, go to Settings > Integrations.
2

Find MongoDB

Search for MongoDB and select it from the catalog.
3

Start the connection

Click Connect to open the connection form.
4

Add your credentials

Enter the values you gathered above, then click Add connection:
Secret NameValue
MONGODB_URIYour MongoDB connection string
You can rename the connection and choose whether it is shared with your organization or kept personal to you.
5

Test the connection

Ask Adapt to list your collections or query your data.

Security

  • Credentials are encrypted at rest with AES-256
  • Use a dedicated database user with a read-only role
  • Restrict network access with an IP access list and allowlist only trusted addresses
  • Connect over TLS, which is enabled by default for Atlas mongodb+srv:// connections
  • Never share your connection string publicly or commit it to source control

Capabilities

Adapt can query your MongoDB database. Explore your collections and analyze your documents using natural language.

Examples

Explore data:
What collections are in my MongoDB database?
Inspect documents:
Show me a sample document from the orders collection.
Summarize records:
How many users were created in the last 30 days?
Analyze trends:
What are the top 10 products by order count this month?