Skip to content
Hidden Logic Lab

Official MongoDB MCP Server 3.4.0 defaults to read-write access, the official mongodb plugin and the setup wizard do not add --readOnly unless the operator opts in, and confirmation-gated tools still run when the MCP client does not support elicitation.

Published

The official MongoDB MCP Server is a first-party Model Context Protocol server that lets a connected AI client query and change MongoDB data, and, when Atlas credentials are configured, manage Atlas projects, clusters, database users, network access lists, and stream processing. Publisher: MongoDB. The public repository is mongodb-js/mongodb-mcp-server. Official documentation is at mongodb.com/docs/mcp-server. The implementation is TypeScript, compiled to JavaScript, in a pnpm monorepo that also publishes workspace packages such as @mongodb-js/mcp-cli, @mongodb-js/mcp-setup, @mongodb-js/mcp-core, @mongodb-js/mcp-tools-mongodb, @mongodb-js/mcp-tools-atlas, @mongodb-js/mcp-tools-atlas-local, @mongodb-js/mcp-tools-assistant, @mongodb-js/mcp-atlas-api-client, @mongodb-js/mcp-atlas-telemetry, and others. The npm package operators install is mongodb-mcp-server; its bin is mongodb-mcp-server (dist/esm/index.js). The interactive installer is a subcommand of that bin (npx mongodb-mcp-server@latest setup), not a separate binary. The license is Apache-2.0. The LICENSE file in this pin is the stock Apache 2.0 text; it does not add a MongoDB-specific copyright line.

This review pins the latest stable npm latest release at research time, 3.4.0, which matches git tag v3.4.0. It is a static review: we cloned the tagged commit, read first-party source and docs, downloaded the official npm tarballs for the server and the first-party workspace packages users actually install, and checked hashes and provenance. We did not run the MCP server, the setup CLI, npx mongodb-mcp-server, postinstall hooks, Docker, or any installer. We did not connect to a MongoDB deployment or to Atlas, and we did not call the hosted Atlas MCP at https://mcp.mongodb.com/.

