MongoDB driver
A strong pick. 2nd of 10 database drivers.
This is MongoDB's official Node.js driver. If you use MongoDB without an ODM, it is the default and almost the only choice. It is full-featured, typed and backed by the company. Its downloads grow more slowly than the median and than most SQL peers, and it is useful only to teams that run MongoDB.
Best for: Teams on MongoDB or Atlas that want direct access to every query, aggregation and encryption feature, without Mongoose.
Scores
Overall8.2
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 8.0, likely 7.0 to 8.5
For anyone using MongoDB without an ODM, this is the clear default: official, complete, typed and actively maintained. It ranks below the top PostgreSQL drivers in the category because its audience is narrower and its growth is falling behind. Behaviour changes in minor releases are another drag.
- github latestRelease: v7.9.1 released 2026-11-19
- npm downloads ratio: 2.66x, below the 4.1 median
- oneuptime.com/blog/post/2026-03-31-mongodb-mongoose-vs-native-driver-nodejs/view: Recommended for control and performance on MongoDB
GPT-6.2 Sol: 8.3, likely 7.1 to 9.2
For a new Node.js project that has chosen MongoDB, 7.9.1 is the default direct driver because it covers the database's core features and receives regular vendor updates. For projects still choosing a database, node-postgres serves a broader audience and has stronger relative growth. The recent run of security fixes, permissive query types, and limited evidence on newer runtimes keep the recommendation below a category-wide default.
- mongodb.com/docs/drivers/node/current/reference/quick-reference: Documents a broad direct query API.
- github.com/mongodb/node-mongodb-native/releases/tag/v7.9.1: Current stable release fixes two recently disclosed security issues.
- mongodb.com/docs/drivers/node/current/typescript: Documents gaps in compile-time query checks.
- survey.stackoverflow.co/2026/technology/data: PostgreSQL has a larger database audience.
- github releasesLastYear, npm downloadsLast4Weeks, npm downloadsSame4WeeksYearAgo, peers, and medianDownloadsRatio: Regular driver releases, with year-over-year growth below the catalog baseline and node-postgres.
Needed by many4.8
How many developers need a tool for this job?
Claude Opus 5.5: 5.0, likely 4.0 to 6.0
Every MongoDB project in Node needs this driver, directly or through Mongoose. But MongoDB is a minority choice next to PostgreSQL, MySQL and SQLite. It serves one database, so its audience is a large group but not a majority.
- data-bene.io/en/blog/most-desired-database-three-years-running-postgresqls-developer-appeal: 2025 SO survey: PostgreSQL leads, MongoDB about 45.7% admired
- dependents repos: 828,772 dependent repos, the most among peers
GPT-6.2 Sol: 4.5, likely 3.4 to 5.6
Direct database access is common in back-end work, and 19% of 2026 Stack Overflow database respondents reported using MongoDB. This driver serves the subset using MongoDB from Node.js or a compatible runtime. The survey covers all languages and cannot pin down how many JavaScript and TypeScript teams need the direct API.
- survey.stackoverflow.co/2026/technology/data: MongoDB use was 19%, compared with 57.9% for PostgreSQL.
- github.com/mongodb/node-mongodb-native: Official Node.js driver, with work underway on other runtimes.
Helps a lot8.3
How well does it do the job for those who need it?
Claude Opus 5.5: 8.0, likely 7.0 to 9.0
The API is complete and closely mirrors the MongoDB shell. It has first-class TypeScript types and advanced features such as Queryable Encryption, explicit resource management and adaptive retries. AI agents write correct code for it easily, because examples are plentiful. The limits are its lack of a schema layer and some confusing changes to timeout options.
- github.com/mongodb/node-mongodb-native/releases: v7.2 to v7.9 add QE string queries, await using, and faster bulk writes
- oneuptime.com/blog/post/2026-03-31-mongodb-mongoose-vs-native-driver-nodejs/view: Independent write-up: full query access and low overhead, but no schema or validation
- npm hasTypes: Bundled TypeScript types
GPT-6.2 Sol: 8.6, likely 7.5 to 9.5
Version 7.9.1 covers routine queries, pooling, aggregation, transactions, and change streams, with clear examples for developers and coding agents. Dotted fields escape default type checking, and the disabled timeoutMS option makes end-to-end deadlines harder to express. Third-party benchmarks use older versions or limited workloads, and agent accuracy remains unmeasured.
- mongodb.com/docs/drivers/node/current/reference/quick-reference: Runnable examples cover core operations, cursors, and change streams.
- mongodb.com/docs/drivers/node/current/connect/connection-options/connection-pools: Documents connection reuse, pool sizing, and wait limits.
- mongodb.com/docs/drivers/node/current/crud/transactions: Documents sessions and transaction APIs.
- mongodb.com/docs/drivers/node/current/typescript: Default dotted-field checks are permissive, and strict filter types are experimental.
- github.com/mongodb/node-mongodb-native/releases/tag/v7.8.0: Disabled experimental timeoutMS and documented stage-specific settings.
- iamcalegari.github.io/mongoat/explanation/benchmarks: A downstream author used driver 7.0 as the baseline and found substantial run-to-run variation.
Holds up over time8.5
Will it still be a good choice in two years?
Claude Opus 5.5: 8.5, likely 7.5 to 9.5
MongoDB Inc. funds a dedicated driver team. The repo had 204 commits and 12 releases last year, and v6 still gets backported fixes. The one drag is that behaviour changes sometimes land in minor releases, such as the timeoutMS change and dropping old server versions.
- github commitsLastYear / releasesLastYear: 204 commits and 12 releases, latest on 2026-11-19
- github.com/mongodb/node-mongodb-native/releases: Breaking-ish changes in minor releases 7.6, 7.8 and 7.9
- mongodb.com/docs/drivers/node/current/reference/release-notes: Official release notes and upgrade guides per major version
GPT-6.2 Sol: 8.5, likely 7.4 to 9.5
MongoDB's driver team shipped 12 releases and recorded 204 commits in the past year, ahead of node-postgres on commit count and behind MySQL2. A reported Cloudflare Workers regression was fixed, though routine response times are hard to judge because issues are tracked in Jira. The Node.js version increase in v7 and the timeout behavior change in v7.8 show that upgrades can require application changes.
- github commitsLastYear, github releasesLastYear, and peers: 204 commits and 12 releases, versus 114 commits for node-postgres and 536 for MySQL2.
- github.com/mongodb/node-mongodb-native/blob/v7.9.1/package.json: Names MongoDB's Node.js team and sets a Node.js 20.19 minimum.
- mongodb.com/docs/drivers/node/current/issues-and-help: Routes bug reports to Jira, explaining the zero GitHub issue counts.
- reddit.com/r/mongodb/comments/1urz0zl/cloudflare_workers_toplevel_import_mongoclient: A developer reported a v7 import regression and the thread confirmed a fix.
- github.com/mongodb/node-mongodb-native/releases/tag/v7.8.0: An experimental timeout stopped taking effect in a minor release.
Used widely7.4
How many use it, and is that growing?
Claude Opus 5.5: 7.5, likely 6.5 to 8.5
It has 86M downloads in 4 weeks and the largest count of dependent repos in the category, at 828k. Downloads grew only 2.66x in a year, below the 4.1 median and well below pg, Postgres.js and mysql2. Mongoose also installs it transitively, so it is losing share of new projects.
- npm downloadsLast4Weeks / downloadsSame4WeeksYearAgo: 86.3M vs 32.5M, a ratio of 2.66 against a 4.1 median
- dependents repos: 828,772 repos and 11,544 packages
- peers downloads: pg grew 8.3x and Postgres.js 29x over the same period
GPT-6.2 Sol: 7.3, likely 6.2 to 8.3
Ecosyste.ms found about 829,000 dependent repositories, the highest reported count in the peer set, and 11,544 dependent npm packages. Downloads rose from 32.5 million to 86.3 million over four weeks, or 2.66 times year over year, below the 4.1 times catalog baseline and behind node-postgres and MySQL2. Mongoose installs the driver transitively and CI repeats installs, so the number of projects choosing it directly remains uncertain.
- dependents and peers dependentRepos: 828,772 repositories and 11,544 npm packages, compared with 273,357 repositories for node-postgres.
- npm downloadsLast4Weeks, npm downloadsSame4WeeksYearAgo, medianDownloadsRatio, and peers: MongoDB grew 2.66 times versus 4.1 times overall, 8.26 times for node-postgres, and 6.27 times for MySQL2.
- github.com/Automattic/mongoose/blob/master/package.json: Mongoose installs the driver as a runtime dependency.
- survey.stackoverflow.co/2026/technology/data: Reported MongoDB database use fell from 24% in 2025 to 19% in 2026.
Vouched for7.4
Who stands behind it being good?
Claude Opus 5.5: 7.0, likely 6.0 to 8.0
It is the vendor's official driver, Mongoose builds on it, and MongoDB Atlas customers run it in production at large scale. Survey admiration for MongoDB itself is middling and trails PostgreSQL. Independent recent write-ups are few, and benchmarks are dated.
- data-bene.io/en/blog/most-desired-database-three-years-running-postgresqls-developer-appeal: MongoDB about 45.7% admired in 2025, behind Postgres, SQLite and Redis
- blog.jscrambler.com/mongodb-native-driver-vs-mongoose-performance-benchmarks: Older independent benchmark shows the native driver faster than Mongoose
- Mongoose depends on mongodb: The most popular MongoDB ODM is built on this driver
GPT-6.2 Sol: 7.8, likely 6.6 to 8.8
Mongoose builds on the driver, and NodeBB ships it for its MongoDB backend. External benchmarks support low overhead on some workloads, with differing versions and test setups limiting what they establish about 7.9.1. The Stack Overflow survey measures satisfaction with the database, leaving driver-specific retention uncertain.
- github.com/Automattic/mongoose/blob/master/package.json: Mongoose's current manifest depends on driver 7.8.
- github.com/NodeBB/NodeBB/blob/master/install/package.json: NodeBB ships driver 7.6 as a runtime dependency.
- dev.to/jscrambler/mongodb-native-driver-vs-mongoose-performance-benchmarks-29hb: An older external benchmark found lower overhead for direct calls on its tested endpoints.
- iamcalegari.github.io/mongoat/explanation/benchmarks: A reproducible v7 comparison found that most differences fell within measurement noise.
- survey.stackoverflow.co/2026/technology/data: 38.5% of MongoDB users wanted to continue using the database.
Safe7.6
How safe is it to depend on?
Claude Opus 5.5: 8.0, likely 7.0 to 9.0
It has an Apache-2.0 licence, only 3 dependencies, and a company release process with signed releases and code review. Several CVEs were disclosed and fixed quickly in late 2026, with no open issues known. The Scorecard is 6.2: pinned dependencies, token permissions, fuzzing and the security-policy check all score 0.
- scorecard score: 6.2; Pinned-Dependencies, Token-Permissions, Security-Policy and Fuzzing score 0
- advisories: 2 old advisories in OSV, none in the last 24 months there
- github.com/mongodb/node-mongodb-native/releases: CVE fixes shipped in v7.8.0, 7.9.0 and 7.9.1 (Oct to Nov 2026)
- npm dependencies: 3 runtime dependencies
GPT-6.2 Sol: 7.2, likely 6.0 to 8.3
The Apache-2.0 driver has three direct runtime dependencies, detached release signatures, and npm provenance attestations. The release notes document several 2026 driver fixes missing from the supplied advisory snapshot, including authentication and credential exposure fixes in 7.9.1. MongoDB fixed a reported release workflow flaw in 16 days and provides a public reporting process. The 6.2 Scorecard, especially weak workflow token permissions and dependency pinning, and uncertainty about how many people hold publishing access keep the range wide.
- npm license, npm dependencies, advisories last24Months, and scorecard checks: Apache-2.0 and three dependencies, with zero scores for token permissions and dependency pinning.
- github.com/mongodb/node-mongodb-native/releases/tag/v7.9.1: Documents the November authentication and credential exposure fixes.
- github.com/mongodb/node-mongodb-native/releases: Documents additional fixes in 7.8 and 7.9 and a timeout fix backported to 6.22.
- securitylab.github.com/advisories/GHSL-2026-166_MongoDB_Node_js_Driver: Independent disclosure timeline records the release workflow fix 16 days after reporting.
- github.com/mongodb/node-mongodb-native: Documents detached package signatures and npm provenance attestations.
- mongodb.com/docs/drivers/node/current/issues-and-help: Directs security reports to MongoDB's vulnerability reporting process.
Good
- It is the official driver, maintained by paid MongoDB staff, with about one release a month.
- It covers the full MongoDB feature set: aggregation, change streams, transactions, GridFS, and client-side and Queryable Encryption.
- It ships its own TypeScript types and pulls in only 3 dependencies.
- Security fixes ship fast: four CVEs were patched across the 7.8 to 7.9.1 releases in October and November 2026.
Bad
- It only helps if you use MongoDB, a smaller and less admired share of developers than PostgreSQL.
- Minor releases sometimes change behaviour: timeoutMS stopped enforcing timeouts in 7.8, and 7.6 refused to connect to MongoDB 4.2 or older.
- It has no schema or validation, so many teams add Mongoose or a validator on top.
- Downloads grew about 2.7x in a year, below the 4.1 median, and a large share arrive through Mongoose.
The numbers
- npm downloads, 4 weeks
- 86M ×2.7 in a year
- GitHub stars
- 10k
- Commits, 12 months
- 204
- npm version
- 7.9.1 Nov 2026
- Versions, 12 months
- 12
- Advisories, 24 months
- 0 of 2 ever
- OpenSSF Scorecard
- 6.2 out of 10, Oct 2026
- Licence
- Apache-2.0
Read on 21 November 2026 from GitHub (mongodb/node-mongodb-native), npm (mongodb), OSV and the OpenSSF Scorecard.
Database drivers
- 8.7node-postgres
- 8.2MongoDB driver
- 8.1better-sqlite3
- 8.0MySQL2
- 7.6PGlite
- 7.5Postgres.js
- 7.4DuckDB Node Neo
- 7.1Neon serverless driver
- 5.9libSQL client
- 1.9node-sqlite3