| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| README.md | 2025-04-03 | 2.6 kB | |
| v9.0.0 source code.tar.gz | 2025-04-03 | 88.6 kB | |
| v9.0.0 source code.zip | 2025-04-03 | 92.7 kB | |
| Totals: 3 Items | 183.9 kB | 0 | |
šš MongoDB Lens v9.0.0
Significant Changes
- MongoDB Driver Upgrade: Upgraded the underlying
mongodbNode.js driver from v3.x to v6.x. While efforts were made to maintain compatibility, this is a major version jump and could introduce subtle behavioral changes. Please test thoroughly. - Removed
map-reduceTool: The deprecatedmap-reducetool and its associated functionality have been completely removed from MongoDB Lens. Users should migrate to the Aggregation Framework (aggregate-datatool). Corresponding documentation and examples have also been removed.
Features
- Comprehensive Test Suite: Introduced a full test suite (
mongodb-lens.test.js) covering tools, resources, and prompts. This improves code quality and provides a way to verify functionality. See the updated README for instructions on running tests (npm test,npm run test:localhost,npm run test:in-memory, etc.) and filtering options (--test,--group,--pattern). - EJSON Input Support: Tool arguments accepting JSON strings now correctly parse MongoDB Extended JSON (EJSON) types (e.g.
ObjectId(...),ISODate(...),{ "$date": "..." }).
Improvements
- Standardized Error Handling: Implemented a consistent error handling mechanism (
withErrorHandling) across most tools, providing more robust and uniform error messages. - Graceful Schema Inference for Empty Collections: The
analyze-schematool and related functions now handle empty collections gracefully, returning a minimal schema structure instead of throwing an error. - Dockerfile Optimization: The
Dockerfilenow usesnpm ci --production, installing only production dependencies, resulting in a smaller final Docker image. - Robust Health Check Prompt: The
database-health-checkprompt is more resilient, handling potential errors during data fetching (e.g. schema inference on empty collections, permission errors for user listing) without failing. - Improved Performance Metrics Formatting: The output for performance metrics (especially long-running operations and slow queries) is now more concise and robust against missing data points.
- Node.js Compatibility: Lowered the minimum required Node.js version from v22 to v18, broadening compatibility.
- Code Cleanup: Various minor internal code refactorings and cleanups.
Dependencies
- Upgraded
mongodbdriver to v6.15.0 (from v3.7.4). - Upgraded
@modelcontextprotocol/sdkto v1.8.0 (from v1.6.1). - Added
mongodb-memory-serveras a dev dependency for the new test suite.