MongoDB Atlas MCP Server
Provides tools for managing MongoDB Atlas resources including database users, clusters, projects, backups, organizations, IP access lists, events, Atlas Search, alerts, Data Lakes, and cloud provider access.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MongoDB Atlas MCP Server list all clusters in my project"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MongoDB Atlas MCP Server
A Model Context Protocol (MCP) server that provides access to the MongoDB Atlas API. This server wraps the mongodb-atlas-api-client package to expose MongoDB Atlas functionality through MCP tools.
Features
This MCP server exposes most of the mongodb-atlas-api-client surface as MCP tools.
Database Users
user_get— Get a database user by usernameuser_get_all— List all database usersuser_create— Create a database useruser_update— Update a database useruser_delete— Delete a database user
Clusters
cluster_get— Get cluster detailscluster_get_all— List clusterscluster_create— Create clustercluster_update— Update clustercluster_delete— Delete clustercluster_get_advanced_configuration— Get processArgs (advanced config)cluster_update_advanced_configuration— Update processArgs (advanced config)cluster_test_primary_failover— Initiate a test primary failover
Projects
project_get_by_id— Get project by IDproject_get_by_name— Get project by nameproject_get_all— List projectsproject_create— Create projectproject_delete— Delete projectproject_get_teams— List teams for a projectproject_remove_user— Remove a user from a projectproject_assign_teams— Assign teams to a project
Cloud Backups
cloud_backup_get_snapshots— List cloud backup snapshots (replicaset)cloud_backup_get_snapshot— Get a specific snapshotcloud_backup_get_restore_job— Get a snapshot restore jobcloud_backup_create_restore_job— Create a snapshot restore job
Organizations
organization_get_by_id— Get organization by IDorganization_get_all— List organizationsorganization_get_users— List users in an organizationorganization_get_projects— List projects in an organizationorganization_delete— Delete organizationorganization_rename— Rename organizationorganization_invite— Invite users to organization
Project Access Lists (current)
project_access_list_get_all— List IP access list entriesproject_access_list_get— Get a specific access list entryproject_access_list_create— Add entries to access listproject_access_list_update— Upsert access list entries (POST semantics)project_access_list_delete— Delete an access list entry
Project Whitelist (legacy)
project_whitelist_get_all— List whitelist entriesproject_whitelist_get— Get a whitelist entryproject_whitelist_create— Add whitelist entriesproject_whitelist_update— Update whitelist entriesproject_whitelist_delete— Delete a whitelist entry
Events
events_get_all— List project eventsevents_get— Get event by ID (project scope)events_get_by_org— Get event by ID for an organizationevents_get_all_by_org— List organization events
Atlas Search
atlas_search_get_all— List indexes for a collectionatlas_search_create— Create an indexatlas_search_get— Get index by IDatlas_search_update— Update index by IDatlas_search_delete— Delete index by IDatlas_search_get_all_analyzers— List analyzersatlas_search_upsert_analyzer— Create/Update analyzers
Atlas Users (Account-level)
atlas_user_get_by_name— Get Atlas user by usernameatlas_user_get_by_id— Get Atlas user by IDatlas_user_get_all— List Atlas users for the projectatlas_user_create— Create Atlas useratlas_user_update— Update Atlas user
Alerts
alert_get_all— List project alertsalert_get— Get alert by IDalert_acknowledge— Acknowledge alert
Data Lake
datalake_get— Get Data Lake by namedatalake_get_all— List Data Lakesdatalake_create— Create Data Lakedatalake_update— Update Data Lakedatalake_delete— Delete Data Lakedatalake_get_logs_stream— Get query logs (returns base64-encoded gzip data)
Cloud Provider Access
cloud_provider_access_get_all— List cloud provider access rolescloud_provider_access_create— Create a rolecloud_provider_access_update— Update a role (roleId + body)cloud_provider_access_delete— Delete a role (cloudProvider + roleId)
Related MCP server: MongoDB MCP Server
Installation
Clone this repository:
git clone https://github.com/montumodi/mongodb-atlas-mcp-server.git
cd mongodb-atlas-mcp-serverInstall dependencies:
npm installConfiguration
Before using the server, you need to set up environment variables with your MongoDB Atlas API credentials:
Required Environment Variables
MONGODB_ATLAS_PUBLIC_KEY- Your MongoDB Atlas API public keyMONGODB_ATLAS_PRIVATE_KEY- Your MongoDB Atlas API private keyMONGODB_ATLAS_PROJECT_ID- Your MongoDB Atlas project/group ID
Optional Environment Variables
MONGODB_ATLAS_BASE_URL- Atlas API base URL (defaults tohttps://cloud.mongodb.com/api/atlas/v1.0)
Getting Atlas API Keys
Log in to MongoDB Atlas
Go to Organization Settings → Access Manager → API Keys
Click Create API Key
Assign appropriate permissions (Project Read/Write access recommended)
Copy the public and private keys
Find your Project ID in the project settings
Example Configuration
export MONGODB_ATLAS_PUBLIC_KEY="your-public-key"
export MONGODB_ATLAS_PRIVATE_KEY="your-private-key"
export MONGODB_ATLAS_PROJECT_ID="your-project-id"Or create a .env file:
MONGODB_ATLAS_PUBLIC_KEY=your-public-key
MONGODB_ATLAS_PRIVATE_KEY=your-private-key
MONGODB_ATLAS_PROJECT_ID=your-project-idUsage
Running the Server
npm startUsing with MCP Clients
This server implements the Model Context Protocol and can be used with any MCP-compatible client. The server communicates over stdin/stdout.
Example Tool Usage
Get All Clusters
{
"name": "cluster_get_all",
"arguments": {
"options": {
"itemsPerPage": 10
}
}
}Create a Database User
{
"name": "user_create",
"arguments": {
"body": {
"username": "newuser",
"password": "securepassword123",
"roles": [
{
"databaseName": "myapp",
"roleName": "readWrite"
}
],
"databaseName": "admin"
}
}
}Get Project Events
Get Data Lake Logs (example)
Note: The logs are returned as base64-encoded gzip data in the text response. Decode base64 and then gunzip to read.
{
"name": "datalake_get_logs_stream",
"arguments": { "dataLakeName": "MyDataLake" }
}{
"name": "events_get_all",
"arguments": {
"options": {
"itemsPerPage": 20,
"eventType": ["CLUSTER"]
}
}
}Error Handling
The server provides detailed error messages for:
Missing or invalid API credentials
Network connectivity issues
Invalid parameters
MongoDB Atlas API errors
Development
Running in Development Mode
npm run devTesting
npm testDependencies
@modelcontextprotocol/sdk - MCP SDK for server implementation
mongodb-atlas-api-client - MongoDB Atlas API client library
API Reference
This server exposes MongoDB Atlas API functionality through MCP tools. For detailed information about the underlying Atlas API, refer to:
Contributing
Fork the repository
Create a feature branch
Make your changes
Add tests if applicable
Submit a pull request
License
MIT
Support
For issues and questions:
Check the MongoDB Atlas API Documentation
Review the mongodb-atlas-api-client documentation
Open an issue in this repository
Available Tools
76 toolsalert_acknowledgeD
Acknowledge an alert
Inputs: alertId (required), body (required), options.
alert_getB
Get an alert by ID
Inputs: alertId (required), options.
alert_get_allC
Get all alerts for the project
Inputs: options.
atlas_search_createB
Create a new Atlas Search index
Inputs: clusterName (required), body (required), options.
atlas_search_deleteC
Delete an Atlas Search index
Inputs: clusterName (required), indexId (required), options.
atlas_search_getC
Get details for a specific Atlas Search index
Inputs: clusterName (required), indexId (required), options.
atlas_search_get_allB
Get all Atlas Search indexes for a cluster
Inputs: clusterName (required), databaseName (required), collectionName (required), options.
atlas_search_get_all_analyzersB
Get all Atlas Search analyzers for a cluster
Inputs: clusterName (required), options.
atlas_search_updateB
Update an Atlas Search index
Inputs: clusterName (required), indexId (required), body (required), options.
atlas_search_upsert_analyzerC
Create or update Atlas Search analyzers for a cluster
Inputs: clusterName (required), body (required), options.
atlas_user_createC
Create an Atlas user
Inputs: body (required), options.
atlas_user_get_allB
Get all Atlas users for the project
Inputs: options.
atlas_user_get_by_idC
Get Atlas user by ID
Inputs: userId (required), options.
atlas_user_get_by_nameB
Get Atlas user by username
Inputs: username (required), options.
atlas_user_updateC
Update an Atlas user by ID
Inputs: userId (required), body (required), options.
cloud_backup_create_restore_jobC
Create a snapshot restore job for a cluster
Inputs: clustername (required), body (required), options.
cloud_backup_get_restore_jobB
Get a specific snapshot restore job for a cluster
Inputs: clustername (required), jobId (required), options.
cloud_backup_get_snapshotB
Get details of a specific snapshot
Inputs: clustername (required), snapshotId (required), options.
cloud_backup_get_snapshotsB
Get all cloud backup snapshots for a cluster
Inputs: clustername (required), options.
cloud_provider_access_createC
Create a cloud provider access role
Inputs: body (required), options.
cloud_provider_access_deleteB
Delete a cloud provider access role
Inputs: cloudProvider (required), roleId (required), options.
cloud_provider_access_get_allC
Get all cloud provider access roles for the project
Inputs: options.
cloud_provider_access_updateC
Update a cloud provider access role
Inputs: roleId (required), body (required), options.
cluster_createC
Create a new cluster
Inputs: body (required), options.
cluster_deleteC
Delete a cluster
Inputs: clustername (required), options.
cluster_getB
Get details of a specific cluster
Inputs: clustername (required), options.
cluster_get_advanced_configurationB
Get advanced configuration (processArgs) for a cluster
Inputs: clustername (required), options.
cluster_get_allB
Get all clusters in the project
Inputs: options.
cluster_test_primary_failoverC
Initiate a test primary failover for the cluster
Inputs: clustername (required), options.
cluster_updateC
Update an existing cluster
Inputs: clustername (required), body (required), options.
cluster_update_advanced_configurationB
Update advanced configuration (processArgs) for a cluster
Inputs: clustername (required), body (required), options.
custom_db_role_createC
Create a custom database role
Inputs: body (required), options.
custom_db_role_deleteB
Delete a custom database role
Inputs: rolename (required), options.
custom_db_role_getB
Get a custom database role by name
Inputs: rolename (required), options.
custom_db_role_get_allC
Get all custom database roles
Inputs: options.
custom_db_role_updateC
Update a custom database role
Inputs: rolename (required), body (required), options.
datalake_createD
Create a Data Lake
Inputs: body (required), options.
datalake_deleteC
Delete a Data Lake
Inputs: dataLakeName (required), options.
datalake_getB
Get a Data Lake by name
Inputs: dataLakeName (required), options.
datalake_get_allC
Get all Data Lakes for the project
Inputs: options.
datalake_get_logs_streamC
Get query logs (gzipped) for a Data Lake as base64-encoded gzip data
Inputs: dataLakeName (required), options.
datalake_updateD
Update a Data Lake
Inputs: dataLakeName (required), body (required), options.
events_getB
Get details of a specific event
Inputs: eventId (required), options.
events_get_allC
Get all events for the project
Inputs: options.
events_get_all_by_orgC
Get all events for a specific organization
Inputs: organizationId (required), options.
events_get_by_orgA
Get an event by ID for a specific organization
Inputs: organizationId (required), eventId (required), options.
organization_deleteC
Delete an organization
Inputs: organizationId (required), options.
organization_get_allB
Get all organizations
Inputs: options.
organization_get_by_idC
Get organization details by ID
Inputs: organizationId (required), options.
organization_get_projectsB
Get all projects for an organization
Inputs: organizationId (required), options.
organization_get_usersC
Get all users for an organization
Inputs: organizationId (required), options.
organization_inviteC
Invite users to an organization
Inputs: organizationId (required), body (required), options.
organization_renameB
Rename an organization
Inputs: organizationId (required), body (required), options.
project_access_list_createC
Add IP addresses to the access list
Inputs: body (required), options.
project_access_list_deleteC
Delete an IP access list entry from the project
Inputs: accesslistentry (required), options.
project_access_list_getB
Get a specific access list entry for the project
Inputs: accesslistentry (required), options.
project_access_list_get_allB
Get all IP access list entries for the project
Inputs: options.
project_access_list_updateB
Update IP access list entries for the project (POST semantics)
Inputs: body (required), options.
project_assign_teamsC
Assign teams to a project
Inputs: projectId (required), body (required), options.
project_createB
Create a new project
Inputs: body (required), options.
project_deleteC
Delete a project by ID
Inputs: projectId (required), options.
project_get_allC
Get all projects
Inputs: options.
project_get_by_idB
Get project details by ID
Inputs: projectId (required), options.
project_get_by_nameB
Get project details by name
Inputs: projectName (required), options.
project_get_teamsC
Get all teams for a given project ID
Inputs: projectId (required), options.
project_remove_userC
Remove a user from a project
Inputs: projectId (required), userId (required), options.
project_whitelist_createC
Add IP addresses to the whitelist (legacy)
Inputs: body (required), options.
project_whitelist_deleteA
Delete an IP whitelist entry from the project (legacy)
Inputs: whitelistentry (required), options.
project_whitelist_getB
Get a specific IP whitelist entry for the project (legacy)
Inputs: whitelistentry (required), options.
project_whitelist_get_allC
Get all IP whitelist entries for the project (legacy)
Inputs: options.
project_whitelist_updateC
Update project whitelist entries (legacy)
Inputs: body (required), options.
user_createC
Create a new database user
Inputs: body (required), options.
user_deleteC
Delete a database user
Inputs: username (required), options.
user_getA
Get a specific database user by username
Inputs: username (required), options.
user_get_allB
Get all database users
Inputs: options.
user_updateC
Update an existing database user
Inputs: username (required), body (required), options.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 76 tools
Most tools have distinct resource-action pairs, but there is potential confusion between `project_access_list_*` and legacy `project_whitelist_*` tools, as they serve similar purposes. Descriptions help differentiate them, but an agent might still pick the wrong one.
All tools follow a consistent `resource_verb` naming pattern in snake_case (e.g., `cluster_create`, `atlas_search_get_all`). No mixed conventions or ambiguous verb styles, making the pattern predictable.
76 tools is quite high, covering a broad API surface. While each tool has a specific purpose, the sheer number can overwhelm agents and may include redundant or overly granular operations (e.g., legacy whitelist vs. access list).
The tool set covers major CRUD operations for clusters, users, backups, search indexes, projects, and organizations. Minor gaps exist, such as no alert update/delete and limited team management, but core workflows are supported.
Maintenance
Related MCP Connectors
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
MCP server for interacting with the Supabase platform
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
One MCP server for all your MCP servers: code mode, per-tool permissions, approvals and audit.
Related MCP Servers
- AlicenseBqualityFmaintenanceAn MCP server that enables users to create and manage MongoDB Atlas clusters, users, and network access through natural language commands.614MIT

MongoDB MCP Serverofficial
AlicenseBqualityAmaintenanceA Model Context Protocol server that enables AI assistants to interact with MongoDB Atlas resources through natural language, supporting database operations and Atlas management functions.281,163Apache 2.0- AlicenseNot gradedqualityDmaintenanceA modular server that enables management of MongoDB databases, collections, documents, indexes, and bulk operations through the Model Context Protocol (MCP) interface.MIT
- AlicenseAqualityBmaintenanceA 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.22Apache 2.0