mongodb
npmv7.6.0TypeScriptThe official MongoDB driver for Node.js
Safe to adopt
Yes — mongodb scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 16 days ago. 50 releases in the last 2 years.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- AMaintenance: grade A, Excellent.
Last published 16 days ago. 50 releases in the last 2 years.
- BWeight: grade B, Good.
Pulls in 12 transitive packages, about 7.0 MB installed.
- ASupply chain: grade A, Excellent.
No install scripts, 2 maintainers, and a contained dependency surface.
- ALicense: grade A, Excellent.
Apache-2.0 — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding mongodb to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Licenses in the dependency tree
Every license you inherit by installing mongodb, not just its own. Check this before a legal review, not after.
Compatibility
- Node.js
- node >=20.19.0
- Module format
- CommonJS only
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the mongodb README.
const { MongoClient } = require('mongodb');
// or as an es module:
// import { MongoClient } from 'mongodb'
// Connection URL
const url = 'mongodb://localhost:27017';
const client = new MongoClient(url);
// Database Name
const dbName = 'myProject';
async function main() {
// Use connect method to connect to the server
await client.connect();mongodb vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
Dependencies
Declared by mongodb v7.6.0. Runtime dependencies are installed with the package; dev dependencies are not.
Peer (7)
Dev (49)
Used by
Popular packages that depend on mongodb.
Relationship graph
Dependencies (left) and dependents (right) of mongodb.
Frequently installed together
An AST-based pattern checker for JavaScript.
TypeScript definitions for node
RFC9562 UUIDs
A family of specs for interoperable TypeScript
Fast, unopinionated, minimalist web framework
Parse, validate, manipulate, and display dates
The fast, flexible & elegant library for parsing and manipulating HTML and XML.
{G,S}et object values using MongoDB-like path notation
Expressive query building for MongoDB
Official client encryption module for the MongoDB Node.js driver
the most correct and second fastest glob implementation in JavaScript
Tiny millisecond conversion utility
Release history
50 releases in the last two years, typically about 1 day apart.
| Version | Published | Size | License |
|---|---|---|---|
| 7.6.0-dev.20260908.sha.83668e62 | 2 days ago | 3.4 MB | Apache-2.0 |
| 7.6.0-dev.20260907.sha.28e455de | 3 days ago | 3.4 MB | Apache-2.0 |
| 7.6.0-dev.20260906.sha.28e455de | 4 days ago | 3.4 MB | Apache-2.0 |
| 7.6.0-dev.20260905.sha.28e455de | 5 days ago | 3.4 MB | Apache-2.0 |
| 7.6.0-dev.20260904.sha.dba1544a | 6 days ago | 3.4 MB | Apache-2.0 |
| 7.6.0-dev.20260903.sha.995edbf6 | 7 days ago | 3.4 MB | Apache-2.0 |
| 7.6.0-dev.20260902.sha.995edbf6 | 8 days ago | 3.4 MB | Apache-2.0 |
| 7.6.0-dev.20260901.sha.995edbf6 | 9 days ago | 3.4 MB | Apache-2.0 |
| 7.6.0-dev.20260831.sha.995edbf6 | 10 days ago | 3.4 MB | Apache-2.0 |
| 7.6.0-dev.20260830.sha.995edbf6 | 11 days ago | 3.4 MB | Apache-2.0 |
| 7.6.0-dev.20260829.sha.995edbf6 | 12 days ago | 3.4 MB | Apache-2.0 |
| 7.6.0-dev.20260828.sha.d0c57c03 | 13 days ago | 3.4 MB | Apache-2.0 |
| 7.6.0-dev.20260827.sha.d0c57c03 | 14 days ago | 3.4 MB | Apache-2.0 |
| 7.6.0-dev.20260826.sha.b71469b3 | 15 days ago | 3.4 MB | Apache-2.0 |
| 7.6.0-dev.20260825.sha.0fb2c132 | 16 days ago | 3.4 MB | Apache-2.0 |
Overview
mongodb is an npm package that the official MongoDB driver for Node.js. It has 3 known dependents in the graph. The latest version is 7.6.0, released under the Apache-2.0 license.
Who should use it
Teams working in the npm ecosystem who need the official MongoDB driver for Node.js and value a focused solution.
When not to use it
Consider an alternative if you need to minimize your dependency tree, or if a more actively-maintained option better fits your npm stack.
Pros
- Ships TypeScript type definitions.
- Clear open-source license (Apache-2.0).
Cons
- Large dependency tree (59 direct dependencies) increases install size and audit surface.
Auto-generated from collected registry metadata. No external claims are inferred.
Frequently asked questions
Should I use mongodb?
Yes — mongodb scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 16 days ago. 50 releases in the last 2 years.
How do I install mongodb?
Run `npm install mongodb` to add mongodb to your npm project.
How many dependencies does mongodb have?
mongodb declares 59 direct dependencies and pulls in 12 packages in total once its runtime tree is resolved totalling about 7.0 MB on disk.
What license is mongodb released under?
mongodb is distributed under the Apache-2.0 license. Its dependency tree also includes: Apache-2.0, BSD-2-Clause, MIT.
How popular is mongodb?
npm does not publish download counts. Within PackageGraph's crawl, 3 known packages depend on mongodb.
Is mongodb still maintained?
The most recent release of mongodb (v7.6.0) was published 16 days ago.
Does mongodb run install scripts?
No. mongodb does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.