MCP server · Org-owned · Audited from source
MongoDB MCP server
by mongodb-js/mongodb-mcp-serverApache-2.0 licenceAudited 25 Sep 2026 · source ddedafa6e442
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.
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 →
- mongodb-developer/mongodb-mcp-server Org-owned★ 27✓SAFE
- mongodb-js/mongodb-mcp-server Org-owned★ 1,137✕BLOCK
Trust audit
Audit 0.4.1 · full source read 25 Sep 2026
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
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
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
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
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
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
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
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
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
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
Excerpt withheld: it is a secret, and we never print one.
- Why
- No further detail recorded for this rule.
- Fix
- —
MEDIUMFilesystem / pathmcp.destructive_tools
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
LOWCode injectioncode.eval_exec · packages/tools-atlas/src/tools/create/createAccessList.test.ts:73
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
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
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
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
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
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
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
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
} from "../../integrationHelpers.js";
- Why
- No further detail recorded for this rule.
- Fix
- —
LOWNetwork egressnet.raw_ip · README.md:624
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
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
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
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.
| Tool | What it does | Risk |
|---|---|---|
delete-many | Removes all documents that match the filter from a MongoDB collection | destructive |
drop-collection | Removes a collection or view from the database. The method also removes any indexes associated with the dropped collection. | destructive |
drop-database | Removes the specified database, deleting the associated data files | destructive |
drop-index | Drop an index for the provided database and collection. | destructive |
aggregate | Run an aggregation against a MongoDB collection | write |
aggregate-db | Run an aggregation against a MongoDB database | write |
create-collection | Creates a new collection in a database. If the database doesn | write |
create-index | Create an index for a collection | write |
find | Run a find query against a MongoDB collection | write |
insert-many | Insert an array of documents into a MongoDB collection. If the list of documents is above com.mongodb/maxRequestPayloadBytes, consider inserting them in batches. | write |
method | The method and its arguments to run | write |
pipeline | An array of aggregation stages to execute. The first stage must be a database-level aggregation stage (one of | write |
rename-collection | Renames a collection in a MongoDB database | write |
sort | A 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 |
update | An update document describing the modifications to apply using update operator expressions | write |
update-many | Updates 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 |
upsert | Controls whether to insert a new document if no documents match the filter | write |
atlas-local-connect-deployment | Connect to a MongoDB Atlas Local deployment and get back a connectionId to pass to the other MongoDB tools | read |
collection-indexes | Describe the indexes for a collection | read |
collection-schema | Describe the schema for a collection | read |
collection-storage-size | Gets the size of the collection | read |
connect | Connect 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 |
connectionName | Optional short label for the connection (stored slugified with a short suffix, e.g. | read |
connectionString | MongoDB connection string (in the mongodb:// or mongodb+srv:// format) | read |
count | Gets the number of documents in a MongoDB collection using db.collection.count() and query as an optional filter parameter | read |
db-stats | Returns statistics that reflect the use state of a single database | read |
dropTarget | If true, drops the target collection if it exists | read |
explain | Returns statistics describing the execution of the winning plan chosen by the query optimizer for the evaluated method | read |
export | Export a query or aggregation results in the specified EJSON format. | read |
exportTitle | A short description to uniquely identify the export. | read |
filter | The query filter, matching the syntax of the query argument of db.collection.find() | read |
limit | The maximum number of results to return | read |
list-collections | List all collections for a given database | read |
list-knowledge-sources | List 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-tool | Mock tool | read |
mongodb-logs | Returns the most recent logged mongod events | read |
newName | The new name for the collection | read |
projection | The projection, matching the syntax of the projection argument of db.collection.find() | read |
query | A 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 user | read |
responseBytesLimit | The maximum number of bytes to return in the response. This value is capped by the server | read |
search-knowledge | Search 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 |
type | The type of logs to return. Global returns all recent log entries, while startupWarnings returns only warnings and errors from when the process started. | read |
verbosity | The 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 →mongodb-developer/mongodb-mcp-server
A Model Context Protocol server providing read-only access to MongoDB databases, letting LLMs inspect collection schemas and run aggregation pipelines.
neo4j-contrib/mcp-neo4j
Neo4j Labs Model Context Protocol servers
motherduckdb/mcp-server-motherduck
Local MCP server for DuckDB and MotherDuck
Audit history
- ✕BLOCK F 55 / 100
First audit ·
ddedafa6e442
README badge
Badges show the current verdict, BLOCK included
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?
What tools does MongoDB expose?
Is MongoDB safe to connect to an agent?
What credentials does MongoDB need?
How does MongoDB run?
How current is this page?
Which MongoDB MCP server is the right one?
I already installed MongoDB. What should I do?
Can the verdict change?
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.
- What is the MongoDB MCP server?
- What tools does MongoDB expose?
- Is MongoDB safe to connect to an agent?