NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #3169 most downloaded on npm
The official MongoDB driver for Node.js
Last release today
17 Sep 2026
Ships on a steady schedule
a new release about every 8 days
Nearly every release is documented
notes for 60 of the last 60 stable releases
195 versions withdrawn
withdrawn after publishing
15 years old
904 releases · first in 2011
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
The MongoDB Node.js team is pleased to announce version 7.4.0 of the mongodb package!
The MongoDB Node.js team is pleased to announce version 7.4.0 of the mongodb package!
The Symbol.asyncDispose methods on MongoClient, ClientSession, ChangeStream, and cursors enable await using for automatic cleanup. These methods were introduced as experimental in v6.9.0. Since then, TC39 Explicit Resource Management proposal reached Stage 4 in 2025, and Node.js enabled explicit resource management as a stable feature in Node.js 24, so the experimental flags have been removed from our APIs and the APIs are now officially supported.
When a session has causal consistency enabled, write operations now include readConcern.afterClusterTime, matching the existing read behavior. This maintains the "read your own writes" guarantee across primary failovers in shareded clusters. There are no API changes.
We invite you to try the mongodb library immediately, and report any issues to the NODE project.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Important A future minor release will raise the minimum supported MongoDB Server version from 4.2 to 4.4. This is in accordance with MongoDB Software
Important
A future minor release will raise the minimum supported MongoDB Server version from 4.2 to 4.4. This is in accordance with MongoDB Software Lifecycle Schedules. Support for MongoDB Server 4.2 will be dropped in a future release!
The MongoDB Node.js team is pleased to announce version 7.3.0 of the mongodb package!
maxWireVersion is bumped to 29Max wire version & max server version bumped in preparation for MongoDB LTS (v9.0).
SCRAM-based authentication (the default mechanism for username/password connections) was broken when using the driver in non-Node.js environments such as Deno. The root cause was an implicit toString() call on byte arrays that produced incorrect output outside of Node.js. This fix ensures explicit UTF-8 string conversion is used throughout the SCRAM implementation, restoring authentication in Deno and other web-compatible runtimes.
We invite you to try the mongodb library immediately, and report any issues to the NODE project.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
The MongoDB Node.js team is pleased to announce version 7.2.0 of the mongodb package!
The MongoDB Node.js team is pleased to announce version 7.2.0 of the mongodb package!
Added support for MongoDB's [Intelligent Workload Management IWM and ingress connection rate limiting features. The driver now gracefully handles write-blocking scenarios and optimizes connection establishment during high-load conditions to maintain application availability.
Two new client options are available:
maxAdaptiveRetries (default: 2) - configures the maximum number of retries during server overload. Set to 0 to disable overload retries.enableOverloadRetargeting (default: false) - when enabled, the driver will deprioritize servers that return overload errors during retry server selection.These features will be functional with MongoDB Atlas Server Version 9.0 and above.
The following Node-specific APIs have been replaced with standards-based equivalents:
Uint8Array APIs instead of the Node‑specific Buffer APIs.globalThis.crypto instead of the Node‑specific crypto API.These changes reduce the number of patches required to run the driver outside of Node.js and improve compatibility with non-Node.js runtimes.
This release introduces a new MongoClient option, runtimeAdapters. runtimeAdapters allows injection of core Nodejs APIs, to allow users of the driver to use alternative runtimes that don't support Nodejs compatibility or work in restricted environments.
Warning
runtimeAdapters is experimental and the actual interface of each dependency might change at any time.
Notes about usage of runtimeAdapters:
runtimeAdapter is provided for a core Nodejs module that the driver uses, the driver will import the corresponding module from Nodejs.runtimeAdapters Typescript types currently rely on Nodejs' type definitions (@types/node). To use runtimeAdapters in a Typescript project, @types/node must be installed as well.runtimeAdapters, all required functions inside that module must be provided. For example, when injecting the os module, the platform() function cannot be omitted.runtimeAdapters supports injecting Nodejs' os moduleThe os module is pluggable using runtimeAdapters:
const os: OsAdapter = {
// implement the required OSAdapter interface
}
// `client` will never import or make use of the `os` module and instead only rely on the `os` adapter specified above.
const client = new MongoClient(<uri>, {
runtimeAdapters: { os }
});bufferedCount() method that matches cursorsIn some circumstances it may be desirable to determine if there are local documents stored in your change stream before invoking one of the async methods (tryNext, hasNext etc.). The changeStream.bufferedCount() returns the number of documents remaining inside the change stream from the last batch.
Shout out to @typesafe for contributing this feature!
os runtime adapter (#4851) (d2ad07f)ChangeStream.bufferedCount (#4870) (f7ea421)We invite you to try the mongodb library immediately, and report any issues to the NODE project.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
The MongoDB Node.js team is pleased to announce version 7.1.1 of the mongodb package!
The MongoDB Node.js team is pleased to announce version 7.1.1 of the mongodb package!
The OIDC ALLOWED_HOSTS wildcard handling has been fixed to require full subdomain/path matches for *. and */ entries, preventing partial suffix matches from being incorrectly accepted.
Due to a Node.js bug, tls.connect() silently ignores keepAlive, keepAliveInitialDelay, and noDelay options passed through its constructor. This could cause idle connections - particularly through cloud load balancers like Azure (240s idle timeout) or AWS PrivateLink/NLB - to be dropped unexpectedly due to missing TCP keep-alive probes.
The driver now explicitly calls setKeepAlive() and setNoDelay() on the socket after creation, ensuring these settings are always applied regardless of whether TLS is used.
We invite you to try the mongodb library immediately, and report any issues to the NODE project.
This option has been unused since driver 4.x. It is now deprecated and will be removed in a future major release. Existing code that sets this option…
The MongoDB Node.js team is pleased to announce version 7.1.0 of the mongodb package!
aws4 package no longer required for AWS authenticationThe aws4 package is no longer required to use AWS authentication, reducing the dependency footprint.
util.promisify have been removedThe driver no longer relies on Node.js’s util.promisify() API, which improves compatibility with alternate runtimes.
node:process import instead of global.processThe driver now explicitly imports node:process instead of relying on global.process, allowing bundlers and alternate runtimes to supply and optimize the process implementation more consistently.
The driver replaces several Node-specific APIs with standards-based equivalents:
process.arch → os.arch()process.platform → os.platform()os.endianness() → BSON.NumberUtilsprocess.hrtime() → performance.now()process.nextTick() → queueMicrotask()These changes reduce the number of patches required to run the driver outside of Node.js and improve compatibility with non-Node.js runtimes.
When server-side connection rate limiting is enabled and the rate limiter kicks in under periods of high connection establishment,the driver will additionally churn connections by clearing the pool every time the rate limiter rejects an incoming connection request.
In this new driver release, connection establishment failures no longer clear the pool, preventing unnecessary connection churn in these scenarios.
withTransaction now applies exponential backoff during transaction retriesThe convenient transaction API, withTransaction, now uses exponential backoff between retries when a transaction must be retried. Under high server load, this can help prevent transaction retry storms.
When retrying a command, the driver now deprioritizes servers during server selection, improving stability and reducing the likelihood of repeatedly targeting overloaded or previously failed servers.
ALLOWED_HOSTS for OIDCOIDC authentication now supports hosts matching *.mongo.com in its default ALLOWED_HOSTS list.
promoteValues: falseWhen MongoClient is configured with promoteValues: false (for applications that rely on raw BSON types), OIDC reauthentication now succeeds as expected.
$merge and $out aggregationsResolved an issue where the driver failed to detect MongoDB 5.0+ capabilities due to incorrect commonWireVersion initialization. As a result, aggregations with write stages now correctly respect secondary and secondaryPreferred read preferences, rather than forcing execution on the primary.
Huge thanks to @crehbichler for discovering and investigating this bug and for implementing a fix!
RenameCollectionOptions.new_collectionThis option has been unused since driver 4.x. It is now deprecated and will be removed in a future major release. Existing code that sets this option can safely remove it with no behavioral change.
We invite you to try the mongodb library immediately, and report any issues to the NODE project.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →