# MongoDB driver: 8.2 out of 10

A strong pick. 2nd of 10 in [Database drivers](https://elestia.ai/opensource/db-drivers/index.md).

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

- **Overall: 8.2** (likely 7.1 to 8.9)
  - Claude Opus 5.5 (8.0): 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.
  - GPT-6.2 Sol (8.3): 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.
- **Needed by many: 4.8** (likely 3.7 to 5.8)
  - Claude Opus 5.5 (5.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.
  - GPT-6.2 Sol (4.5): 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.
- **Helps a lot: 8.3** (likely 7.3 to 9.3)
  - Claude Opus 5.5 (8.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.
  - GPT-6.2 Sol (8.6): 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.
- **Holds up over time: 8.5** (likely 7.5 to 9.5)
  - Claude Opus 5.5 (8.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.
  - GPT-6.2 Sol (8.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.
- **Used widely: 7.4** (likely 6.4 to 8.4)
  - Claude Opus 5.5 (7.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.
  - GPT-6.2 Sol (7.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.
- **Vouched for: 7.4** (likely 6.3 to 8.4)
  - Claude Opus 5.5 (7.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.
  - GPT-6.2 Sol (7.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.
- **Safe: 7.6** (likely 6.5 to 8.7)
  - Claude Opus 5.5 (8.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.
  - GPT-6.2 Sol (7.2): 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.

## 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

- Downloads, 4 weeks: 86M
- In a year: ×2.7
- GitHub stars: 10k
- Commits, 12 months: 204
- Last npm release: Nov 2026
- Advisories, 24 months: 0
- Licence: Apache-2.0
- GitHub: https://github.com/mongodb/node-mongodb-native
- npm: https://www.npmjs.com/package/mongodb

Scores run from 0 to 10 and are the mean of the scores of AI reviewers (Claude Opus 5.5, GPT-6.2 Sol), made on 22 November 2026 from GitHub, npm, OSV, OpenSSF Scorecard, ecosyste.ms, Hacker News and Bluesky data and a web search. The ecosyste.ms count of repositories that use a project is far too low for projects that grew in the last few years, and some reviews quote it. Overall is the reviewers' own judgement for a new project today, not an average of the parts. An AI wrote them and can be wrong.
