Mongodb Lens logo

Mongodb Lens

by furey

Query, analyze, manage, and export MongoDB data through natural-language MCP tools.

Install Mongodb Lens

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "furey-mongodb-lens": {
      "command": "npx",
      "args": [
        "-y",
        "mongodb-lens"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

npx -y mongodb-lens

No response to initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked 25d ago.

Overview

The furey/mongodb-lens MCP server connects language-model clients to MongoDB databases for queries, aggregations, schema analysis, administration, and data export. It runs locally and exposes MCP tools for switching connections, inspecting database context, managing collections and indexes, analyzing query performance, and working with GridFS. Reach for it when an agent needs conversational access to MongoDB operations, including changes that require confirmation.

Use cases

  • Query MongoDB collections with natural-language requests
  • Analyze schemas and generate JSON Schema validators
  • Inspect query plans and identify optimization opportunities
  • Manage databases, collections, indexes, and users
  • Export query results as JSON or CSV

Key features

  • MongoDB document queries and aggregations
  • Schema inference and comparison
  • Query-pattern and execution-plan analysis
  • Database, collection, index, and user management
  • Geospatial, collation, and GridFS operations
  • JSON and CSV result export

Tools42

What Mongodb Lens lets your agent do. Expand a tool for its parameters.

Self-reported~151 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

7/7 checks healthy over the last 80d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 10d ago via OSV.dev · mongodb-lens (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars208Stargazers on the source repository.
npm downloads204Package downloads in the last 30 days.
Last commit1y agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Tools exposed42Callable tools this server registers over MCP.
Directory activity3 viewsConfig copies, upvotes, and views on AllMCPs.

How Mongodb Lens works

What furey/mongodb-lens MCP server does

The furey/mongodb-lens MCP server gives an MCP-compatible language-model client access to MongoDB through natural-language requests. It is designed for local use and covers both data exploration and database administration. The tool set includes document queries, aggregation pipelines, counts, distinct-value lookups, geospatial searches, collation-aware queries, statistics, and query-plan inspection.

It also supports schema-focused work. Agents can infer a collection schema, compare two collection schemas, and generate JSON Schema validators. For performance tasks, the server can analyze query patterns, explain query execution plans, and create or remove indexes. Query results can be exported as JSON or CSV.

Administrative operations include creating and dropping databases and collections, creating time-series collections, managing indexes and users, and viewing sharding status. GridFS operations provide access to large files stored in MongoDB buckets.

How it works

The server exposes MongoDB operations as MCP tools that an LLM can call from a configured client. A startup MongoDB URI provides the original connection, while connection aliases can be added and used to move between MongoDB targets. Dedicated tools can reconnect to another URI or return to the original startup connection.

The active database context can be inspected with current-database. Other tools operate against that context or accept the relevant database, collection, query, aggregation, or operation parameters. clear-cache is available when fresh data is needed instead of cached results.

Setup and configuration

It specifically gives setup guidance for Claude Desktop and points to Cursor's MCP configuration documentation.

Because the furey/mongodb-lens MCP server connects to databases and can change their contents or structure, configure the MongoDB URI and account permissions with the intended access scope. Test connection aliases and database context against a non-production database before allowing write or administrative actions.

Tools and capabilities

The exposed tools cover these areas:

  • Querying with filters, projections, sorting, counts, distinct values, collation, and geospatial operators.
  • Running aggregation pipelines and exporting results as JSON or CSV.
  • Inspecting schemas, comparing collections, generating validators, and viewing database or collection statistics.
  • Diagnosing query behavior with execution plans and query-pattern analysis.
  • Creating databases, collections, time-series collections, indexes, and users.
  • Deleting documents, dropping databases, collections, indexes, or users, and performing bulk operations.
  • Managing connection aliases, database context, caches, and GridFS buckets.

Limitations and notes

This applies to document deletion, dropping databases, collections, indexes, and users; bulk operations also require confirmation when destructive actions are involved. Renaming a collection requires confirmation when the operation drops its target.

The project is categorized under 🗄️ Databases and is intended for MongoDB access, not as a general-purpose database interface. Verify those details in the repository before using it in production.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Mongodb Lens

furey/mongodb-lens is an MCP server that connects language-model clients to MongoDB databases. Its main tools support document queries, aggregation pipelines, schema analysis, query-plan inspection, database administration, data export, and GridFS operations through natural-language requests.

Install and configure it using the repository's documented instructions.

Yes, the README references Cursor's MCP configuration documentation. Configure the server in Cursor using the connection details and MongoDB settings described in the repository.

Yes, destructive operations require confirmation. The documented cases include deleting documents, dropping databases, collections, indexes, or users, plus destructive bulk operations and collection renames that drop their targets.

Yes, the `export-data` tool exports query results in JSON or CSV format. Use it after producing the desired result set with the server's query tools.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMongodb Lens AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/furey-mongodb-lens?style=directory)](https://allmcps.com/mcp/furey-mongodb-lens)
HTML Embed
<a href="https://allmcps.com/mcp/furey-mongodb-lens"><img src="https://allmcps.com/api/badge/furey-mongodb-lens?style=directory" alt="Mongodb Lens on AllMCPs" /></a>