Embed a MongoDB integration in your product
Add MongoDB to your product for your customers, and give your AI agents governed access to it.
A MongoDB integration embedded in your product means a customer's documents stay in their own cluster while your app inserts, updates and reads them, and runs aggregation pipelines to summarize them. Collections, documents and indexes are the units you work with, and no SQL is involved: filters and pipeline stages do that job instead. The genuinely awkward part is that MongoDB enforces no fixed schema, so two documents in one collection can carry different fields, and a field your product depends on may simply be absent from older records. Treating that as per-customer mapping with sensible fallbacks beats discovering it in production. fastn keeps each connection string and credential set per customer and monitors the connector for MongoDB API changes, proposing a tested fix your team approves.
In your product
Embedded for your customers. Per-tenant auth, customized per customer, monitored by fastn.
- Have each customer connect their own cluster, so your product inserts and queries documents in collections they already operate.
- Run an aggregation pipeline on the customer's side so a summary comes back small instead of pulling a whole collection over the wire.
- Map the field names and nesting a customer's documents actually use, including the fields older records are missing.
- React to an inserted or updated document so your product notices a change without polling the collection.
For your AI agents
Governed, audited access for the agents you build, through the MCP server.
- An agent filters a collection to answer a question, restricted to that customer's own database and logged.
- An agent updates a document within the permissions granted, and the fields it changed are recorded.
- An agent runs a permitted aggregation pipeline, and the stages it used are recorded alongside the answer.
Example prompt
Run an aggregation over the orders collection for this month and group the totals by status.
Set up MongoDB in 4 steps
- 01Enable the MongoDB connector from your fastn dashboard.
- 02Have each customer authorize their own MongoDB account, so calls run under their credentials rather than a shared key.
- 03Decide which records, datasets and fields your product needs, map those fields, then enable the actions and triggers you want.
- 04Call it from your product and expose it to your agents through the same governed integration.
Why teams use the MongoDB integration
- Ship a MongoDB integration without building it. Your customers connect their own MongoDB account inside your product and work their records, datasets and fields there, and nothing lands on your team.
- Handle the part that actually costs time: schemas differ per customer and change without notice, and volumes can be large. fastn handles the auth, token refresh, rate limits and pagination, and when MongoDB changes, its maintainer agent proposes a tested fix, so a MongoDB update does not start in your backlog.
Used by these teams
Often used alongside
Tools the same teams tend to run next to MongoDB, across other categories.
More in Data & Storage
Other Data & Storage apps your customers can connect the same way. All Data & Storage integrations
MongoDB integration FAQ
Can AI agents use this MongoDB integration?
Yes, through the fastn MCP gateway, scoped per customer and audited. An agent filters a collection to answer a question, restricted to that customer's own database and logged. For example: "Run an aggregation over the orders collection for this month and group the totals by status."
Does the MongoDB integration adapt when a customer's schema changes?
Schema and field mapping is configuration per customer, so a change on their side is a mapping update rather than a code change and a release on yours.
How are large MongoDB reads handled?
Pagination and throttling are handled for you, and initial backfills are rate-limited so a large import does not exhaust a customer's API allowance.
What can I build with the MongoDB integration?
A common starting point: have each customer connect their own cluster, so your product inserts and queries documents in collections they already operate. The use cases above list the rest.
Add MongoDB to your product
Start free with 3 customer connections. No sales call required, and no per-customer integration code.