返回 MCP 首页

MongoDB

@ 社区模板

提供对 MongoDB 数据库的访问及管理能力
数据库管理
MongoDB
社区 MCP

MongoDB 数据库服务 MCP 接入

通过 MCP 协议提供与 MongoDB 数据库的安全交互。

前往云开发平台运行 MCP Server


环境变量

  • 需要将 MONGO_CONNECT_STRING 配置为 MongoDB 连接字符串(例如:mongodb://user:password@host:port/database?authSource=admin

🗺️ 功能清单

MongoDB Atlas 工具

注意:Atlas 工具仅在配置部分设置凭据时可用

命令名称功能描述
atlas-list-orgs列出 MongoDB Atlas 组织
atlas-list-projects列出 MongoDB Atlas 项目
atlas-create-project创建新的 MongoDB Atlas 项目
atlas-list-clusters列出 MongoDB Atlas 集群
atlas-inspect-cluster检查特定的 MongoDB Atlas 集群
atlas-create-free-cluster创建免费的 MongoDB Atlas 集群
atlas-connect-cluster连接到 MongoDB Atlas 集群
atlas-inspect-access-list检查可访问 MongoDB Atlas 集群的 IP/CIDR 范围
atlas-create-access-list配置 MongoDB Atlas 集群的 IP/CIDR 访问列表
atlas-list-db-users列出 MongoDB Atlas 数据库用户
atlas-create-db-user创建 MongoDB Atlas 数据库用户
atlas-list-alerts列出项目的 MongoDB Atlas 警报

MongoDB 数据库工具

命令名称功能描述
connect连接到 MongoDB 实例
find对 MongoDB 集合运行查找查询
aggregate对 MongoDB 集合运行聚合查询
count获取 MongoDB 集合中的文档数量
insert-one向 MongoDB 集合插入单个文档
insert-many向 MongoDB 集合插入多个文档
create-index为 MongoDB 集合创建索引
update-one更新 MongoDB 集合中的单个文档
update-many更新 MongoDB 集合中的多个文档
rename-collection重命名 MongoDB 集合
delete-one从 MongoDB 集合删除单个文档
delete-many从 MongoDB 集合删除多个文档
drop-collection从 MongoDB 数据库中删除集合
drop-database删除 MongoDB 数据库
list-databases列出 MongoDB 连接的所有数据库
list-collections列出给定数据库的所有集合
collection-indexes描述集合的索引
collection-schema描述集合的模式
collection-storage-size获取集合的大小(MB)
db-stats返回 MongoDB 数据库的统计信息

仓库地址

https://github.com/mongodb-js/mongodb-mcp-server


🔌 使用方式


云开发 MCP 控制台