MCP.so
Sign In

atlas-mcp-server

@mongodb-labs

About atlas-mcp-server

A Model Context Protocol server to connect to MongoDB databases and MongoDB Atlas Clusters.

Config

Add this server to your MCP-compatible client using the configuration below.

{
  "mcpServers": {
    "atlas-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "mongodb-mcp-server@latest",
        "--readOnly"
      ]
    }
  }
}

Tools

18

Run an aggregation against a MongoDB database

Run an aggregation against a MongoDB collection

Describe the indexes for a collection

Describe the schema for a collection

Gets the size of the collection

Connect to a MongoDB instance and get back a connectionId to pass to the other MongoDB tools. Each call establishes a new, independent connection β€” multiple connections can be active at the same time.

Gets the number of documents in a MongoDB collection using db.collection.count() and query as an optional filter parameter

Returns statistics that reflect the use state of a single database

Close a MongoDB connection and revoke its connectionId.

Returns statistics describing the execution of the winning plan chosen by the query optimizer for the evaluated method

Export a query or aggregation results in the specified EJSON format.

Run a find query against a MongoDB collection

List all collections for a given database

List the active MongoDB connections and their connectionIds. Use this to find a connectionId established earlier.

List all databases for a MongoDB connection

Returns the most recent logged mongod events

List available data sources in the MongoDB Assistant knowledge base. Use this to explore available data sources or to find search filter parameters to use in search-knowledge.

Search for information in the MongoDB Assistant knowledge base. This includes official documentation, curated expert guidance, and other resources provided by MongoDB. Supports filtering by data source and version.

Overview

What is atlas-mcp-server?

A Model Context Protocol (MCP) server for interacting with MongoDB databases and MongoDB Atlas. It enables AI assistants to query, analyze, and manage MongoDB data and Atlas infrastructure through standardized MCP interfaces. Designed for developers using MCP-compatible clients like VS Code, Cursor, and Claude Desktop.

How to use atlas-mcp-server?

Install by adding the server to your MCP client’s configuration file using npx -y mongodb-mcp-server@latest or via the Docker image mongodb/mongodb-mcp-server:latest. Provide either a MongoDB connection string or Atlas API service account credentials as environment variables. Use the --readOnly flag for safe read-only access by default.

Key features of atlas-mcp-server

  • Supports MongoDB database tools (CRUD, aggregation, etc.)
  • Supports MongoDB Atlas management tools
  • Includes MongoDB Assistant tools for AI-driven interactions
  • Deployable via npx or Docker
  • Configurable via environment variables, command line, or MCP config
  • Atlas API authentication with service accounts
  • Proxy support for network environments

Use cases of atlas-mcp-server

  • AI-powered database queries and data analysis
  • Automated MongoDB cluster management via Atlas API
  • Read-only data exploration with safety flag
  • Integration with MCP clients for natural-language database operations

FAQ from atlas-mcp-server

What is the difference between using a connection string vs Atlas API credentials?

A connection string gives direct database access; Atlas API credentials (service account client ID and secret) allow management of Atlas resources such as clusters and projects.

What are the runtime requirements?

Node.js version 22.13.0 or later, or Docker if using the containerized version.

How can I ensure safe read-only operations?

Use the --readOnly flag in the server configuration; it is included in all default examples for safety.

Where are credentials stored and how are they provided?

Credentials are provided via environment variables (MDB_MCP_CONNECTION_STRING, MDB_MCP_API_CLIENT_ID, MDB_MCP_API_CLIENT_SECRET) or through MCP client configuration environment fields. Environment variables are recommended over command-line arguments for security.

Does the server support proxy environments?

Yes, proxy support is available; specific configuration details are referenced in the README (see the Proxy Support section).

Frequently asked questions

What is the difference between using a connection string vs Atlas API credentials?

A connection string gives direct database access; Atlas API credentials (service account client ID and secret) allow management of Atlas resources such as clusters and projects.

What are the runtime requirements?

Node.js version 22.13.0 or later, or Docker if using the containerized version.

How can I ensure safe read-only operations?

Use the `--readOnly` flag in the server configuration; it is included in all default examples for safety.

Where are credentials stored and how are they provided?

Credentials are provided via environment variables (`MDB_MCP_CONNECTION_STRING`, `MDB_MCP_API_CLIENT_ID`, `MDB_MCP_API_CLIENT_SECRET`) or through MCP client configuration environment fields. Environment variables are recommended over command-line arguments for security.

Does the server support proxy environments?

Yes, proxy support is available; specific configuration details are referenced in the README (see the Proxy Support section).

Comments

Basic information

Category

Other

License

Apache-2.0

Transports

stdio

Author

mongodb-labs

More Other MCP servers