Atlas / MCP servers / mongodb-developer / MongoDB

MongoDBSAFE

mcp/mongodb-developer/mongodb

A Model Context Protocol server providing read-only access to MongoDB databases, letting LLMs inspect collection schemas and run aggregation pipelines.

Verdict
SAFE
Grade
B
Trust score
89 /100
Exposed tools
3 2r · 1w · 0d
Transport
stdio
License
—
Stars
27
01

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 query
  • pipeline (array): MongoDB aggregation pipeline stages
  • options (object): Optional aggregation settings
  • allowDiskUse (boolean): Allow operations that require disk usage
  • maxTimeMS (number): Maximum execution time in milliseconds
  • comment (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 analyze
  • pipeline (array): MongoDB aggregation pipeline stages
  • verbosity (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": [
Read from source at commit 3caf958b66a7OBSERVED · 2026-10-08
02

Connect

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-code
claude mcp add mongodb-mcp-server -- npx -y @pash1986/[email protected]
claude-desktop
{
  "mcpServers": {
    "mongodb-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@pash1986/[email protected]"
      ]
    }
  }
}
03

Exposed tools (3)

2 read · 1 write · 0 destructive.

ToolRiskDescription
aggregatewriteRun a MongoDB aggregation pipeline
explainreadGet the execution plan for an aggregation pipeline
samplereadGet random sample documents from a collection
04

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.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codePASS
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfacePASS
L4Behavioural (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)

LOWInventory / provenance · inv.no_license · CWE-1104
Why it matters. no LICENSE file and no repo licence
Fix. add a licence
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
package.json
axios, dotenv, mongodb, @types/mongodb, @types/node, typescript
Why it matters. 6 dependency range(s) float
Fix. pin exact versions or ship a lockfile

Gates applied: no_behavioural_pass, no_license.

Audited 2026-10-08 · audit v0.4.1 · source sha 3caf958b66a7full audit observations/trust-audit/mcp-server/mongodb-developer__mongodb.json · Report an issue / request a re-scan
05

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-10-083caf958b66a7SAFEB89first audit
06

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.

Advertisement