MongoDB is usually reached through a driver, which is fine until something needs the data that cannot use one — a partner integration, a no-code tool, a dashboard, or an AI assistant. At that point somebody writes a thin HTTP service in front of the collections, and that service becomes another thing to deploy and keep alive.
Dataloom replaces it. Connect your cluster, choose the collections you want reachable, and publish REST endpoints with generated documentation. Collections map to endpoints, and documents come back as JSON, which is a short trip given they were JSON-shaped to begin with.
Both MongoDB Atlas and self-hosted deployments work. Dataloom connects with the credentials you provide and queries the cluster directly, so your documents stay in your database.
Connecting MongoDB Atlas or self-hosted
Add a data source pointing at your cluster with the database name and credentials. For Atlas, make sure the Dataloom connection is permitted by your network access rules; for self-hosted deployments, the host simply needs to be reachable. The connection is tested before it is saved.
Dataloom inspects the collections in the database and samples documents to work out the fields available, since MongoDB has no fixed schema to read. You then choose which collections to expose and which fields each endpoint returns, which is what turns a loosely-shaped collection into a predictable API response.
The _id field is handled for you: when a request filters or fetches by _id, Dataloom converts the value to an ObjectId where appropriate, so callers can pass the plain hex string they see in responses.
What you get with MongoDB
- Collections become REST endpoints
- MongoDB Atlas and self-hosted deployments both supported
- ObjectId handled automatically on _id lookups
- Field selection turns schemaless documents into predictable responses
- Filtering with comparison operators, plus sorting and pagination
- Documents returned as JSON, no transformation layer needed
An example endpoint
Recent high-value events for one account.
GET /telemetry/events
?filter={"accountId":"acc_8821","score":{"gte":80}}
&sort=occurredAt&order=desc
&page=1&pageSize=20
X-API-Key: your_api_key{
"data": [
{ "_id": "66f1c0a2e13b4a0012ab34cd", "accountId": "acc_8821",
"type": "checkout.completed", "score": 94,
"occurredAt": "2026-08-16T11:02:41Z" },
{ "_id": "66f1bd77e13b4a0012ab3390", "accountId": "acc_8821",
"type": "cart.updated", "score": 83,
"occurredAt": "2026-08-16T10:48:12Z" }
],
"meta": { "page": 1, "pageSize": 20, "totalCount": 57,
"totalPages": 3, "hasNextPage": true }
}Filtering, sorting and pagination work the same way on every endpoint, whatever the source. See the no-code API builder for how endpoints are put together.
Connect Claude to MongoDB
Publishing a collection endpoint also publishes an MCP tool, so your AI assistant can query MongoDB without a driver, a connection string, or any code in between. New endpoints appear to connected assistants within about a minute.
This is particularly useful for event and activity collections, where the interesting questions are exploratory. Asking for "high-scoring checkout events for this account in the last week" turns into a filtered, sorted call against the endpoint you published rather than an ad-hoc query somebody has to write.
Because you selected the fields each endpoint returns, the assistant sees a stable, documented shape rather than whatever mixture of fields happens to exist across documents — and it only ever sees the collections you chose to publish.
// mcp-config.json
{
"mcpServers": {
"dataloom": {
"url": "https://mcp.dataloom.cloud/w/your-workspace",
"transport": "http"
}
}
}Read more about the hosted MCP server, or follow the step-by-step setup guide.
MongoDB questions, answered
Does Dataloom need a fixed schema?
No. Dataloom samples documents to discover the available fields, then you pick which ones each endpoint returns. That selection is what gives callers a predictable response shape.
How do I fetch a document by _id?
Pass the plain hex string from the response. Dataloom converts it to an ObjectId when querying, so you do not have to construct one yourself.
Does MongoDB Atlas work?
Yes, along with self-hosted deployments. For Atlas, allow the connection in your network access settings and use a database user scoped to the database you are exposing.
Can I write documents through the API?
Yes, on the Starter plan and above you can publish POST, PATCH and DELETE endpoints, subject to the permissions of the database user you connected with.