Skip to main content
Glama
mongodb-developer

MongoDB Atlas MCP Server

Official

MongoDB Atlas MCP Server

An MCP (Model Context Protocol) server for managing MongoDB Atlas projects. This package provides tools for creating and managing MongoDB Atlas clusters, users, and network access through the MCP interface.

Demo Video

MongoDB Atlas MCP Server Demo

Watch the demonstration video to see MongoDB Atlas MCP Server in action.

Related MCP server: MongoDB MCP Server

Features

MCP Tools

  • create_atlas_cluster - Create a new MongoDB Atlas cluster in an existing project

  • setup_atlas_network_access - Configure network access for an Atlas project

  • create_atlas_user - Create a new database user with atlasAdmin role

  • get_atlas_connection_strings - Retrieve connection strings for a cluster

  • list_atlas_projects - List all Atlas projects accessible with the provided API key

  • list_atlas_clusters - List all clusters in a specific Atlas project

Installation

npm install mcp-mongodb-atlas

Usage

As a Command Line Tool

You can run the Atlas Project Manager directly from the command line:

# Using environment variables
export ATLAS_PUBLIC_KEY="your-public-key"
export ATLAS_PRIVATE_KEY="your-private-key"
npx mcp-mongodb-atlas

# Or passing keys as arguments
npx mcp-mongodb-atlas "your-public-key" "your-private-key"

With Cline (VSCode Extension)

To use with Cline in VSCode, add the server config to your MCP settings file:

