MongoDBSAFE
A Model Context Protocol server providing read-only access to MongoDB databases, letting LLMs inspect collection schemas and run aggregation pipelines.
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
📢 COMMUNITY SERVER NOTICE This is a community-maintained MCP Server. 👉 For the official MongoDB MCP Server, visit mongodb-js/mongodb-mcp-server
A Model Context Protocol server that provides read-only access to MongoDB databases. This server enables LLMs to inspect collection schemas and execute aggregation pipelines.
Components
Tools
- aggregate
- Execute MongoDB aggregation pipelines against the connected database
- Input:
collection(string): The collection to querypipeline(array): MongoDB aggregation pipeline stagesoptions(object): Optional aggregation settingsallowDiskUse(boolean): Allow operations that require disk usagemaxTimeMS(number): Maximum execution time in millisecondscomment(string): Comment to identify the operation- Default limit of 1000 documents if no limit stage is specified
- Default timeout of 30 seconds
- explain
- Get execution plans for aggregation pipelines
- Input:
collection(string): The collection to analyzepipeline(array): MongoDB aggregation pipeline stagesverbosity(string): Detail level of the explanation- Options: "queryPlanner", "executionStats", "allPlansExecution"
- Default: "queryPlanner"
Resources
The server provides schema information for each collection in the database:
- Collection Schemas (
mongodb:////schema) - Inferred JSON schema information for each collection
- Includes field names and data types
- Schema is derived from sampling collection documents
Usage with Claude Desktop
To use this server with the Claude Desktop app, add the following configuration to the "mcpServers" section of your claude_desktop_config.json:
"mongodb": {
"command": "npx",
"args": [
3caf958b66a7OBSERVED · 2026-10-08Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control.
claude mcp add mongodb-mcp-server -- npx -y @pash1986/[email protected]
{
"mcpServers": {
"mongodb-mcp-server": {
"command": "npx",
"args": [
"-y",
"@pash1986/[email protected]"
]
}
}
}Exposed tools (3)
2 read · 1 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
aggregate | write | Run a MongoDB aggregation pipeline |
explain | read | Get the execution plan for an aggregation pipeline |
sample | read | Get random sample documents from a collection |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (2)
axios, dotenv, mongodb, @types/mongodb, @types/node, typescript
Gates applied: no_behavioural_pass, no_license.
3caf958b66a7full audit observations/trust-audit/mcp-server/mongodb-developer__mongodb.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-08 | 3caf958b66a7 | SAFE | B | 89 | first audit |
Questions
What is the MongoDB MCP server?
A Model Context Protocol server providing read-only access to MongoDB databases, letting LLMs inspect collection schemas and run aggregation pipelines.
What tools does MongoDB expose?
3 in total: 2 read-only, 1 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is MongoDB safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.
What credentials does MongoDB need?
No credential environment variables were found in its source, so it appears to need none.
How does MongoDB run?
It speaks stdio, so it runs as a local process your client starts. It is published on npm as @pash1986/mongodb-mcp-server at 0.1.7.
How current is this page?
The grade is for one exact copy of the source (3caf958b66a7), read on 2026-10-08. The repository is watched and re-audited when it changes.