专属
文档
插件
助手
邀请
顶部
快速返回页面顶部
收起
收起工具栏
轩辕镜像 官方专业版
轩辕镜像
专业版
轩辕镜像 官方专业版
轩辕镜像
专业版
首页个人中心搜索镜像

交易
充值流量我的订单

文档

工具

功能
提交工单页面收录

帮助
轩辕镜像免费版

其他
关于我们网站地图
热门搜索:
mongodb-mcp-server

mongodb/mongodb-mcp-server

mongodb

官方MongoDB MCP服务器镜像,用于部署和运行MongoDB MCP服务,提供官方支持的可靠运行环境。

3 次收藏下载次数: 0状态:社区镜像维护者:mongodb仓库类型:镜像最近更新:11 天前
让 AI 帮你使用轩辕镜像? · 展开查看说明

如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。

只需在 AI 对话中先发送下面这句话即可:

请先完整阅读并严格遵守以下文档中的全部规则与要求:

https://xuanyuan.cloud/agents.md

在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。

查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。

轩辕镜像,快一点,稳很多。点击查看
DockerHub 官方简介
轩辕镜像中文简介
标签下载
镜像标签列表与下载命令
轩辕镜像,快一点,稳很多。点击查看

MongoDB MCP Server

A Model Context Protocol server for interacting with MongoDB Databases and MongoDB Atlas.

Prerequisites

  • Node.js (v20 or later)
shell
node -v
  • A MongoDB connection string or Atlas API credentials, the Server will not start unless configured.
    • Service Accounts Atlas API credentials are required to use the Atlas tools. You can create a service account in MongoDB Atlas and use its credentials for authentication. See Atlas API Access for more details.
    • If you have a MongoDB connection string, you can use it directly to connect to your MongoDB instance.

Setup

Quick Start

Most MCP clients require a configuration file to be created or modified to add the MCP server.

Note: The configuration file syntax can be different across clients. Please refer to the following links for the latest expected syntax:

  • Windsurf:[***]
  • VSCode: [***]
  • Claude Desktop: [***]
  • Cursor: [***]

You may provide either a MongoDB connection string OR Atlas API credentials:

Option A: No configuration

shell
docker run --rm -i \
  mongodb/mongodb-mcp-server:latest

Option B: With MongoDB connection string

shell
docker run --rm -i \
  -e MDB_MCP_CONNECTION_STRING="mongodb+srv://username:password@cluster.mongodb.net/myDatabase" \
  mongodb/mongodb-mcp-server:latest

Option C: With Atlas API credentials

shell
docker run --rm -i \
  -e MDB_MCP_API_CLIENT_ID="your-atlas-service-accounts-client-id" \
  -e MDB_MCP_API_CLIENT_SECRET="your-atlas-service-accounts-client-secret" \
  mongodb/mongodb-mcp-server:latest

MCP Configuration File

Without options:

json
{
  "mcpServers": {
    "MongoDB": {
      "command": "docker",
      "args": ["run", "--rm", "-i", "mongodb/mongodb-mcp-server:latest"]
    }
  }
}

With connection string:

json
{
  "mcpServers": {
    "MongoDB": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-e",
        "MDB_MCP_CONNECTION_STRING=mongodb+srv://username:password@cluster.mongodb.net/myDatabase",
        "mongodb/mongodb-mcp-server:latest"
      ]
    }
  }
}

With Atlas API credentials:

json
{
  "mcpServers": {
    "MongoDB": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-e",
        "MDB_MCP_API_CLIENT_ID=your-atlas-service-accounts-client-id",
        "-e",
        "MDB_MCP_API_CLIENT_SECRET=your-atlas-service-accounts-client-secret",
        "mongodb/mongodb-mcp-server:latest"
      ]
    }
  }
}

🛠️ Supported Tools

Tool List

MongoDB Atlas Tools

  • atlas-list-orgs - Lists MongoDB Atlas organizations
  • atlas-list-projects - Lists MongoDB Atlas projects
  • atlas-create-project - Creates a new MongoDB Atlas project
  • atlas-list-clusters - Lists MongoDB Atlas clusters
  • atlas-inspect-cluster - Inspect a specific MongoDB Atlas cluster
  • atlas-create-free-cluster - Create a free MongoDB Atlas cluster
  • atlas-connect-cluster - Connects to MongoDB Atlas cluster
  • atlas-inspect-access-list - Inspect IP/CIDR ranges with access to MongoDB Atlas clusters
  • atlas-create-access-list - Configure IP/CIDR access list for MongoDB Atlas clusters
  • atlas-list-db-users - List MongoDB Atlas database users
  • atlas-create-db-user - List MongoDB Atlas database users

NOTE: atlas tools are only available when you set credentials on configuration section.

