# furey/mongodb-lens [Health: Active]

**Category:** 🗄️ Databases  
**Repository:** https://github.com/furey/mongodb-lens  
**GitHub Stars:** 208  
**npm Downloads (last month):** 204  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/furey-mongodb-lens

## Description
MongoDB Lens: Full Featured MCP Server for MongoDB Databases

## Tools
Capabilities this server exposes over MCP:

- **add-connection-alias**
- **aggregate-data**
- **analyze-query-patterns**
- **analyze-schema**
- **bulk-operations**
- **clear-cache**
- **collation-query**
- **compare-schemas**
- **connect-mongodb**
- **connect-original**
- **count-documents**
- **create-collection**
- **create-database**
- **create-index**
- **create-timeseries**
- **create-user**
- **current-database**
- **delete-document**
- **distinct-values**
- **drop-collection**
- **drop-database**
- **drop-index**
- **drop-user**
- **explain-query**
- **export-data**
- **find-documents**
- **generate-schema-validator**
- **geo-query**
- **get-stats**
- **gridfs-operation**
- **insert-document**
- **list-collections**
- **list-connections**
- **list-databases**
- **rename-collection**
- **shard-status**
- **text-search**
- **transaction**
- **update-document**
- **use-database**
- **validate-collection**
- **watch-changes**

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "mongodb-lens": {
    "command": "npx",
    "args": ["-y","mongodb-lens"]
  }
}
```

## Documentation

## 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.

_Full upstream README: https://allmcps.com/mcp/furey-mongodb-lens/readme_

