mongodb-lens
by furey·★ 201·综合分 43
MongoDB Lens 是一个全功能的 MCP 服务器,支持通过自然语言与 MongoDB 数据库交互。
概述
MongoDB Lens 是一个全面的模型上下文协议 (MCP) 服务器,通过自然语言命令提供对 MongoDB 数据库的广泛访问。它实现了 MCP 协议,拥有丰富的工具和资源,允许用户使用对话界面执行数据库操作、聚合、模式分析和性能优化。该服务器支持多种 MongoDB 功能,包括事务、地理空间查询、时间序列集合和 GridFS 操作。
试试问 AI
装完之后,这里有 5 个你可以让 AI 做的事:
什么时候选它
如果您需要全面通过自然语言访问 MongoDB 数据库而不必在多个工具和界面间切换,请选择 MongoDB Lens。
什么时候不要选它
如果您需要超出 MongoDB 的多数据库支持,或需要写入应该保持 untouched 的数据库,请避免使用。
此 server 暴露的工具
从 README 抽取出 12 个工具find-documentsRun queries with filters, projections, and sorting
aggregate-dataExecute aggregation pipelines
insert-documentInsert one or more documents into collections
update-documentUpdate documents matching specified criteria
create-databaseCreate a new database with option to switch to it
create-collectionCreate new collections with custom options
analyze-schemaAutomatically infer collection schemas
list-databasesView all accessible databases
list-collectionsExplore collections in the current database
explain-queryAnalyze query execution plans
export-dataExport query results in JSON or CSV format
create-indexCreate new indexes for performance optimization
可对比工具
安装
安装
- 通过 npm 安装:
npm install -g mongodb-lens- 通过 Docker 安装:
docker pull furey/mongodb-lens- 配置 Claude Desktop:
添加到您的 Claude Desktop 配置文件 config.json:
{
"mcpServers": {
"mongodb-lens": {
"command": "npx",
"args": ["-y", "@furey/mongodb-lens"]
}
}
}FAQ
- 如何进行 MongoDB 身份验证?
- 您可以在连接字符串中使用环境变量或配置身份验证。该服务器支持用户名/密码、基于证书和 LDAP 身份验证方法。
- 它是否支持 MongoDB Atlas?
- 是的,通过在配置中提供 Atlas 连接字符串,MongoDB Lens 可以连接到 MongoDB Atlas。
mongodb-lens 对比
最后更新于 · 由 README + GitHub 公开数据自动生成。