# MongoDB Lens (MCP server)

> MongoDB Lens is an MCP server that adds database tools to AI assistants such as Claude Desktop, Claude Code and Cursor. 🍃🔎 MongoDB Lens: Full Featured MCP Server for MongoDB Databases. It has 207 GitHub stars, is released under the MIT license and runs locally with npx -y mongodb-lens.

MongoDB Lens is a local Model Context Protocol (MCP) server with full featured access to MongoDB databases using natural language via LLMs to perform queries, run aggregations, optimize performance, and more.

## Key facts

| Fact | Value |
|---|---|
| Repository | https://github.com/furey/mongodb-lens |
| GitHub stars | 207 |
| License | MIT |
| Language | JavaScript |
| Transport | stdio |
| Packages | npm: mongodb-lens |
| Remote URL | none |
| Needs API key | no |
| Official | no |
| Works with | Claude Desktop, Claude Code, Cursor, VS Code |
| Category | Databases |
| Latest release | 9.1.5 (Nov 7, 2026) |
| Last commit | Nov 7, 2026 |

## Install

### Claude Desktop (claude_desktop_config.json)

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

Settings > Developer > Edit Config. macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\. Restart Claude Desktop afterwards.

### Claude Code

```sh
claude mcp add --env CONFIG_LOG_LEVEL=your-value --transport stdio mongodb-lens -- npx -y mongodb-lens
```

### Cursor (.cursor/mcp.json)

```json
{
  "mcpServers": {
    "mongodb-lens": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "mongodb-lens"
      ],
      "env": {
        "CONFIG_LOG_LEVEL": "your-value"
      }
    }
  }
}
```

Project file; use ~/.cursor/mcp.json to enable it in every project.

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "mongodb-lens": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "mongodb-lens"
      ],
      "env": {
        "CONFIG_LOG_LEVEL": "your-value"
      }
    }
  }
}
```

Config formats checked against the official docs on 2026-10-07.

## Environment variables

- `CONFIG_LOG_LEVEL`: Shown in the README's example configuration.

## Similar MCP servers

- [Customermates](https://appsgit.com/mcp-servers/customermates): Open-source CRM to follow up on every client conversation: LinkedIn and email beside each client, dated next steps, MCP for Claude and ChatGPT, self-hostable core. (222 stars, AGPL-3.0)
- [Crowdsentinel MCP Server](https://appsgit.com/mcp-servers/crowdsentinel-mcp-server): AI threat hunting & incident response for Elasticsearch/OpenSearch with endpoint & network forensics. (204 stars, GPL-3.0, needs API key)
- [Postgres MCP](https://appsgit.com/mcp-servers/postgres-mcp): Enterprise PostgreSQL MCP server with NL queries, hybrid search (pgvector+BM25), and web UI. (246 stars, PostgreSQL, official)
- [MCP Server Starrocks](https://appsgit.com/mcp-servers/mcp-server-starrocks): StarRocks MCP (Model Context Protocol) Server. (196 stars, Apache-2.0, needs API key)
- [MCP Mongo Server](https://appsgit.com/mcp-servers/mcp-mongo-server): A Model Context Protocol Server for MongoDB. (284 stars, MIT)
- [MCP Neo4j Memory](https://appsgit.com/mcp-servers/mcp-neo4j-memory): MCP Neo4j Knowledge Graph Memory Server. (989 stars, MIT, official, needs API key)

---

Canonical page: https://appsgit.com/mcp-servers/mongodb-lens
Source: appsgit (https://appsgit.com), the app store for github. Data from the GitHub API, refreshed daily.
Machine access: JSON API https://appsgit.com/api/v1/apps (OpenAPI: https://appsgit.com/openapi.json), MCP server https://mcp.appsgit.com/mcp, full index https://appsgit.com/llms-full.txt.
