Skip to Content

MongoDB MCP

Give Cendriix agents read-only access to your MongoDB Atlas cluster.

Overview

Catalog IDmcp-mongodb
Auth methodAtlas connection string (MDB_MCP_CONNECTION_STRING)
Access levelRead-only (enforced by the platform)
Blast radiusHigh — can read business data
Setup time~10 minutes
Regionsus-east-1, eu-west-1

MongoDB MCP vs. the MongoDB Atlas connector

Cendriix has two separate MongoDB integrations. They are not interchangeable, and the credential for one is rejected by the other.

MongoDB MCP (this page)MongoDB Atlas connector
PurposeAgents query your dataIngests cluster/deployment metadata into Cortex
CredentialConnection string — mongodb+srv://…Atlas Admin API key pair (public + private)
WhereSettings → MCPs → MongoDBSettings → Connectors → MongoDB Atlas
DocsThis pageMongoDB connector

Installing this MCP is additive — it does not modify or replace an existing Atlas connector. If you already use the connector, you still need a new connection string here.

Note: Pasting Atlas Admin API keys into this MCP will fail with: “MongoDB MCP needs a database connection string (mongodb+srv://user:pass@cluster/…), not Atlas Admin API keys.” Use the Drivers connection string instead — see Step 3.

Tools

ToolDescription
find_documentsQuery documents in a collection (filter, projection, sort, limit)
aggregateRun an aggregation pipeline
list_collectionsList collections in a database
list_databasesList databases on the cluster

There are no write tools. See Read-only enforcement.

Requirements

  • A MongoDB Atlas cluster reachable on a standard *.mongodb.net hostname
  • A read-only Atlas database user
  • Ability to edit Network Access in Atlas
  • A Cendriix Admin or Owner to install and approve

Self-hosted, on-premises, and private-IP clusters are not reachable from Cendriix cloud. Attempting one returns: “Private or loopback MongoDB hosts cannot be reached from Cendriix cloud.” Contact your Cendriix representative to discuss options for those deployments.

Setup

Step 1 — Create a read-only database user

In Atlas: Database Access → Add New Database User.

  • Authentication method: Password
  • Username: something identifiable, e.g. cendriix-mcp-ro
  • Privileges: Specific Privilege → read on the database(s) you want exposed (preferred), or the built-in readAnyDatabase role for cluster-wide read access

Use a dedicated user rather than an existing application user, so you can audit and revoke Cendriix’s access independently. Whatever you grant here is the hard ceiling on what Cendriix can ever see.

Step 2 — Allow Cendriix network access

Cendriix connects over the MongoDB wire protocol on port 27017 with TLS.

In Atlas: Network Access → IP Access List, and add Cendriix’s egress addresses for your region. Contact Cendriix support or your account representative for the current list — we provide it directly so you always receive up-to-date values.

Important: Cendriix runs across multiple availability zones and a request may exit from any of them, so every address we give you must be added. A partial allowlist produces connections that succeed intermittently and fail otherwise — the hardest failure mode to diagnose.

If your organisation requires that Atlas is never reachable over the public internet, tell us before you begin — private-endpoint connectivity uses a different network path and connection-string format, and must be configured on both sides.

Step 3 — Copy your connection string

In Atlas: Database → Connect → Drivers → Node.js. Copy the string and replace <password> with your Step 1 password:

mongodb+srv://cendriix-mcp-ro:<password>@yourcluster.ab1cd.mongodb.net/?retryWrites=true&w=majority

Optionally append a default database after the host — e.g. …mongodb.net/analytics?retryWrites=true. With a default set, agents may omit the database argument; without one, they must supply it per query.

Treat this string as a credential — it contains a password. Enter it only through the Cendriix UI, never by email or chat.

Step 4 — Install in Cendriix

Go to Settings → MCPs → MongoDB → Install and paste the string into MDB_MCP_CONNECTION_STRING.

Cendriix validates the credential before storing it: it opens a connection and issues a ping. If validation fails you receive an error and nothing is stored, so it is safe to correct the value and retry. On success the string is encrypted and stored in your tenant’s isolated secrets vault.

Step 5 — Approve and verify

Because this MCP is high blast radius, it requires approval if your organisation has enabled “require approval for all MCP updates” under Policies.

Then click Test Connection to run a health check and confirm the four tools are listed.

Read-only enforcement

This MCP is read-only at the platform layer, independently of your Atlas user’s permissions:

  • Write tools (insert_document, update_documents) are rejected before reaching your cluster — “MongoDB MCP write tools are disabled in managed mode.”
  • Aggregation pipelines containing $out or $merge are blocked“Aggregate stage $out is blocked in managed read-only mode.”
  • Only the four tools listed above are exposed.

Combining this with a read-only Atlas user (Step 1) gives two independent layers of protection. We recommend both.

Limits

SettingValue
Documents per query20 default, 100 maximum
Connection timeout10 seconds
ProtocolMongoDB wire protocol over TLS, port 27017

Narrow large result sets with a filter or aggregation pipeline rather than retrieving them in bulk.

Rotation and revocation

  • Rotate — change the Atlas user’s password, then submit the new connection string in Settings → MCPs → MongoDB. The new credential is validated before the old one is discarded.
  • Revoke immediately — delete or disable the database user in Atlas. Access stops at once, independently of Cendriix.
  • Remove — delete the MongoDB MCP under Settings → MCPs to revoke tool access.

Every tool invocation is recorded in your Audit Log.

Troubleshooting

MessageCauseFix
”needs a database connection string … not Atlas Admin API keys”Admin API key pair pastedUse the Drivers connection string (Step 3)
“expected a connection URI starting with mongodb:// or mongodb+srv://Value is not a connection stringRe-copy from Database → Connect → Drivers
”Private or loopback MongoDB hosts cannot be reached”Private/internal hostnameNot supported on managed cloud — contact Cendriix
”Credential probe failed — check connection string and cluster reachability”Cannot reach or authenticateCheck the IP allowlist, password, and that the cluster is not paused
Works intermittentlyPartial IP allowlistAdd every address Cendriix provided (Step 2)
“write tools are disabled in managed mode”A write was attemptedExpected — this MCP is read-only
”Managed MongoDB MCP is disabled for this environment”Not enabled in your regionContact Cendriix support
list_databases shows fewer databases than expectedAtlas user is scopedExpected — widen the Step 1 grant only if intended

Further reading

Last updated on