
🍃🔎 MongoDB Lens:MongoDB 数据库的全功能 MCP 服务器
概览
是一个本地模型上下文协议(MCP)服务器,通过大型语言模型(LLM)对MongoDB数据库提供完整访问,用于查询、执行聚合、优化性能等。 - 安装 MongoDB Lens - 配置 MongoDB Lens - 设置您的 MCP 客户端(例如 Claude Desktop、Cursor 等) - 通过自然语言查询探索您的 MongoDB 数据库 - add-connection-alias:添加新的MongoDB连接别名 - aggregate-data:执行聚合管道 - analyze-query-patterns:分析实时查询并建议优化 - analyze-schema:自动推断集合模式 - bulk-operations:高效执行多项操作(破坏性操作需确认) - clear-cache:清除内存缓存以确保数据新鲜 - collation-query:查找具有特定语言排序规则的文档 - compare-schemas:比较两个集合之间的模式 - connect-mongodb:连接到不同的MongoDB URI - connect-original:连接回......
概述(AI 翻译)
MongoDB Lens 是一个本地模型上下文协议(MCP)服务器,支持通过大型语言模型(LLM)对 MongoDB 数据库的全功能访问,用于查询、运行聚合、优化性能等。
目录
- 快速入门
- 特色
- 安装
- 配置
- 客户端设置
- 数据保护
- 教程
- 测试套件
- 免责声明
- 支持
快速启动
- 安装MongoDB Lens
- 配置MongoDB Lens
- 设置您的MCP客户端(例如Claude桌面、光标等)
- 通过自然语言查询探索你的MongoDB数据库
特色
- 工具
- 资源
- 提示
- 其他
工具
add-connection-alias:添加新的MongoDB连接别名aggregate-data:执行聚合管道analyze-query-patterns:分析实时查询并提出优化建议analyze-schema:自动推断集合模式bulk-operations:高效执行多项操作(破坏性操作需确认)clear-cache:清除内存缓存以确保数据更新collation-query:查找具有特定语言排序规则的文档compare-schemas:比较两个集合之间的模式
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
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.
Contents
- Quick Start
- Features
- Installation
- Configuration
- Client Setup
- Data Protection
- Tutorial
- Test Suite
- Disclaimer
- Support
Quick Start
- Install MongoDB Lens
- Configure MongoDB Lens
- Set up your MCP Client (e.g. Claude Desktop, Cursor, etc)
- Explore your MongoDB databases with natural language queries
Features
Tools
add-connection-alias: Add a new MongoDB connection aliasaggregate-data: Execute aggregation pipelinesanalyze-query-patterns: Analyze live queries and suggest optimizationsanalyze-schema: Automatically infer collection schemasbulk-operations: Perform multiple operations efficiently (requires confirmation for destructive operations)clear-cache: Clear memory caches to ensure fresh datacollation-query: Find documents with language-specific collation rules
安装
docker run --rm -i --network=host --pull=always -e CONFIG_LOG_LEVEL=verbose furey/mongodb-lens mongodb://your-connection-string配置
{
"mcpServers": {
"mongodb-lens": {
"command": "/path/to/npx",
"args": [
"-y",
"mongodb-lens@latest",
"mongodb://your-connection-string"
]
}
}
}