MongoDB Database Tools

  • connect - Connect to a MongoDB instance
  • find - Run a find query against a MongoDB collection
  • aggregate - Run an aggregation against a MongoDB collection
  • count - Get the number of documents in a MongoDB collection
  • insert-one - Insert a single document into a MongoDB collection
  • insert-many - Insert multiple documents into a MongoDB collection
  • create-index - Create an index for a MongoDB collection
  • update-one - Update a single document in a MongoDB collection
  • update-many - Update multiple documents in a MongoDB collection
  • rename-collection - Rename a MongoDB collection
  • delete-one - Delete a single document from a MongoDB collection
  • delete-many - Delete multiple documents from a MongoDB collection
  • drop-collection - Remove a collection from a MongoDB database
  • drop-database - Remove a MongoDB database
  • list-databases - List all databases for a MongoDB connection
  • list-collections - List all collections for a given database
  • collection-indexes - Describe the indexes for a collection
  • collection-schema - Describe the schema for a collection
  • collection-storage-size - Get the size of a collection in MB
  • db-stats - Return statistics about a MongoDB database

Configuration

The MongoDB MCP Server can be configured using multiple methods, with the following precedence (highest to lowest):

  1. Command-line arguments
  2. Environment variables

Configuration Options

OptionDescription
apiClientIdAtlas API client ID for authentication
apiClientSecretAtlas API client secret for authentication
connectionStringMongoDB connection string for direct database connections (optional users may choose to inform it on every tool call)
logPathFolder to store logs
disabledToolsAn array of tool names, operation types, and/or categories of tools that will be disabled
readOnlyWhen set to true, only allows read and metadata operation types, disabling create/update/delete operations
telemetryWhen set to disabled, disables telemetry collection

Log Path

Default log location is as follows:

  • Windows: %LOCALAPPDATA%\mongodb\mongodb-mcp\.app-logs
  • macOS/Linux: ~/.mongodb/mongodb-mcp/.app-logs

Disabled Tools

You can disable specific tools or categories of tools by using the disabledTools option. This option accepts an array of strings, where each string can be a tool name, operation type, or category.

The way the array is constructed depends on the type of configuration method you use:

  • For environment variable configuration, use a comma-separated string: export MDB_MCP_DISABLED_TOOLS="create,update,delete,atlas,collectionSchema".
  • For command-line argument configuration, use a space-separated string: --disabledTools create update delete atlas collectionSchema.

Categories of tools:

  • atlas - MongoDB Atlas tools, such as list clusters, create cluster, etc.
  • mongodb - MongoDB database tools, such as find, aggregate, etc.

Operation types:

  • create - Tools that create resources, such as create cluster, insert document, etc.
  • update - Tools that update resources, such as update document, rename collection, etc.
  • delete - Tools that delete resources, such as delete document, drop collection, etc.
  • read - Tools that read resources, such as find, aggregate, list clusters, etc.
  • metadata - Tools that read metadata, such as list databases, list collections, collection schema, etc.

Read-Only Mode

The readOnly configuration option allows you to restrict the MCP server to only use tools with "read" and "metadata" operation types. When enabled, all tools that have "create", "update" or "delete" operation types will not be registered with the server.

This is useful for scenarios where you want to provide access to MongoDB data for analysis without allowing any modifications to the data or infrastructure.

You can enable read-only mode using:

  • Environment variable: export MDB_MCP_READ_ONLY=true
  • Command-line argument: --readOnly

When read-only mode is active, you'll see a message in the server logs indicating which tools were prevented from registering due to this restriction.

Telemetry

The telemetry configuration option allows you to disable telemetry collection. When enabled, the MCP server will collect usage data and send it to MongoDB.

You can disable telemetry using:

  • Environment variable: export MDB_MCP_TELEMETRY=disabled
  • Command-line argument: --telemetry disabled
  • DO_NOT_TRACK environment variable: export DO_NOT_TRACK=1

Atlas API Access

To use the Atlas API tools, you'll need to create a service account in MongoDB Atlas:

  1. Create a Service Account:

    • Log in to MongoDB Atlas at cloud.mongodb.com
    • Navigate to Access Manager > Organization Access
    • Click Add New > Applications > Service Accounts
    • Enter name, description and expiration for your service account (e.g., "MCP, MCP Server Access, 7 days")
    • Select appropriate permissions (for full access, use Organization Owner)
    • Click "Create"

To learn more about Service Accounts, check the MongoDB Atlas documentation.

  1. Save Client Credentials:

    • After creation, you'll be shown the Client ID and Client Secret
    • Important: Copy and save the Client Secret immediately as it won't be displayed again
  2. Add Access List Entry:

    • Add your IP address to the API access list
  3. Configure the MCP Server:

    • Use one of the configuration methods below to set your apiClientId and apiClientSecret

