Skip to content
MongoDB

MongoDB

v1.14.0
Apache-2.0
databasenosqlmongodbatlas

Summary

MongoDB's official MCP server — query databases, explore schemas, and manage Atlas clusters from an AI client.

Features

  • Query collections and inspect schemas in natural language
  • Manage Atlas clusters, users, and network access
  • Read-only mode and per-tool allow lists

Installation

Set up this MCP server in your favorite AI agent — copy a ready-made configuration below.

Any MCP-compatible agent

Most agents (Claude, Cursor, Windsurf, VS Code, and more) read a standard mcpServers configuration.

  1. Open your agent's MCP configuration file.
  2. Merge the snippet below into it, filling in the environment variables with your own values.
  3. Restart the agent — the "MongoDB" tools will be available.
{
  "mcpServers": {
    "mongodb": {
      "command": "npx",
      "args": [
        "-y",
        "mongodb-mcp-server"
      ],
      "env": {
        "MDB_MCP_CONNECTION_STRING": "mongodb://localhost:27017"
      }
    }
  }
}

Description

The official MongoDB MCP server connects an AI assistant to both MongoDB deployments and Atlas control-plane operations.

What it exposes
  • Data operations. Find, aggregate, count, insert, update, and delete documents, with the assistant able to inspect collection schemas first rather than guessing field names.
  • Schema exploration. List databases and collections, sample documents, and describe indexes — which is what makes the assistant's queries correct instead of plausible.
  • Atlas management. Create and inspect clusters, manage database users, and configure network access, for teams that operate on Atlas.
  • Index advice based on the queries you are actually running.
Safety

The server supports a read-only mode and per-tool allow lists, which is worth configuring before pointing it at anything that matters. Connection details are supplied through environment variables rather than the model's context.

Getting started

Runs through npx with a connection string in MDB_MCP_CONNECTION_STRING, or with Atlas API credentials for control-plane access. Works with Claude Desktop, Claude Code, Cursor, VS Code, and any MCP-compatible client.

Related MCP Servers

New

Weaviate's MCP server, built into the database itself — hybrid search, schema inspection, tenant listing and batch upserts at /v1/mcp, scoped by RBAC.

Databases & Data

Google's open-source MCP server for enterprise databases — one binary that fronts AlloyDB, BigQuery, Spanner, Postgres, MySQL, Oracle, MongoDB, Snowflake and more.

Databases & DataCloud & Infrastructure
3 views

MCP: DBHub

by Bytebase

New

A universal database MCP server — one integration for PostgreSQL, MySQL, SQL Server, SQLite, and MariaDB.

Databases & Data
New

Ships inside the Convex CLI — lets an agent inspect deployments, read table schemas, run read-only queries, call functions and check health insights.

Developer ToolsDatabases & Data
Browse all MCP servers →