Home / MCP / MongoDB Atlas MCP Server

MongoDB Atlas MCP Server

Provides MCP-based tools to manage MongoDB Atlas clusters, users, and network access from a unified interface.

typescript
Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
    "mcpServers": {
        "atlas": {
            "command": "npx",
            "args": [
                "mcp-mongodb-atlas"
            ],
            "env": {
                "ATLAS_PUBLIC_KEY": "YOUR_PUBLIC_KEY",
                "ATLAS_PRIVATE_KEY": "YOUR_PRIVATE_KEY"
            }
        }
    }
}

You manage MongoDB Atlas projects through an MCP Server that lets you create clusters, configure network access, manage users, and retrieve connection strings using simple MCP commands. This server provides a centralized, scriptable interface to Atlas resources, enabling you to automate common operational tasks across your projects.

How to use

Use a client that speaks MCP to interact with the Atlas MCP Server. You can run the server from the command line or integrate it into your development environment using a standard MCP configuration. The server exposes tools for creating clusters, setting up network access, creating users, and listing projects and clusters. Provide your Atlas API keys securely, either as environment variables or as command-line arguments, to authorize actions against your Atlas account.

How to install

Prerequisites: you need Node.js and npm installed on your machine.

Install the Atlas MCP package.

Run the install command:

Additional setup and usage notes

Configure your Atlas API keys in a secure way. You can provide them as environment variables or pass them through the command line when you start the MCP server.

Configuration and security

Store your Atlas keys in environment variables to keep them out of command histories and scripts. Use a dedicated, read-only key for operations that don’t require write access where possible.

Tools and endpoints

The Atlas MCP Server supports the following tools: create_atlas_cluster, setup_atlas_network_access, create_atlas_user, get_atlas_connection_strings, list_atlas_projects, list_atlas_clusters.

Available tools

create_atlas_cluster

Create a new MongoDB Atlas cluster within an existing project.

setup_atlas_network_access

Configure network access rules for an Atlas project to control allowed IP addresses.

create_atlas_user

Create a new database user with atlasAdmin privileges for a project.

get_atlas_connection_strings

Retrieve connection strings for a specific Atlas cluster.

list_atlas_projects

List all Atlas projects accessible with the provided API key.

list_atlas_clusters

List all clusters within a specific Atlas project.