Configuration Methods

Environment Variables

Set environment variables with the prefix MDB_MCP_ followed by the option name in uppercase with underscores:

shell
# Set Atlas API credentials (via Service Accounts)
export MDB_MCP_API_CLIENT_ID="your-atlas-service-accounts-client-id"
export MDB_MCP_API_CLIENT_SECRET="your-atlas-service-accounts-client-secret"

# Set a custom MongoDB connection string
export MDB_MCP_CONNECTION_STRING="mongodb+srv://username:password@cluster.mongodb.net/myDatabase"

export MDB_MCP_LOG_PATH="/path/to/logs"

MCP configuration file examples

Connection String with environment variables

json
{
  "mcpServers": {
    "MongoDB": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "mongodb/mongodb-mcp-server"],
      "env": {
        "MDB_MCP_CONNECTION_STRING": "mongodb+srv://username:password@cluster.mongodb.net/myDatabase"
      }
    }
  }
}

Atlas API credentials with environment variables

json
{
  "mcpServers": {
    "MongoDB": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "mongodb/mongodb-mcp-server"],
      "env": {
        "MDB_MCP_API_CLIENT_ID": "your-atlas-service-accounts-client-id",
        "MDB_MCP_API_CLIENT_SECRET": "your-atlas-service-accounts-client-secret"
      }
    }
  }
}

Command-Line Arguments

Pass configuration options as command-line arguments when starting the server:

shell
docker run -i --rm mongodb/mongodb-mcp-server  --apiClientId="your-atlas-service-accounts-client-id" --apiClientSecret="your-atlas-service-accounts-client-secret" --connectionString="mongodb+srv://username:password@cluster.mongodb.net/myDatabase" --logPath=/path/to/logs

MCP configuration file examples

Connection String with command-line arguments

json
{
  "mcpServers": {
    "MongoDB": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "mongodb/mongodb-mcp-server",
        "--connectionString",
        "mongodb+srv://username:password@cluster.mongodb.net/myDatabase"
      ]
    }
  }
}

Atlas API credentials with command-line arguments

json
{
  "mcpServers": {
    "MongoDB": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "mongodb/mongodb-mcp-server",
        "--apiClientId",
        "your-atlas-service-accounts-client-id",
        "--apiClientSecret",
        "your-atlas-service-accounts-client-secret"
      ]
    }
  }
}

🤝 Contributing

Interested in contributing? Great! Please check our https://github.com/mongodb-js/mongodb-mcp-server/blob/main/CONTRIBUTING.md for guidelines on code contributions, standards, adding new tools, and troubleshooting information.

更多相关 Docker 镜像与资源

以下是 mongodb/mongodb-mcp-server 相关的常用 Docker 镜像,适用于 不同场景 等不同场景:

  • mongodb/mongodb-community-server Docker 镜像说明(MongoDB 社区版,NoSQL 文档数据库,适合灵活数据模型)
  • library/mongo Docker 镜像说明
  • percona/percona-server-mongodb Docker 镜像说明(Percona Server for MongoDB,MongoDB 兼容增强版,适合生产级文档库与高可用部署)
  • amd64/mongo Docker 镜像说明(MongoDB 数据库,AMD64 架构版本)
  • arm64v8/mongo Docker 镜像说明(arm64v8 架构 MongoDB,适合 ARM64 文档数据库部署)

镜像拉取方式

您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

轩辕镜像加速拉取命令点我查看更多 mongodb-mcp-server 镜像标签

docker pull docker.xuanyuan.run/mongodb/mongodb-mcp-server:<标签>

使用方法:

  • 登录认证方式
  • 免认证方式

DockerHub 原生拉取命令

docker pull mongodb/mongodb-mcp-server:<标签>

更多 mongodb-mcp-server 镜像推荐

mongodb/mongodb-atlas-local logo

mongodb/mongodb-atlas-local

mongodb
通过Docker创建、管理和自动化MongoDB Atlas Local资源
12 次收藏500万+ 次下载
25 天前更新
mongodb/mongodb-community-server logo

mongodb/mongodb-community-server

mongodb
官方MongoDB社区服务器是由MongoDB公司推出的免费开源文档数据库服务,专为开发者与技术社区打造,支持以JSON格式存储灵活的非结构化及半结构化数据,具备高可扩展性、易部署性和丰富的查询功能,广泛应用于Web开发、大数据分析、移动应用后端等场景,为用户提供高效的数据管理解决方案并促进社区协作与技术交流。
186 次收藏1000万+ 次下载
18 天前更新
mongodb/mongodb-enterprise-server logo

mongodb/mongodb-enterprise-server