{
  "mcpServers": {
    "atlas": {
      "command": "npx",
      "args": ["mcp-mongodb-atlas"],
      "env": {
        "ATLAS_PUBLIC_KEY": "your-public-key",
        "ATLAS_PRIVATE_KEY": "your-private-key"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

The MCP settings file is located at:

  • macOS: ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

  • Windows: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json

  • Linux: ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

With Cursor

To use with Cursor, go to "Cursor settings" > "MCP" in the settings and add a new server with the following configuration:

  1. Name: atlas (or any name you prefer)

  2. Command: npx mcp-mongodb-atlas

  3. Arguments: provide your API keys as arguments

## Suggested Command
npx mcp-mongodb-atlas <public_key> <private_key>

Newer versions can set the ~/.cursor/mcp.json file with:

{
  "mcpServers": {
    "atlas": {
      "command": "npx",
      "args": ["mcp-mongodb-atlas"],
      "env": {
        "ATLAS_PUBLIC_KEY": "your-public-key",
        "ATLAS_PRIVATE_KEY": "your-private-key"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}
  1. Environment Variables (Optional):

    • ATLAS_PUBLIC_KEY: Your MongoDB Atlas public key

    • ATLAS_PRIVATE_KEY: Your MongoDB Atlas private key

With Claude Desktop

To use with Claude Desktop, add the server config:

On macOS: ~/Library/Application Support/Claude/claude_desktop_config.json On Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "atlas": {
      "command": "npx",
      "args": ["mcp-mongodb-atlas"],
      "env": {
        "ATLAS_PUBLIC_KEY": "your-public-key",
        "ATLAS_PRIVATE_KEY": "your-private-key"
      }
    }
  }
}

API Keys

You need MongoDB Atlas API keys to use this tool. To create API keys:

  1. Log in to your MongoDB Atlas account

  2. Go to Access Manager > API Keys

  3. Create a new API key with the appropriate permissions

  4. Save the public and private keys

Development

Clone the repository and install dependencies:

git clone https://github.com/mongodb-developer/mcp-mongodb-atlas.git
cd mcp-mongodb-atlas
npm install

Build the project:

npm run build

For development with auto-rebuild:

npm run watch

Debugging

Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector:

npm run inspector

The Inspector will provide a URL to access debugging tools in your browser.

License

MIT

Available Tools

6 tools
create_atlas_clusterC

Creates a new Atlas cluster in an existing Atlas project.

ParametersJSON Schema
NameRequiredDescriptionDefault
projectIdYesThe ID of the Atlas project.
clusterNameYesThe name of the cluster to create.
regionYesThe cloud provider region to deploy the cluster in. eg. US_EAST_1
cloudProviderYesThe cloud provider (e.g., AWS, GCP, AZURE).
tierYesThe instance size (e.g., M0, M2, M5).

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states 'Creates', implying a write/mutation operation, but fails to mention critical behavioral aspects such as permissions required, whether this is a long-running operation, potential costs, or what happens on failure. This leaves significant gaps in understanding how the tool behaves beyond its basic function.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without any unnecessary words. It is front-loaded with the core action and resource, making it easy to parse quickly. Every part of the sentence contributes essential information, earning its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of creating a cluster (a significant infrastructure operation) with no annotations and no output schema, the description is insufficient. It lacks details on behavioral traits, error handling, return values, or operational context, leaving the agent poorly equipped to use this tool effectively in real scenarios.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, providing clear documentation for all 5 parameters. The description adds no additional parameter semantics beyond what's in the schema, such as explaining relationships between parameters or providing examples. Given the high schema coverage, a baseline score of 3 is appropriate as the schema handles the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Creates') and resource ('new Atlas cluster in an existing Atlas project'), making the purpose unambiguous. It distinguishes from siblings like 'list_atlas_clusters' by specifying creation rather than listing. However, it doesn't explicitly differentiate from 'setup_atlas_network_access' or 'create_atlas_user' in terms of resource type, which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides minimal guidance by mentioning 'in an existing Atlas project', which implies a prerequisite but doesn't specify when to use this tool versus alternatives. There's no explicit direction on when to choose this over other tools like 'setup_atlas_network_access' or what scenarios warrant cluster creation, leaving the agent with little context for decision-making.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

create_atlas_userB

Creates a new database user for an existing Atlas project. User will have atlasAdmin role.

ParametersJSON Schema
NameRequiredDescriptionDefault
projectIdYesThe ID of the Atlas project.
usernameYesThe username for the database user.
passwordYesThe password for the database user.
rolesNoAn array of roles for the user. Default is [atlasAdmin].

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It states the action is a creation operation and mentions the default role, but lacks details on permissions required, whether the operation is idempotent, rate limits, or what happens on failure. For a mutation tool with zero annotation coverage, this is a significant gap in behavioral disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose and includes key details (project requirement and default role). There is no wasted verbiage, and every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (mutation with 4 parameters), no annotations, and no output schema, the description is moderately complete. It covers the basic purpose and default role but lacks details on behavioral aspects like error handling, response format, or integration with sibling tools. It's adequate but has clear gaps for a creation tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 4 parameters thoroughly. The description adds minimal value beyond the schema by mentioning the default role ('atlasAdmin'), which is partially covered in the schema's description of the 'roles' parameter. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Creates a new database user') and the resource ('for an existing Atlas project'), with specific role information ('atlasAdmin role'). It distinguishes from siblings like 'create_atlas_cluster' (creates clusters) and 'list_atlas_projects' (lists projects), though it doesn't explicitly mention these distinctions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context ('for an existing Atlas project'), suggesting this tool should be used when a project already exists. However, it doesn't provide explicit guidance on when to use this versus alternatives like 'setup_atlas_network_access' or prerequisites beyond project existence.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_atlas_connection_stringsC

Retrieves connection strings for a cluster in an existing Atlas project.

ParametersJSON Schema
NameRequiredDescriptionDefault
projectIdYesThe ID of the Atlas project.
clusterNameYesThe name of the cluster.

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool retrieves data, implying a read-only operation, but lacks details on authentication needs, rate limits, error conditions, or what the output format entails (e.g., types of connection strings). This leaves significant gaps in understanding how the tool behaves in practice.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is front-loaded and wastes no space, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete for a tool that retrieves data. It does not explain what connection strings are returned (e.g., MongoDB URI formats, driver-specific strings) or any behavioral aspects like permissions or response structure, leaving the agent with insufficient context to use the tool effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, clearly documenting both parameters ('projectId' and 'clusterName'). The description adds no additional meaning beyond this, such as format examples or constraints, but the schema adequately covers the basics, meeting the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Retrieves') and resource ('connection strings for a cluster in an existing Atlas project'), making the purpose understandable. However, it does not explicitly differentiate from sibling tools like 'list_atlas_clusters' or 'setup_atlas_network_access' in terms of specific use cases or data returned, which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, such as when to retrieve connection strings instead of listing clusters or setting up network access. It mentions 'existing Atlas project' but does not specify prerequisites or exclusions, leaving usage context vague.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_atlas_clustersC

Lists all clusters in an Atlas project.

ParametersJSON Schema
NameRequiredDescriptionDefault
projectIdYesThe ID of the Atlas project.

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action but lacks critical details such as whether this is a read-only operation, potential rate limits, authentication requirements, pagination behavior, or error handling. This leaves significant gaps for an agent to understand how to invoke it safely.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is front-loaded and wastes no space, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It does not address behavioral aspects like safety, performance, or output format, which are crucial for a list operation. While concise, it fails to provide enough context for reliable agent use without additional assumptions.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with 'projectId' clearly documented. The description implies the parameter by mentioning 'in an Atlas project' but adds no additional semantic context beyond what the schema provides, such as format examples or sourcing instructions. This meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Lists') and resource ('all clusters in an Atlas project'), making the purpose immediately understandable. However, it does not explicitly differentiate from sibling tools like 'list_atlas_projects' or 'get_atlas_connection_strings', which would require mentioning specific scope or output differences.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It does not mention prerequisites (e.g., needing a project ID), exclusions, or comparisons to siblings like 'list_atlas_projects' for broader listings or 'get_atlas_connection_strings' for cluster-specific details.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_atlas_projectsB

Lists all Atlas projects that the API key has access to.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden but only states that it lists projects accessible by the API key. It misses key behavioral details like pagination, rate limits, error handling, or response format, leaving significant gaps for agent understanding.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with no wasted words, clearly front-loading the core action. It's appropriately sized for a simple list operation with no parameters.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It fails to explain what the output includes (e.g., project details, format) or behavioral aspects like permissions or limitations, making it insufficient for full agent comprehension.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Since there are 0 parameters and schema description coverage is 100%, the baseline is high. The description adds no parameter information, which is acceptable here as no parameters exist, but it doesn't compensate for any gaps (none present).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Lists') and resource ('all Atlas projects'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'list_atlas_clusters' beyond the resource name, missing explicit distinction in scope or function.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, such as 'list_atlas_clusters' or 'get_atlas_connection_strings'. It lacks context on prerequisites, timing, or exclusions, offering only a basic statement of function.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

setup_atlas_network_accessC

Sets up network access for an existing Atlas project. Accepts list of IP addresses or CIDR blocks.

ParametersJSON Schema
NameRequiredDescriptionDefault
projectIdYesThe ID of the Atlas project.
ipAddressesYesAn array of IP addresses or CIDR blocks for network access.

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but offers minimal behavioral context. It states the tool 'Sets up network access' (implying a write/mutation operation) but doesn't disclose permissions needed, whether changes are reversible, rate limits, or what happens to existing network settings. This is inadequate for a mutation tool without annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized with two concise sentences that directly address the tool's function and parameter scope. It's front-loaded with the core purpose and avoids unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations and no output schema, the description is insufficient. It lacks crucial details like expected response format, error conditions, side effects, or how this tool interacts with sibling operations (e.g., whether network access affects cluster creation).

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters fully. The description adds minimal value by mentioning 'IP addresses or CIDR blocks' for the ipAddresses parameter, but doesn't provide additional syntax, format details, or constraints beyond what the schema states.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Sets up network access') and target resource ('for an existing Atlas project'), providing specific verb+resource pairing. However, it doesn't explicitly differentiate from sibling tools like 'create_atlas_cluster' or 'list_atlas_projects', which would require a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., project must exist), exclusions, or compare with sibling tools like 'get_atlas_connection_strings' for related network tasks.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

B3.4/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose targeting specific Atlas resources: clusters, users, connection strings, projects, and network access. There is no overlap in functionality, making it easy for an agent to select the correct tool for any given task.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern with 'atlas' as a prefix (e.g., create_atlas_cluster, list_atlas_projects). The naming is uniform and predictable, using snake_case throughout without any deviations.

Tool Count4/5

With 6 tools, the count is reasonable for managing MongoDB Atlas resources, covering key operations like creation, listing, and setup. It is slightly lean but sufficient for core tasks, though additional tools for updates or deletions could enhance coverage.

Completeness4/5

The tools provide good coverage for core Atlas operations, including creation and listing of clusters and projects, user management, and network setup. However, there are minor gaps, such as missing update or delete operations for clusters and users, which agents might need to work around.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that enables large language models to interact directly with MongoDB databases, allowing them to query collections, inspect schemas, and manage data through natural language.
    47
    MIT
  • A
    license
    B
    quality
    A
    maintenance
    A Model Context Protocol server that enables AI assistants to interact with MongoDB Atlas resources through natural language, supporting database operations and Atlas management functions.
    28
    78,836
    1,118
    Apache 2.0
  • A
    license
    A
    quality
    B
    maintenance
    A Model Context Protocol server that enables interaction with MongoDB databases and MongoDB Atlas, allowing users to perform database operations and manage Atlas resources through natural language.
    22
    78,836
    Apache 2.0
  • A
    license
    C
    quality
    D
    maintenance
    A Model Context Protocol server that provides access to the MongoDB Atlas API, enabling management of clusters, users, projects, backups, and more through MCP tools.
    76
    36
    3
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mongodb-developer/mcp-mongodb-atlas'

If you have feedback or need assistance with the MCP directory API, please join our Discord server