mcp-registry/mongodb-lens

    ==================
      
       /// MCP ///
      /// MON ///
        
    ==================
        
    [server:online]
    [protocol:ready]

mongodb-lens

by furey

MongoDB Lens – full-featured Model Context Protocol (MCP) server that enables natural-language access to MongoDB databases (querying, aggregation, schema analysis, admin ops, etc.).

175
19
Open Source

Installation

1. Prerequisites
• Node.js ≥ 18
• A running MongoDB instance (local or Atlas) and its connection string.
2. Install
# install globally so the CLI/server is on your PATH npm i -g mongodb-lens # — or add it to a project npm i mongodb-lens --save
3. Configure
• Create a file called lens.config.json (or set env vars) with at least:
• Environment-variable alternatives:
{ "mongoUri": "mongodb+srv://USER:PASS@cluster.mongodb.net/dbName", "port": 3000 } MONGODB_LENS_MONGO_URI=<mongo-connection-string> MONGODB_LENS_PORT=3000
4. Run the MCP server
npx mongodb-lens serve --config lens.config.json # or, if installed globally mongodb-lens serve
5. Verify
• Open http://localhost:3000/health to see a 200 OK.
• The MCP OpenAPI/JSON schema is exposed at /mcp/spec by default.
(Use --help for all CLI flags such as --log-level, --bind, etc.)

Documentation

License: MIT License
Updated 7/30/2025