mongodb
MongoDB官方企业高级服务器是面向企业级应用的高性能、可扩展文档数据库服务器,支持复杂查询、分布式部署与实时数据分析,提供企业级安全特性(如身份验证、数据加密)、完善的数据备份与恢复机制及专业监控工具,助力企业构建稳定高效的现代应用架构,满足大规模数据存储、处理与业务创新需求。
15 次收藏500万+ 次下载
18 天前更新
mongodb/mongodb-atlas-kubernetes-operator logo

mongodb/mongodb-atlas-kubernetes-operator

mongodb
MongoDB Atlas Kubernetes Operator - 基于Kubernetes原生管理MongoDB Atlas基础设施
5 次收藏100万+ 次下载
18 天前更新
mongodb/mongodb-atlas-search logo

mongodb/mongodb-atlas-search

mongodb
Atlas Search提供无缝、可扩展的体验,用于构建基于相关性的应用功能。
4 次收藏100万+ 次下载
2 个月前更新
mongodb/mongodb-community-search logo

mongodb/mongodb-community-search

mongodb
MongoDB Community Search Docker镜像由MongoDB官方维护,提供MongoDB社区版的搜索功能支持,适用于部署具备搜索能力的MongoDB社区版实例,可通过官方文档、Reddit社区及技术支持获取帮助。
1 次收藏50万+ 次下载
24 天前更新

查看更多 mongodb-mcp-server 相关镜像

轩辕镜像配置手册

按平台快速找到配置文档

Docker

登录仓库拉取

登录认证 · 私有仓库

专属域名拉取

免登录 · 高速拉取

Linux

Docker 镜像配置

Windows / Mac

Docker Desktop 配置

MacOS OrbStack

OrbStack 容器

Docker Compose

Compose 项目配置

NAS

群晖

Synology 配置

飞牛

fnOS 镜像配置

绿联

绿联 NAS

威联通

QNAP 配置

极空间

极空间 NAS

企业仓库

其他仓库

ghcr · Quay · nvcr

Harbor 镜像源

Proxy Repository 对接

Portainer 镜像源

Registries 配置

Nexus 镜像源

Docker Proxy 缓存

开发工具

Dev Containers

VS Code 开发容器

Podman

Podman 配置指南

Singularity / Apptainer

HPC 科学计算容器

Kubernetes

K8s Containerd

Kubernetes · Containerd

K3s

轻量级集群

面板 / 网络

爱快路由

iKuai 镜像加速

宝塔面板

一键配置镜像源

AI

用 AI 使用轩辕镜像

agents.md · AI 对话 · 提示词

一键安装

一键安装 Docker

Linux Docker 一键安装

需要其他帮助?请查看我们的 常见问题 Docker 镜像访问常见问题解答 或 提交工单

镜像拉取常见问题

功能

免费版与专业版区别

功能对比 · 版本选择

支持的镜像仓库

Docker Hub · GCR · GHCR

新手拉取配置

登录 · 专属域名 · 配置

docker search 限制

专属域名 · Hub 搜索

不支持 push

仅支持 pull · 不支持

拉取速度原因

带宽 · 缓存 · 冷热镜像

错误码

402 与流量用尽

402 · 流量包 · 充值

401 认证失败

401 · docker login

manifest unknown

标签错误 · 镜像不存在

410 Gone 排查

410 · Docker 升级

429 限流

免费版 · 请求频率

其他报错

DNS 超时

DNS 解析 · 网络超时

TLS 证书失败

no matching manifest(架构)

账号

失败是否计费

manifest · blob · 计费

申请开发票(企业 / 个人)

企业 · 个人 · 工单

修改登录密码

网站 · 仓库 · 重置

注销账户

工单 · 数据 · 注销

原理

mirrors 不生效

daemon.json · 重启

去掉域名前缀

docker tag · 重命名

指定架构拉取

ARM64 · AMD64 · 多架构

latest 与「最新」

digest · 版本号 · 标签

查看全部问题→

用户好评

来自真实用户的反馈,见证轩辕镜像的优质服务

用户头像

oldzhang

运维工程师

Linux服务器

5

"Docker访问体验非常流畅,大镜像也能快速完成下载。"

轩辕镜像
镜像详情
...
mongodb/mongodb-mcp-server
教程轩辕镜像功能与使用教程
价格查看流量套餐与价格
热门查看热门 Docker 镜像推荐
博客Docker 镜像公告与技术博客
官方公众号:源码跳动|官方技术交流群:51517718
官方公众号:源码跳动|官方技术交流群:|问题咨询请:提交工单
商务合作:点击复制邮箱
©2024-2026 源码跳动
商务合作:点击复制邮箱Copyright © 2024-2026 杭州源码跳动科技有限公司. All rights reserved.