Download Latest Version v9.1.4 source code.tar.gz (91.1 kB)
Email in envelope

Get an email when there's a new version of MongoDB Lens

Home / 9.0.0
Name Modified Size InfoDownloads / 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 mongodb Node.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-reduce Tool: The deprecated map-reduce tool and its associated functionality have been completely removed from MongoDB Lens. Users should migrate to the Aggregation Framework (aggregate-data tool). 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-schema tool and related functions now handle empty collections gracefully, returning a minimal schema structure instead of throwing an error.
  • Dockerfile Optimization: The Dockerfile now uses npm ci --production, installing only production dependencies, resulting in a smaller final Docker image.
  • Robust Health Check Prompt: The database-health-check prompt 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 mongodb driver to v6.15.0 (from v3.7.4).
  • Upgraded @modelcontextprotocol/sdk to v1.8.0 (from v1.6.1).
  • Added mongodb-memory-server as a dev dependency for the new test suite.
Source: README.md, updated 2025-04-03