OfficialDatabases

MongoDB

by MongoDB

Query and manage MongoDB databases and Atlas projects from an assistant, with a read-only mode that keeps it from writing.

Best for

Developers who want an assistant to explore collections, write and tune queries, or inspect Atlas projects against a development database.

Connect MongoDB

Recommended setup

Local

This server runs on your machine. The publisher's guide has the exact command and settings for your client.

Before you connect

A connected assistant can read and, unless --readOnly is set, change your data. The README's examples start read-only and advise giving Atlas service accounts only the permissions they need.

Connection details

Packages

npm package · stdio
mongodb-mcp-server@3.2.1

Docker image · stdio
docker.io/mongodb/mongodb-mcp-server:3.2.1

Overview

This is MongoDB's local MCP server. An assistant can run finds and aggregations, describe collection schemas and indexes, and, with Atlas service-account credentials, manage Atlas resources as well. It starts with npx, which needs Node.js 22.13 or later, or from a Docker image, and connects with a connection string or Atlas API credentials passed through environment variables. The README's examples include a --readOnly flag so writes stay off until you remove it. Destructive tools such as drop-database and delete-many ask for confirmation by default, but only in clients that support elicitation. Telemetry is on by default, and for Atlas itself MongoDB recommends its separate hosted server with OAuth.

What it can do

  • Database tools include find, aggregate, count, explain, collection schema and index inspection, plus write tools for inserting, updating and deleting.
  • Atlas tools appear only when Atlas API service-account credentials are configured.
  • --readOnly turns write operations off, and tools such as drop-database, drop-collection and delete-many ask for confirmation by default where the client supports elicitation.
  • Runs from npm or from a Docker container, which does not need a local Node.js installation.

What you need

Sign-in and credentials

A MongoDB connection string for the database tools, or Atlas API service-account credentials for the Atlas tools. The README recommends environment variables over command-line arguments for both.

Environment variables

51 listed; the first 8 are shown.

  • MDB_MCP_AGGREGATION_COUNT_MAX_TIME_MS_CAP
  • MDB_MCP_AGGREGATION_COUNT_TIMEOUT_MS
  • MDB_MCP_ALLOW_REQUEST_OVERRIDES
  • MDB_MCP_API_CLIENT_IDsecret
  • MDB_MCP_API_CLIENT_SECRETsecret
  • MDB_MCP_ASSISTANT_BASE_URL
  • MDB_MCP_ATLAS_TEMPORARY_DATABASE_USER_LIFETIME_MS
  • MDB_MCP_CONFIRMATION_REQUIRED_TOOLS
Runs as

npm package, Docker image

Sources

MCP Registry
Listed in the MCP Registry as io.github.mongodb-js/mongodb-mcp-server
Last checked
Oct 31, 2026
Record reviewed
Oct 31, 2026

Statements on this page come from

Why is this labelled Official?

Registry name io.github.mongodb-js/mongodb-mcp-server. The registry only lets an organization's owners publish under its io.github.<org> namespace (registry authentication docs, read 2026-10-30). The repository is in the mongodb-js organization, and its README refers to "the MongoDB-hosted Atlas MCP server" and links MongoDB's own documentation at mongodb.com/docs/mcp-server (read 2026-10-31).

Listing on HistChat is not an endorsement or a security review. MCP servers can access data or perform actions, so review the source and permissions before connecting.

  • Firebase

    FirebaseOfficial

    Manage Firebase projects, Firestore data, Authentication users and Crashlytics issues from an AI assistant.

    Category
    Databases
    Connection
    Local
  • Supabase

    SupabaseOfficial

    Connect an assistant to your Supabase projects for SQL, migrations, logs and Edge Functions.

    Category
    Databases
    Connection
    Remote · Local
  • Neon

    NeonOfficial

    Manage Neon Postgres projects, branches and schema migrations in plain language from an assistant.

    Category
    Databases
    Connection
    Remote
    GitHub stars
    659