Live survey304 models · 14 providers · 23,592 auditsAudited implement · SAFE →What changedHow we verifyllms.txt

MCP server · Org-owned · Audited from source

MongoDB MCP server

by mongodb-js/mongodb-mcp-serverApache-2.0 licenceAudited 25 Sep 2026 · source ddedafa6e442

npm @mongodb-js/mcp-ui 3.0.4stdiostreamable-http★ 1,137
✕BLOCKGrade F · 55/100 · 25 Sep 2026 · ddedafa

Is it safe? No — BLOCK, grade F (55/100). It exposes 43 tools: 26 read, 13 write and 4 destructive. The audit recorded 40 findings (0 critical, 1 high, 10 medium, 28 low). Maintainer's description: A Model Context Protocol server to connect to MongoDB databases and MongoDB Atlas Clusters.

Ask an AI about this pageGChatGPTCClaudePPerplexityGeGeminiXGrok
More
Cite

Cite this page

ModelsAtlas. “MongoDB MCP server (mongodb-js/mongodb-mcp-server)”. Retrieved 25 Sep 2026. https://modelsatlas.com/mcp/mongodb-js/mongodb-3

Why this is BLOCK. The audit found 0 critical and 1 high findings; the most severe is Code injection at packages/setup/src/aiTool.ts:295. Each finding is listed below with its file and line.

Why this page is still public. People search for this server by name. Hiding it would leave them with the README's word alone; here they see what the code does. We list it so you can decide, and we do not show connect commands for BLOCK servers.

2 MCP servers are called MongoDB. You are viewing mongodb-js/mongodb-mcp-server. Compare all 2 →

Trust audit

Audit 0.4.1 · full source read 25 Sep 2026

Trust score55/100✕BLOCK F
0 critical1 high10 medium28 low1 info

40 findings, listed below with the file and line each was found on. Grade A needs a sandboxed behavioural run too; this audit read the source only.

What the source does

  • FilesystemDeclared6 observations
  • NetworkDeclared4 observations
  • ShellDeclared4 observations
  • DependenciesNot pinnedSome ranges float
  • SecretsFoundSee the findings

Findings (40)

Sorted by severity · the 25 most severe of 40 are listed

