MongoDB MCP
Give Cendriix agents read-only access to your MongoDB Atlas cluster.
Overview
| Catalog ID | mcp-mongodb |
| Auth method | Atlas connection string (MDB_MCP_CONNECTION_STRING) |
| Access level | Read-only (enforced by the platform) |
| Blast radius | High — can read business data |
| Setup time | ~10 minutes |
| Regions | us-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 | |
|---|---|---|
| Purpose | Agents query your data | Ingests cluster/deployment metadata into Cortex |
| Credential | Connection string — mongodb+srv://… | Atlas Admin API key pair (public + private) |
| Where | Settings → MCPs → MongoDB | Settings → Connectors → MongoDB Atlas |
| Docs | This page | MongoDB 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
| Tool | Description |
|---|---|
find_documents | Query documents in a collection (filter, projection, sort, limit) |
aggregate | Run an aggregation pipeline |
list_collections | List collections in a database |
list_databases | List databases on the cluster |
There are no write tools. See Read-only enforcement.
Requirements
- A MongoDB Atlas cluster reachable on a standard
*.mongodb.nethostname - 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 →
readon the database(s) you want exposed (preferred), or the built-inreadAnyDatabaserole 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=majorityOptionally 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
$outor$mergeare blocked — “Aggregate stage$outis 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
| Setting | Value |
|---|---|
| Documents per query | 20 default, 100 maximum |
| Connection timeout | 10 seconds |
| Protocol | MongoDB 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
| Message | Cause | Fix |
|---|---|---|
| ”needs a database connection string … not Atlas Admin API keys” | Admin API key pair pasted | Use the Drivers connection string (Step 3) |
“expected a connection URI starting with mongodb:// or mongodb+srv://” | Value is not a connection string | Re-copy from Database → Connect → Drivers |
| ”Private or loopback MongoDB hosts cannot be reached” | Private/internal hostname | Not supported on managed cloud — contact Cendriix |
| ”Credential probe failed — check connection string and cluster reachability” | Cannot reach or authenticate | Check the IP allowlist, password, and that the cluster is not paused |
| Works intermittently | Partial IP allowlist | Add every address Cendriix provided (Step 2) |
| “write tools are disabled in managed mode” | A write was attempted | Expected — this MCP is read-only |
| ”Managed MongoDB MCP is disabled for this environment” | Not enabled in your region | Contact Cendriix support |
list_databases shows fewer databases than expected | Atlas user is scoped | Expected — widen the Step 1 grant only if intended |
Further reading
- MCP Marketplace — browse and install MCPs
- MongoDB Atlas connector — the separate metadata-ingest integration
- Policies & Guardrails — approval gates and blast radius
- MongoDB Atlas: connect to a cluster