What we pinned

  • Git tag v3.4.0, a lightweight tag pointing at commit 1832d8ba5b16bf80dd098224da6e8758d336660f (chore: release mongodb-mcp-server v3.4.0 (#1717)). The commit date is 24 November 2026, 22:54:48 Asia/Hong_Kong (14:54:48 UTC; the commit itself is dated 15:54:48 +0100). The GitHub Release of the same name was published 25 November 2026, 00:20:32 Asia/Hong_Kong (16:20:32 UTC). The tag itself is not annotated and carries no tag signature (git cat-file -t v3.4.0 is commit). The pointed-to commit is authored by mongodb-devtools-bot[bot] and committed by GitHub <noreply@github.com>; after importing GitHub's web-flow public keys, git verify-commit reported a good signature from GitHub <noreply@github.com> with fingerprint 9684 79A1 AFF9 27E3 7D1A 566B B569 0EEE BB95 2194. That confirms GitHub's merge signature, not a maintainer-signed annotated tag.
  • npm mongodb-mcp-server@3.4.0, published 25 November 2026, 00:09:57 Asia/Hong_Kong (16:09:57.786 UTC), about eleven minutes before the GitHub Release and about one hour and fifteen minutes after the release commit. The registry latest dist-tag is 3.4.0. Other dist-tags at research time included v2 at 2.1.2 and several prerelease tags; we did not treat those as the default pin. The tarball SHA-1 is 845b49ea021dca9b5de0385f58e6d8e17d25374e, matching the registry dist.shasum. SHA-256 of the downloaded tarball is 55962cd955415513d5a7ed6d140fef1c7b45ac080deda2db10b1fac5623b23ac. Integrity: sha512-xDWM3Twm+s47a+T7GBwsHhkJArJCtRHzGclTB56Gl7v7uLCEnJ7P8CqPRphxdn7S/gmWc++QN2z4BhgBXMgozg==, which matches the SHA-512 of the file we downloaded. The tarball has no gitHead field; it ships compiled dist/ files, package.json, LICENSE, and README.md, not the TypeScript sources in the git tag. dist/esm/common/packageInfo.js in the tarball exports version: "3.4.0". We did not rebuild dist/ from TypeScript.
  • The registry lists npm publish and SLSA provenance attestations. The SLSA subject digest is the SHA-512 of the tarball we downloaded (c4358cdd3c26face3b6be4fb181c2c1e190902b242b511f319c953079e8697bbfbb8b0849c9ecff02a8f469871767ed2fe099673ef90376cf80618015cc828ce). The provenance names .github/workflows/publish.yml on refs/heads/main in https://github.com/mongodb-js/mongodb-mcp-server, resolved source commit 1832d8ba5b16bf80dd098224da6e8758d336660f — the same commit as the git tag — and GitHub Actions run 45419407766. The _npmUser is GitHub Actions via a trusted GitHub OIDC publisher. That ties the published tarball to this repository and tag; it is not a substitute for reading what the package does.
  • The same release also published first-party workspace packages at version 3.4.0, which mongodb-mcp-server@3.4.0 depends on with exact versions (the git tree uses workspace:*; the npm package rewrites those to 3.4.0). We downloaded and hashed those official tarballs too. They were published in the same window on 24 November 2026, 16:09–16:13 UTC (25 November 2026, 00:09–00:13 Asia/Hong_Kong). None of the package.json files we opened in those tarballs declared preinstall, install, or postinstall hooks. Related first-party packages include @mongodb-js/mcp-tools-mongodb, @mongodb-js/mcp-tools-atlas, @mongodb-js/mcp-tools-atlas-local, @mongodb-js/mcp-tools-assistant, @mongodb-js/mcp-setup, @mongodb-js/mcp-cli, @mongodb-js/mcp-core, @mongodb-js/mcp-types, @mongodb-js/mcp-logging, @mongodb-js/mcp-metrics, @mongodb-js/mcp-ui, @mongodb-js/mcp-http-runners, @mongodb-js/mcp-atlas-telemetry, @mongodb-js/mcp-atlas-api-client, and @mongodb-js/mcp-fetch. The monorepo also contains mongodb-atlas-mcp-remote at 3.0.0-prerelease.1; that is a different package, used as a stdio helper for the hosted Atlas MCP, and is not this 3.4.0 pin.

The package README at the tag is byte-identical to the README in the npm tarball (SHA-256 0843742b3815eadff892e8d27d543d045a348a8233cb63472044bed577996803). Default option strings we checked in packages/cli/src/config/userConfig.ts appear in that README's configuration table.

At research time on the evening of 28 November 2026, Asia/Hong_Kong, mongodb-js/mongodb-mcp-server showed 1,165 stars and 299 forks. The repo is not archived. It was created 4 April 2025, 22:10:44 Asia/Hong_Kong (14:10:44 UTC). Default-branch main was six commits ahead of the pin, at ea9cff461f65b1853cb9bf6dfa824b3320f51883. Those commits include later CI changes, a vector-search filter fix, and a change to route telemetry and IP lookup through an injected HTTP client. They are out of scope. We pinned 3.4.0, not HEAD.

Official docs and the repository README also describe a MongoDB-hosted Atlas MCP at https://mcp.mongodb.com/ (the official mongodb-atlas plugin talks to that URL over OAuth). We did not call that service, so we cannot say which build it runs or how its permission model is enforced. This review is of the open-source local server.

Scope

This is a static review of official evidence: the pinned git tag and commit, the official npm tarballs extracted as files and not executed, the README shipped at that tag, and official documentation under mongodb.com/docs/mcp-server, including Security Best Practices and Enable or Disable Features. We also read the public mongodb and mongodb-atlas plugin configs in mongodb/agent-skills at research time (967cbea1a51e6b9387304e1e88ebf57151207c70 on main). That plugin repository is not the 3.4.0 server pin.

We did not run the MCP server, the setup wizard, npx, Docker, or dryRun. We did not connect to MongoDB or Atlas, use a connection string or API key, or sign in to https://mcp.mongodb.com/. We did not audit dependency implementations, hosted MongoDB services, or the unpublished behavior of HEAD.

No malware was found in the first-party TypeScript we opened at 1832d8ba5b16bf80dd098224da6e8758d336660f or in the official 3.4.0 tarball files we inspected. That is a statement about the scope we opened, not a clean bill of health and not a runtime confirmation.

Verdict

The official local server is a first-party MCP process that runs on the operator's machine, with the rights of the OS user and whatever MongoDB or Atlas credentials it is given. In packages/cli/src/config/userConfig.ts, readOnly defaults to false. Official documentation is explicit about that: "By default, read-only mode isn't enabled and the MCP Server allows cluster write operations." The same docs say to typically enable read-only mode and to use a read-only database user.

What a new operator actually gets depends on the install path, and those paths disagree.

  • The VS Code and Cursor install badges at the top of the v3.4.0 README pass --readOnly. Manual JSON examples under "Manual Setup" also pass --readOnly, under a "Default Safety Notice."
  • npx -y mongodb-mcp-server@latest setup does not. In packages/setup/src/setupMcpServer.ts, promptForReadonly() asks "Install MCP server as Read-only?" with default: false. --readOnly is written into the client config only if the operator answers yes. The generated command is npx -y mongodb-mcp-server@latest, not a pinned 3.4.0.
  • The official mongodb plugin, which the README recommends for self-managed deployments, does not add --readOnly either. At research time, plugins/mongodb/mcp.json and mcp_config.json in mongodb/agent-skills were npx -y mongodb-mcp-server@<4 with no other arguments. That range can install any 3.x, including this pin and later 3.x releases, still with writes enabled unless the operator changes the config.

With the default readOnly: false, the server registers write tools. Those include insert-many, update-many, delete-many, drop-collection, drop-database, drop-index, create-collection, create-index, rename-collection, and Atlas tools that can create clusters, projects, database users, and access-list entries, plus Atlas Local tools that can create or delete local Docker deployments. aggregate and aggregate-db are classified as read tools, but they can still write when a pipeline contains $out or $merge.

Confirmation is not a substitute for readOnly. The default confirmationRequiredTools list is only a subset of the write surface. In packages/core/src/toolBase.ts, a tool on that list is prompted only when elicitation.supportsElicitation() is true; the comment in invoke() says clients that do not declare elicitation support "proceed without prompting." The README states the same, and the code matches it. The special $out / $merge confirmation in packages/tools-mongodb/src/mongodbTool.ts is also skipped when elicitation is unsupported. Official unattended-agent docs suggest emptying confirmationRequiredTools so those tools can run without a human; that is an operator choice, not a hardening default.

The local HTTP transport is documented and commented in code as an unauthenticated deployment. httpHeaders defaults to {}, so no header is checked unless the operator sets some. Binding to a non-loopback address is refused unless dangerousHostBinding is true (default false). Telemetry defaults to enabled and is sent to Atlas telemetry endpoints under https://cloud.mongodb.com/ unless disabled.

This is not a claim that 3.4.0 is unsafe to run, and it is not a claim that it is safe. It is a static reading of defaults, install paths, and the confirmation code. We did not run the server. This is not a clean bill of health.

Architecture and trust boundaries

There are at least three ways people now reach "MongoDB MCP," and they are not the same deployment.

Local stdio. This is the default transport in userConfig.ts ("stdio"). The Node process started by npx or the mongodb-mcp-server bin runs on the operator's machine as the OS user that launched it. It can open MongoDB connection strings, call the Atlas Admin API when apiClientId / apiClientSecret are set, call the MongoDB Assistant at assistantBaseUrl (default https://knowledge.mongodb.com/api/v1/), and, if Atlas Local tools are enabled, talk to a local Docker-backed Atlas Local runtime. Logs default to a directory under the user profile, and the export tool writes documents under exportsPath. This is the package we reviewed.

Local HTTP. --transport http binds an Express server, default httpHost 127.0.0.1 and httpPort 3000. packages/cli/src/cliMcpHttpServer.ts describes the CLI runner as "a local, unauthenticated deployment." packages/http-runners/src/mcpHttpServer.ts says "The server never authenticates on its own: hosts that require verified identity enforce it in their own middleware." If httpHeaders is non-empty, requests must present those exact header values or they get 403; the default is an empty object, so that check is off. packages/http-runners/src/expressBasedHttpServer.ts refuses to bind anything other than 127.0.0.1, localhost, or ::1 unless dangerousHostBinding === true. An optional monitoring server (monitoringServerHost / monitoringServerPort) can expose /health and /metrics and is subject to the same bind rule. Official docs and the README warn that binding to 0.0.0.0 / :: with no auth exposes an unauthenticated endpoint that can run MongoDB operations, including destructive ones, against the configured credentials.

Hosted Atlas MCP. The README's recommended path for Atlas is the official mongodb-atlas plugin, which points at https://mcp.mongodb.com/ and uses OAuth. Official docs describe organization-level AI client access (Read or Read and write), Atlas roles, and a seven-day inactivity / thirty-day grant window. There is also mongodb-atlas-mcp-remote, a stdio helper that authenticates to the hosted server with service-account environment variables. We did not review the hosted service's code or runtime. Anything we say below about defaults, confirmation, or tools is about the local open-source server.

Inside the local process, connections have a scope. connectionScope defaults to "session": runtime connections belong to an MCP session (plus a shared preconfigured connection, if a connection string was supplied at startup). The option is already marked deprecated. The schema text and connectionScopeFromConfig() in packages/cli/src/createServerServices.ts say the protocol is moving to sessionless, and that on the 2026-07-28 HTTP path a request without an mcp-session-id falls back to the shared global scope so connections can persist across requests. A "global" setting shares connections across all clients. The README tells operators not to run this CLI as a shared, internet-facing endpoint without adding their own authentication and identity layer.

Atlas tools are registered only when both apiClientId and apiClientSecret are set (packages/tools-atlas/src/atlasTool.ts). Atlas Local tools are registered only when an Atlas Local client is available. Assistant tools (search-knowledge, list-knowledge-sources) are ordinary read tools and do not require Atlas credentials.

atlas-connect-cluster does more than return a URI. In this source it can add the process's current public IPv4 address to the Atlas project access list (ensureCurrentIpInAccessList, using api/private/ipinfo on the default API base https://cloud.mongodb.com/) and create a temporary database user named mcpUser plus a random UUID, with deleteAfterDate defaulting to four hours (atlasTemporaryDatabaseUserLifetimeMs default 14_400_000). getDefaultRoleFromConfig() in packages/tools-atlas/src/helpers/roles.ts assigns readAnyDatabase when readOnly is true or when create, update, and delete are all in disabledTools; otherwise it assigns readWriteAnyDatabase. The user is scoped to the target cluster. The comments say the temporary password is kept in the connection URI and is not written to logs, telemetry, or tool responses. We did not observe that at runtime.

Tools and defaults

The README at this pin lists the tools the server can register. In first-party source we counted 53 tool classes with a toolName and operationType. readOnly is enforced at registration: ToolBase.verifyAllowed() in packages/core/src/toolBase.ts withholds any tool whose operationType is not read, metadata, or connect when config.readOnly is true. disabledTools can also hide tools by name, category (mongodb, atlas, atlas-local, assistant), or operation type.

With the default empty disabledTools and readOnly: false, write-capable tools are registered when their other gates pass. That includes, at least:

  • MongoDB: insert-many (create), update-many (update), rename-collection (update), delete-many (delete), drop-collection (delete), drop-database (delete), drop-index (delete), create-collection (create), create-index (create).
  • Atlas, if credentials are set: atlas-create-access-list, atlas-create-cluster, atlas-create-free-cluster, atlas-create-db-user, atlas-create-project, atlas-load-sample-dataset (create); atlas-pause-resume-cluster, atlas-upgrade-cluster, atlas-streams-manage (update); atlas-streams-teardown (delete); atlas-streams-build (create).
  • Atlas Local, if available: atlas-local-create-deployment (create), atlas-local-delete-deployment (delete). In 3.4.0 the default image tag for a new local deployment is latest, not preview.

aggregate, aggregate-db, and export are read tools, so they remain registered in --readOnly mode. The MQL guard in assertMqlIsAllowed() then rejects pipelines that contain top-level $out or $merge when readOnly is true, or when create, update, or delete is in disabledTools. In a default read-write process those stages are allowed, subject to the confirmation behavior below. explain is a metadata tool; in this pin it rejects $out / $merge because, as the changelog and the source comment say, explain never writes (v3.4.0, MCP-108).

connect remains available in read-only mode. If no connection string was preconfigured, a connected agent can still pass a URI to connect. The effective data plane is then whatever that URI can reach, plus the OS user's access to logs and exports on disk.

v3.4.0 also runs the existing MQL allow-list over the update document in update-many, not only the filter (packages/tools-mongodb/src/tools/update/updateMany.ts calls assertMqlIsAllowed(..., filter, update)). The changelog describes this as MCP-701. We are reporting what the pinned code does, not reconstructing a pre-3.4.0 issue we did not verify.

Malware check

We inspected first-party package.json files in the git tag and in the official 3.4.0 tarballs we extracted. We found no preinstall, install, or postinstall scripts. We downloaded those tarballs with the registry URLs and extracted them with tar; we did not run npm install on the server package.

In the first-party TypeScript we opened, we did not find obfuscated loaders or unexpected install-time downloaders. Compiled JavaScript in the extracted tarballs (excluding the large generated HTML in @mongodb-js/mcp-ui) had no eval( or new Function( hits in the search we ran. Network sinks we did open in first-party code are the ones the product documents: MongoDB servers from the configured connection strings, Atlas APIs under apiBaseUrl (default https://cloud.mongodb.com/), Assistant APIs under assistantBaseUrl, telemetry event posts described below, and the IP lookup at api/private/ipinfo. Atlas Local can pull a Docker image when that tool is used; we did not run it.

@mongodb-js/mcp-ui unpacks to a much larger tree of generated HTML for tool responses. We did not treat that generated UI as a full audit.

No malware was found in that first-party scope. We did not audit npm dependency implementations (mongodb, @modelcontextprotocol/*, express, node-fetch, oauth4webapi, and the rest), and we did not run the code. Absence of malware in the files we opened is not a clean bill of health and is not a runtime statement.

Permissions and data access

The permission boundary that actually holds in this source is the combination of:

  1. The MongoDB user's privileges on each connection string.
  2. The Atlas service account's roles, when Atlas tools are enabled.
  3. Server startup flags such as readOnly, disabledTools, and disableServerSideJs.
  4. The OS user's access to logPath, exportsPath, and any files the process can read.

readOnly defaults to false (userConfig.ts, .default(false); environment name MDB_MCP_READ_ONLY; flag --readOnly). Official security docs repeat that default and recommend enabling the flag and using a read-only database user. Official badges and manual README examples follow that advice. The setup wizard and the official mongodb plugin, as checked above, do not apply it unless the operator opts in.

When Atlas credentials are present, official docs and the README give a least-privilege role table (for example Project Read Only to view clusters, Project Cluster Manager to create and manage them, Project Database Access Admin for database users, Project IP Access List Admin for access lists). The server does not itself reduce an over-privileged service account. atlas-create-db-user and atlas-create-access-list are on the default confirmation list; atlas-create-cluster, atlas-create-free-cluster, atlas-create-project, atlas-load-sample-dataset, atlas-pause-resume-cluster, and atlas-upgrade-cluster are not.

disableServerSideJs defaults to true. assertNoServerSideJS() in packages/tools-mongodb/src/helpers/mqlGuards.ts recursively rejects $where, $function, and $accumulator in filters and pipelines when that flag is on. That is a real check in this source. It is not a general MQL sandbox.

indexCheck defaults to false. previewFeatures defaults to []. allowRequestOverrides defaults to false; when an operator turns it on, readOnly may be overridden only toward true, not toward false.

Resources include config://config (user configuration with secrets redacted), a debug resource for connectivity errors, and exported-data://{exportName} for files written by export.

Confirmation and elicitation

Default confirmationRequiredTools in userConfig.ts is:

atlas-create-access-list, atlas-create-db-user, drop-database, drop-collection, delete-many, drop-index, atlas-streams-manage, atlas-streams-teardown.

requiresConfirmation() is a membership test on that list. In ToolBase.invoke():

if (this.requiresConfirmation() && this.server.elicitation.supportsElicitation(context.request)) {
    // ...
    // Clients that do not declare elicitation support proceed
    // without prompting.

Elicitation.supportsElicitation() is true only when the request's declared or negotiated client capabilities include elicitation. If they do not, the whole block is skipped and execute() runs. The README says the same: "If the client does not support elicitation, the tool will execute without confirmation." We verified that in this code. Confirmation here is an elicitation prompt, not a server-side security boundary.

The $out / $merge special case is documented as always requesting confirmation, "regardless of whether they appear in confirmationRequiredTools." The implementation is confirmWriteStages() in packages/tools-mongodb/src/mongodbTool.ts:

if (this.requiresConfirmation() || !this.server.elicitation.supportsElicitation(context.request)) {
    return null;
}

null means continue. So this extra prompt runs only when the client supports elicitation and the tool is not already on the confirmation list. If the client does not support elicitation, the write-stage prompt is skipped too. The docs and the code disagree on the word "always"; the code is the behavior we can verify statically. When readOnly is true, those stages are rejected earlier by assertNoWriteStages() and do not depend on a prompt.

Tools not on the default confirmation list — including insert-many, update-many, create-collection, create-index, rename-collection, and several Atlas create/update tools — are not prompted even when the client does support elicitation.

Unattended-agent documentation in the same README describes a different case: the client advertises elicitation but no human is there to answer (for example codex exec or CI). Then a confirmation-gated tool is treated as declined, and the tool returns that the user did not confirm. The docs warn that the agent run may still exit successfully, so the failure is easy to miss. They then show how to empty confirmationRequiredTools:

MDB_MCP_CONFIRMATION_REQUIRED_TOOLS="" npx -y mongodb-mcp-server

or --confirmationRequiredTools "". The text says to do this only when the agent is trusted to run destructive operations without a human, and to consider combining it with read-only mode, disabled tools, or a limited database user. Emptying that list removes the prompt for clients that would have shown one. It does not create a new control, and it does not change the no-elicitation path, which already runs those tools.

v3.4.0 includes "correctly infer elicitation support for stdio clients" (MCP-700). We read the resulting supportsElicitation() logic; we did not run clients against it.

Network, file, credential, and telemetry risks

Secrets on argv versus env versus config. connectionString, apiClientId, apiClientSecret, and voyageApiKey are marked isSecret in the config schema. connectionStrings is accepted from the environment or a config file, not as a CLI argument. connectionString still can be passed on the command line; parseUserConfig.ts warns that --connectionString is deprecated and to prefer MDB_MCP_CONNECTION_STRING or a positional argument. Official docs and the README tell operators that command-line arguments can appear in process lists and logs, and to use environment variables or MDB_MCP_CONFIG instead. We did not watch a process list.

Logs and exports. Default loggers are ["disk", "mcp"]. Default logPath is ~/.mongodb/mongodb-mcp/.app-logs on Unix, or under %LOCALAPPDATA%\mongodb (or %APPDATA%\mongodb) on Windows (getLogPath() in packages/cli/src/config/configUtils.ts). Default exportsPath is the sibling exports directory. The README says the OS user running the server needs read and write access to both, and that export files may contain sensitive documents. mcpClientLogLevel defaults to debug.

HTTP authentication and binding. Defaults: httpHost 127.0.0.1, httpPort 3000, dangerousHostBinding false, httpHeaders {}. The bind check and the empty-headers behavior are described above. One README example for the monitoring server uses --monitoringServerHost 0.0.0.0; in this code that bind is refused unless dangerousHostBinding is also set.

Sessionless HTTP and global connections. On the 2026-07-28 HTTP path, a request without a usable mcp-session-id falls back to GLOBAL_CONNECTION_SCOPE even when connectionScope is still "session". That is intentional in connectionScopeFromConfig() so anonymous clients can reuse connections. On a shared unauthenticated HTTP server, that is also how connections become shared. The README's deployment constraints tell operators not to expose that CLI on the internet without their own auth, and to prefer the hosted Atlas MCP or a custom authenticated library built on @mongodb-js/mcp-cli.

Telemetry. telemetry defaults to "enabled". createTelemetryFromConfig() sets enabled: config.telemetry === "enabled". AtlasTelemetry.isTelemetryEnabled() also returns false when DO_NOT_TRACK is present in the environment, even mid-process. Official docs show both --telemetry disabled and DO_NOT_TRACK=1. When enabled, ApiClient.sendEvents() POSTs JSON events to api/private/v1.0/telemetry/events on apiBaseUrl if Atlas auth is configured, or to api/private/unauth/telemetry/events if it is not (or after a 401). With the default base URL, those are https://cloud.mongodb.com/api/private/v1.0/telemetry/events and https://cloud.mongodb.com/api/private/unauth/telemetry/events. Common properties in first-party code include server name and version, platform, arch, OS type and version, and, once setup finishes, a device_id and is_container_env. Event property types also allow client name/version/protocol, booleans for whether Atlas auth or a connection string is configured, tool command name, result, duration, and some Atlas metadata such as project_id / org_id when a tool attaches them. Events are redacted with the keychain before send. We did not capture live payloads, so we do not claim a complete inventory of every field that would be sent in a real run.

Untrusted-data wrapping. By default, formatUntrustedData() in packages/core/src/toolBase.ts wraps query results and similar tool output in <untrusted-user-data-{uuid}> tags and a prompt-injection warning. disableUntrustedDataWarning defaults to false. Turning it on sends the data as-is. This is a client-facing warning, not a guarantee that a model will ignore the contents.

Docker and cloud examples. The README shows docker run of mongodb/mongodb-mcp-server:latest and, in the connection-string and Atlas examples, passes MDB_MCP_READ_ONLY="true". The "no configuration" example does not. There are also Azure and AWS deploy notes; the constraints section says not to expose the unauthenticated CLI. We did not start Docker or deploy anything. We also did not review the published Docker image's contents beyond this repository's Dockerfile at the tag.

Config redaction. The config resource and log helpers use @mongodb-js/mongodb-redact. Comments on the temporary Atlas user say a URI that reaches an error message is scrubbed to <mongodb uri>. We did not verify redaction against live log output.

Who it is for, and who should not enable writes

The local server is for operators who want an AI client to work against a MongoDB deployment they already control, on a machine they already trust, with credentials they choose. Official docs recommend the hosted Atlas MCP, with OAuth and organization access modes, when the target is Atlas and the operator does not want to run this process themselves.

Do not leave writes enabled for a production cluster, a shared environment, or an unattended agent unless you have a specific need and a database user whose privileges already match that need. readOnly: false plus a read-write user plus a client that does not support elicitation means drop-database, delete-many, insert-many, update-many, and $out / $merge can run without this server asking anyone. Confirmation, when it appears, is a prompt. It is not a sandbox.

People who only need to explore schema and run reads should enable --readOnly (or MDB_MCP_READ_ONLY=true) and use a read-only database user, which is what MongoDB's own security documentation already tells them to do.

How a careful operator would pin and restrict it

We did not run these steps. They follow from the official docs and from the pinned source.

Pin the local package by version, mongodb-mcp-server@3.4.0, rather than @latest or the official plugin's mongodb-mcp-server@<4. Prefer environment variables for MDB_MCP_CONNECTION_STRING, MDB_MCP_API_CLIENT_ID, and MDB_MCP_API_CLIENT_SECRET, not command-line arguments.

Enable read-only mode unless you have a concrete write need: --readOnly or MDB_MCP_READ_ONLY=true. Use a read-only MongoDB user, not a read-write or Atlas readWriteAnyDatabase user. If Atlas tools are required, assign the least Atlas role that covers those tools, at project scope, as the official table describes — not Organization Owner. Understand that atlas-connect-cluster may still add the current IP to the access list and may create a temporary user whose role follows readOnly / disabledTools.

Keep disableServerSideJs at its default true. Do not empty confirmationRequiredTools to make an unattended agent succeed unless you have already restricted the data plane some other way, and do not treat confirmation as a reason to skip readOnly. Leave disableUntrustedDataWarning off unless you have a reason to drop the wrapping.

If you use HTTP transport, bind only to loopback, do not set dangerousHostBinding, and do not expose the process without your own authentication. The CLI does not supply that authentication. If you want telemetry off, set --telemetry disabled or MDB_MCP_TELEMETRY=disabled, or set DO_NOT_TRACK. Restrict who can read logPath and exportsPath.

The documented --dryRun flag dumps configuration and enabled tools without starting the server. We did not run it. It is the official way to inspect what a given config would register.

If you follow the official mongodb plugin or accept the setup wizard's default "Install MCP server as Read-only?" answer, you will not get --readOnly unless you change the generated config. The VS Code and Cursor README badges, and the manual examples under the safety notice, do include it.

Do not assume the hosted endpoint at https://mcp.mongodb.com/ is this git commit, or that its access mode is the same as this package's readOnly flag. Do not assume a client's tool-approval UI is a control this server invented.

Limits of this review

This was a static review of mongodb-js/mongodb-mcp-server at 1832d8ba5b16bf80dd098224da6e8758d336660f (tag v3.4.0) and of the official npm package mongodb-mcp-server@3.4.0 plus the first-party 3.4.0 workspace tarballs named above. We read source, docs, plugin manifests, registry metadata, and attestations. We verified the downloaded tarball hashes against the registry and against the SLSA subject digest.

We did not run the server, the setup CLI, npx, Docker, or dryRun. We did not connect to MongoDB or Atlas, use credentials, or exercise elicitation with a real client. We did not audit third-party dependency implementations or the hosted Atlas MCP. We did not rebuild dist/ from TypeScript, so we cannot independently prove that every compiled file was produced from the tagged sources, only that npm provenance attributes the tarball to this commit and that the defaults we checked in dist and in the README match the source we opened.

No malware was found in that first-party scope. Official install paths disagree about --readOnly: badges and many documented examples include it, while the default of the server, the setup wizard, and the official mongodb plugin do not. Confirmation-gated tools, and the special $out / $merge prompt, are skipped when the client does not support elicitation. Telemetry is on by default. The local HTTP transport does not authenticate by itself. We did not run the server. This is not a clean bill of health.

More skill reviews

← All skill reviews