HIGHCode injectioncode.eval_exec · packages/setup/src/aiTool.ts:295
F-02 Code injectionCWE-78 · CWE-94 · CWE-95Layer L1
exec(cmd, (error) => {
Why
evaluates text as code
Fix
remove; use a parser or a dispatch table
MEDIUMNetwork egressnet.raw_ip · packages/mongodb-atlas-mcp-remote/src/testHelpers/mockRemote.ts:28
F-04 Network egressCWE-200 · CWE-319Layer L1
const instance = new MockRemote(`http://127.0.0.1:${port}`, server);
Why
No further detail recorded for this rule.
Fix
—
MEDIUMHard-coded secretssecret.db_uri · packages/integration-tests/src/common/connectionInfo.test.ts:54
F-03 Hard-coded secretsCWE-798 · CWE-321Layer L1

Excerpt withheld: it is a secret, and we never print one.

Why
No further detail recorded for this rule.
Fix
—
MEDIUMHard-coded secretssecret.db_uri · packages/logging/src/diskLogger.test.ts:96
F-03 Hard-coded secretsCWE-798 · CWE-321Layer L1

Excerpt withheld: it is a secret, and we never print one.

Why
No further detail recorded for this rule.
Fix
—
MEDIUMHard-coded secretssecret.db_uri · packages/logging/src/redactingLoggerBase.test.ts:89
F-03 Hard-coded secretsCWE-798 · CWE-321Layer L1

Excerpt withheld: it is a secret, and we never print one.

Why
No further detail recorded for this rule.
Fix
—
MEDIUMHard-coded secretssecret.db_uri · packages/tools-mongodb/src/common/connectionEntry.test.ts:173
F-03 Hard-coded secretsCWE-798 · CWE-321Layer L1

Excerpt withheld: it is a secret, and we never print one.

Why
No further detail recorded for this rule.
Fix
—
MEDIUMHard-coded secretssecret.generic · packages/tools-atlas/src/tools/create/createDBUser.test.ts:116
F-03 Hard-coded secretsCWE-798 · CWE-321Layer L1

Excerpt withheld: it is a secret, and we never print one.

Why
No further detail recorded for this rule.
Fix
—
MEDIUMHard-coded secretssecret.private_key · packages/integration-tests/src/fixtures/server.key:1
F-03 Hard-coded secretsCWE-798 · CWE-321Layer L1

Excerpt withheld: it is a secret, and we never print one.

Why
No further detail recorded for this rule.
Fix
—
MEDIUMHard-coded secretssecret.private_key · packages/tools-atlas/src/helpers/redactSensitiveKeys.test.ts:19
F-03 Hard-coded secretsCWE-798 · CWE-321Layer L1

Excerpt withheld: it is a secret, and we never print one.

Why
No further detail recorded for this rule.
Fix
—
MEDIUMHard-coded secretssecret.private_key · packages/tools-atlas/src/helpers/redactSensitiveKeys.test.ts:29
F-03 Hard-coded secretsCWE-798 · CWE-321Layer L1

Excerpt withheld: it is a secret, and we never print one.

Why
No further detail recorded for this rule.
Fix
—
MEDIUMFilesystem / pathmcp.destructive_tools
F-05 Filesystem / pathCWE-22 · CWE-59Layer L3
delete-many, drop-collection, drop-database, drop-index
Why
4 tool(s) can delete or overwrite
Fix
prefer a read-only mode or scoped tokens; the page states the blast radius
LOWInventory / provenanceinv.hidden_file · .prettierignore
F-13 Inventory / provenanceCWE-1104Layer L0
.prettierignore
Why
hidden member outside the usual dotfiles
Fix
review its purpose
LOWInventory / provenanceinv.hidden_file · .prettierrc.json
F-13 Inventory / provenanceCWE-1104Layer L0
.prettierrc.json
Why
hidden member outside the usual dotfiles
Fix
review its purpose
LOWCode injectioncode.eval_exec · packages/tools-atlas/src/tools/create/createAccessList.test.ts:73
F-02 Code injectionCWE-78 · CWE-94 · CWE-95Layer L1
const result = await exec({
Why
evaluates text as code
Fix
remove; use a parser or a dispatch table
LOWCode injectioncode.eval_exec · packages/tools-atlas/src/tools/create/createAccessList.test.ts:96
F-02 Code injectionCWE-78 · CWE-94 · CWE-95Layer L1
const result = await exec({
Why
evaluates text as code
Fix
remove; use a parser or a dispatch table
LOWCode injectioncode.eval_exec · packages/tools-atlas/src/tools/create/createAccessList.test.ts:113
F-02 Code injectionCWE-78 · CWE-94 · CWE-95Layer L1
await expect(exec({ projectId })).rejects.toThrow(ToolArgumentValidationError);
Why
evaluates text as code
Fix
remove; use a parser or a dispatch table
LOWCode injectioncode.eval_exec · packages/tools-atlas/src/tools/create/createAccessList.test.ts:114
F-02 Code injectionCWE-78 · CWE-94 · CWE-95Layer L1
await expect(exec({ projectId })).rejects.toThrow(
Why
evaluates text as code
Fix
remove; use a parser or a dispatch table
LOWFilesystem / pathfs.traversal · packages/browser-tests/vitest.config.ts:34
F-05 Filesystem / pathCWE-22 · CWE-59Layer L1
reportsDirectory: "../../coverage/packages/browser-tests",
Why
No further detail recorded for this rule.
Fix
—
LOWFilesystem / pathfs.traversal · packages/integration-tests/src/build.test.ts:9
F-05 Filesystem / pathCWE-22 · CWE-59Layer L1
const projectRoot = path.resolve(currentDir, "../../..");
Why
No further detail recorded for this rule.
Fix
—
LOWFilesystem / pathfs.traversal · packages/integration-tests/src/tools/assistant/assistantHelpers.ts:1
F-05 Filesystem / pathCWE-22 · CWE-59Layer L1
import { setupIntegrationTest, defaultTestConfig } from "../../integrationHelpers.js";
Why
No further detail recorded for this rule.
Fix
—
LOWFilesystem / pathfs.traversal · packages/integration-tests/src/tools/assistant/assistantHelpers.ts:3
F-05 Filesystem / pathCWE-22 · CWE-59Layer L1
import type { IntegrationTest } from "../../integrationHelpers.js";
Why
No further detail recorded for this rule.
Fix
—
LOWFilesystem / pathfs.traversal · packages/integration-tests/src/tools/assistant/listKnowledgeSources.test.ts:7
F-05 Filesystem / pathCWE-22 · CWE-59Layer L1
} from "../../integrationHelpers.js";
Why
No further detail recorded for this rule.
Fix
—
LOWNetwork egressnet.raw_ip · README.md:624
F-04 Network egressCWE-200 · CWE-319Layer L1
curl http://0.0.0.0:8080/health
Why
No further detail recorded for this rule.
Fix
—
LOWNetwork egressnet.raw_ip · packages/integration-tests/src/transports/streamableHttp.test.ts:459
F-04 Network egressCWE-200 · CWE-319Layer L1
expect(runner["monitoringServer"]!.serverAddress).toEqual("http://127.0.0.1:3001");
Why
No further detail recorded for this rule.
Fix
—
LOWNetwork egressnet.raw_ip · packages/integration-tests/src/transports/streamableHttp.test.ts:523
F-04 Network egressCWE-200 · CWE-319Layer L1
expect(runner["monitoringServer"]!.serverAddress).toEqual("http://127.0.0.1:3001");
Why
No further detail recorded for this rule.
Fix
—

Tools it exposes

43 declared in source · 4 destructive

26 read13 write4 destructive

4 tools can delete or overwrite. An agent that can be talked into calling a tool can be talked into calling this one, so give it a token scoped to what you need.

ToolWhat it doesRisk
delete-manyRemoves all documents that match the filter from a MongoDB collectiondestructive
drop-collectionRemoves a collection or view from the database. The method also removes any indexes associated with the dropped collection.destructive
drop-databaseRemoves the specified database, deleting the associated data filesdestructive
drop-indexDrop an index for the provided database and collection.destructive
aggregateRun an aggregation against a MongoDB collectionwrite
aggregate-dbRun an aggregation against a MongoDB databasewrite
create-collectionCreates a new collection in a database. If the database doesnwrite
create-indexCreate an index for a collectionwrite
findRun a find query against a MongoDB collectionwrite
insert-manyInsert an array of documents into a MongoDB collection. If the list of documents is above com.mongodb/maxRequestPayloadBytes, consider inserting them in batches.write
methodThe method and its arguments to runwrite
pipelineAn array of aggregation stages to execute. The first stage must be a database-level aggregation stage (one ofwrite
rename-collectionRenames a collection in a MongoDB databasewrite
sortA document, describing the sort order, matching the syntax of the sort argument of cursor.sort(). The keys of the object are the fields to sort on, while the values are the sort directions (1 for ascending, -1 for descending).write
updateAn update document describing the modifications to apply using update operator expressionswrite
update-manyUpdates all documents that match the specified filter for a collection. If the list of documents is above com.mongodb/maxRequestPayloadBytes, consider updating them in batches.write
upsertControls whether to insert a new document if no documents match the filterwrite
atlas-local-connect-deploymentConnect to a MongoDB Atlas Local deployment and get back a connectionId to pass to the other MongoDB toolsread
collection-indexesDescribe the indexes for a collectionread
collection-schemaDescribe the schema for a collectionread
collection-storage-sizeGets the size of the collectionread
connectConnect to a MongoDB instance and get back a connectionId to pass to the other MongoDB tools. Each call establishes a new, independent connection — multiple connections can be active at the same time.read
connectionNameOptional short label for the connection (stored slugified with a short suffix, e.g.read
connectionStringMongoDB connection string (in the mongodb:// or mongodb+srv:// format)read
countGets the number of documents in a MongoDB collection using db.collection.count() and query as an optional filter parameterread
db-statsReturns statistics that reflect the use state of a single databaseread
dropTargetIf true, drops the target collection if it existsread
explainReturns statistics describing the execution of the winning plan chosen by the query optimizer for the evaluated methodread
exportExport a query or aggregation results in the specified EJSON format.read
exportTitleA short description to uniquely identify the export.read
filterThe query filter, matching the syntax of the query argument of db.collection.find()read
limitThe maximum number of results to returnread
list-collectionsList all collections for a given databaseread
list-knowledge-sourcesList available data sources in the MongoDB Assistant knowledge base. Use this to explore available data sources or to find search filter parameters to use in search-knowledge.read
mock-project-toolMock toolread
mongodb-logsReturns the most recent logged mongod eventsread
newNameThe new name for the collectionread
projectionThe projection, matching the syntax of the projection argument of db.collection.find()read
queryA natural language query to search for in the MongoDB Assistant knowledge base. This should be a single question or a topic that is relevant to the userread
responseBytesLimitThe maximum number of bytes to return in the response. This value is capped by the serverread
search-knowledgeSearch for information in the MongoDB Assistant knowledge base. This includes official documentation, curated expert guidance, and other resources provided by MongoDB. Supports filtering by data source and version.read
typeThe type of logs to return. Global returns all recent log entries, while startupWarnings returns only warnings and errors from when the process started.read
verbosityThe verbosity of the explain plan, defaults to queryPlanner. If the user wants to know how fast is a query in execution time, use executionStats. It supports all verbosities as defined in the MongoDB Driver.read

Safer alternatives

All databases servers →

Audit history

  1. ✕BLOCK F 55 / 100

    First audit · ddedafa6e442

README badge

Badges show the current verdict, BLOCK included

ModelsAtlas: BLOCK FMODELSATLASBLOCK · F

A badge cannot be hidden by the maintainer while the verdict is BLOCK. Fix the findings, push, and the re-audit updates it.

Questions about MongoDB MCP server

What is the MongoDB MCP server?
A Model Context Protocol server to connect to MongoDB databases and MongoDB Atlas Clusters.
What tools does MongoDB expose?
43 in total: 26 read-only, 13 that write, and 4 that can delete or overwrite (delete-many, drop-collection, drop-database, drop-index). Every one is listed on this page with its risk.
Is MongoDB safe to connect to an agent?
No — not without reading the findings first. The audit graded it F (55/100) and found 1 critical or high issue in the source. Each one is listed on this page with the file and line it is on. Separately from the audit: 4 of its tools can destroy data, so scope the token you give it to what you actually need.
What credentials does MongoDB need?
It reads BRAINTRUST_API_KEY, BRAINTRUST_API_KEY_OVERRIDE, GROVE_API_KEY, MDB_API_CLIENT_SECRET, MDB_AZURE_OPEN_AI_API_KEY, MDB_GEMINI_API_KEY, MDB_GROVE_API_KEY, MDB_MCP_API_CLIENT_ID, MDB_MCP_API_CLIENT_SECRET, MDB_MCP_AZURE_CMK_KEY_IDENTIFIER, MDB_MCP_AZURE_CMK_KEY_VAULT_NAME and MDB_MCP_CONNECTION_STRING from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does MongoDB run?
It speaks stdio and streamable-http, so it runs as a local process your client starts. It is published on npm as @mongodb-js/mcp-ui at 3.0.4.
How current is this page?
The grade is for one exact copy of the source (ddedafa6e442), read on 2026-09-25. The repository is watched and re-audited when it changes.
Which MongoDB MCP server is the right one?
mongodb-developer/mongodb-mcp-server. 2 servers share the name; see the side-by-side comparison.
I already installed MongoDB. What should I do?
Remove it from your client's MCP configuration, then rotate any API keys and tokens that were in your environment while it ran.
Can the verdict change?
Yes. The repository is watched and re-audited when its source changes. If the findings are removed the verdict updates, and the history on this page shows it.

Sources

  • mongodb-js/mongodb-mcp-server on GitHub — the source we read, its licence, stars and activityObserved · 25 Sep 2026
  • ModelsAtlas trust audit — BLOCK verdict for commit ddedafa6e442Observed · 25 Sep 2026

Spotted something wrong? Report a correction · Methodology

Keep going in your AI

Opens with this page as the source. We add nothing else to the prompt.