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. This MCP server exposes most of the mongodb-atlas-api-client surface as MCP tools. - userget — Get a database user by username - usergetall — List all database users - usercreate — Create a database user
Add this skill
npx mdskills install montumodi/mongodb-atlas-mcp-serverComprehensive MCP server exposing 70+ MongoDB Atlas API operations with clear examples and setup docs
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.
This MCP server exposes most of the mongodb-atlas-api-client surface as MCP tools.
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 usercluster_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 failoverproject_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 projectcloud_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 joborganization_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 organizationproject_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 entryproject_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 entryevents_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 eventsatlas_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 analyzersatlas_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 useralert_get_all — List project alertsalert_get — Get alert by IDalert_acknowledge — Acknowledge alertdatalake_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_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)git clone https://github.com/montumodi/mongodb-atlas-mcp-server.git
cd mongodb-atlas-mcp-server
npm install
Before using the server, you need to set up environment variables with your MongoDB Atlas API credentials:
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 IDMONGODB_ATLAS_BASE_URL - Atlas API base URL (defaults to https://cloud.mongodb.com/api/atlas/v1.0)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-id
npm start
This server implements the Model Context Protocol and can be used with any MCP-compatible client. The server communicates over stdin/stdout.
{
"name": "cluster_get_all",
"arguments": {
"options": {
"itemsPerPage": 10
}
}
}
{
"name": "user_create",
"arguments": {
"body": {
"username": "newuser",
"password": "securepassword123",
"roles": [
{
"databaseName": "myapp",
"roleName": "readWrite"
}
],
"databaseName": "admin"
}
}
}
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"]
}
}
}
The server provides detailed error messages for:
npm run dev
npm test
This server exposes MongoDB Atlas API functionality through MCP tools. For detailed information about the underlying Atlas API, refer to:
MIT
For issues and questions:
Install via CLI
npx mdskills install montumodi/mongodb-atlas-mcp-serverMongoDB Atlas MCP Server is a free, open-source AI agent skill. 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. This MCP server exposes most of the mongodb-atlas-api-client surface as MCP tools. - userget — Get a database user by username - usergetall — List all database users - usercreate — Create a database user
Install MongoDB Atlas MCP Server with a single command:
npx mdskills install montumodi/mongodb-atlas-mcp-serverThis downloads the skill files into your project and your AI agent picks them up automatically.
MongoDB Atlas MCP Server works with Claude Code, Claude Desktop, Cursor, Vscode Copilot, Windsurf, Continue Dev, Gemini Cli, Amp, Roo Code, Goose. Skills use the open SKILL.md format which is compatible with any AI coding agent that reads markdown instructions.