mongodb:// or mongodb+srv://) and a default database name. It provides document reads, writes, counts, and aggregation pipelines using Extended JSON filters. Use it for operational data sync, event enrichment, analytics pipelines, webhook ingestion, and document-backed agents — complementary to Firestore on Google Cloud or Postgres for relational reporting.
Prerequisites
- A MongoDB deployment (self-hosted, Atlas, or compatible) reachable from AgentRuntime
- A connection URI with credentials (
mongodb://ormongodb+srv://) - A default database name for collection operations
- Database user with
readfor reporting;readWriteonly on collections workflows must modify - Atlas IP allowlist or VPC peering configured if the cluster is network-restricted
- project_contributor access
Connect in AgentRuntime
1
Create a connection
Go to Connections and click New custom connection to create a database connection with your MongoDB URI and default database:Set
URI to the connection string and Database to the default database name (e.g. production). Include authSource in the URI when credentials live in the admin database.2
Add mongodb MCP instance
Go to MCP, click Add instance for mongodb, wire your connection on Instance config, set the profile active, and save.
3
Test with a document count
Add a workflow with mcp_call →
mongodb_count_documents on a known collection. Run it to confirm connectivity before production reads or writes.4
Inspect a sample document (optional)
Run mcp_call →
mongodb_find_one with an empty filter_json on a test collection to verify collection access and field shapes.What you can build
- Lead enrichment — Webhook payload →
mongodb_find_oneexisting contact → merge external API data →mongodb_update_one. - Usage analytics —
mongodb_aggregatepipeline on events → LLM narrative → scheduled Resend digest. - Ticket triage —
mongodb_findopen tickets → LLM priority scoring →mongodb_update_manyto set status. - Approval-gated deletes — human_task before
mongodb_delete_manyon production collections.
Tools
Example
Find recent signups for a welcome workflow:Configuration
Troubleshooting
Related
- Integrations quickstart
- Firestore connector — document store on Google Cloud
- Postgres connector — relational alternative for structured reporting
- Connector catalog
- Troubleshooting