montumodi/mongodb-atlas-mcp-server

๐Ÿ—„๏ธ Databases
0 Views
0 Installs

๐Ÿ“‡ โ˜๏ธ ๐ŸชŸ ๐ŸŽ ๐Ÿง - A Model Context Protocol (MCP) 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.

Quick Install

One-Click IDE Configuration
claude_desktop_config.json
{
  "mcpServers": {
    "montumodi-mongodb-atlas-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "montumodi-mongodb-atlas-mcp-server"
      ]
    }
  }
}
Or

Using an AI coding agent (Claude Code, Cursor, etc.)? Copy a ready-made prompt that tells it to fetch the setup instructions and install this server for you.

Documentation Overview

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 username
  • user_get_all โ€” List all database users
  • user_create โ€” Create a database user
  • user_update โ€” Update a database user
  • user_delete โ€” Delete a database user

Clusters

  • cluster_get โ€” Get cluster details
  • cluster_get_all โ€” List clusters
  • cluster_create โ€” Create cluster
  • cluster_update โ€” Update cluster
  • cluster_delete โ€” Delete cluster
  • cluster_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 ID
  • project_get_by_name โ€” Get project by name
  • project_get_all โ€” List projects
  • project_create โ€” Create project
  • project_delete โ€” Delete project
  • project_get_teams โ€” List teams for a project
  • project_remove_user โ€” Remove a user from a project
  • project_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 snapshot
  • cloud_backup_get_restore_job โ€” Get a snapshot restore job
  • cloud_backup_create_restore_job โ€” Create a snapshot restore job

Organizations

  • organization_get_by_id โ€” Get organization by ID
  • organization_get_all โ€” List organizations
  • organization_get_users โ€” List users in an organization
  • organization_get_projects โ€” List projects in an organization
  • organization_delete โ€” Delete organization
  • organization_rename โ€” Rename organization
  • organization_invite โ€” Invite users to organization

Project Access Lists (current)

  • project_access_list_get_all โ€” List IP access list entries
  • project_access_list_get โ€” Get a specific access list entry
  • project_access_list_create โ€” Add entries to access list
  • project_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 entries
  • project_whitelist_get โ€” Get a whitelist entry
  • project_whitelist_create โ€” Add whitelist entries
  • project_whitelist_update โ€” Update whitelist entries
  • project_whitelist_delete โ€” Delete a whitelist entry

Events

  • events_get_all โ€” List project events
  • events_get โ€” Get event by ID (project scope)
  • events_get_by_org โ€” Get event by ID for an organization
  • events_get_all_by_org โ€” List organization events

Atlas Search

  • atlas_search_get_all โ€” List indexes for a collection
  • atlas_search_create โ€” Create an index
  • atlas_search_get โ€” Get index by ID
  • atlas_search_update โ€” Update index by ID
  • atlas_search_delete โ€” Delete index by ID
  • atlas_search_get_all_analyzers โ€” List analyzers
  • atlas_search_upsert_analyzer โ€” Create/Update analyzers

Atlas Users (Account-level)

  • atlas_user_get_by_name โ€” Get Atlas user by username
  • atlas_user_get_by_id โ€” Get Atlas user by ID
  • atlas_user_get_all โ€” List Atlas users for the project
  • atlas_user_create โ€” Create Atlas user
  • atlas_user_update โ€” Update Atlas user

Alerts

  • alert_get_all โ€” List project alerts
  • alert_get โ€” Get alert by ID
  • alert_acknowledge โ€” Acknowledge alert

Data Lake

  • datalake_get โ€” Get Data Lake by name
  • datalake_get_all โ€” List Data Lakes
  • datalake_create โ€” Create Data Lake
  • datalake_update โ€” Update Data Lake
  • datalake_delete โ€” Delete Data Lake
  • datalake_get_logs_stream โ€” Get query logs (returns base64-encoded gzip data)

Cloud Provider Access

  • cloud_provider_access_get_all โ€” List cloud provider access roles
  • cloud_provider_access_create โ€” Create a role
  • cloud_provider_access_update โ€” Update a role (roleId + body)
  • cloud_provider_access_delete โ€” Delete a role (cloudProvider + roleId)

Installation

  1. Clone this repository:
git clone https://github.com/montumodi/mongodb-atlas-mcp-server.git
cd mongodb-atlas-mcp-server
  1. Install dependencies:
npm install

Configuration

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 key
  • MONGODB_ATLAS_PRIVATE_KEY - Your MongoDB Atlas API private key
  • MONGODB_ATLAS_PROJECT_ID - Your MongoDB Atlas project/group ID

Optional Environment Variables

  • MONGODB_ATLAS_BASE_URL - Atlas API base URL (defaults to https://cloud.mongodb.com/api/atlas/v1.0)

Getting Atlas API Keys

  1. Log in to MongoDB Atlas
  2. Go to Organization Settings โ†’ Access Manager โ†’ API Keys
  3. Click Create API Key
  4. Assign appropriate permissions (Project Read/Write access recommended)
  5. Copy the public and private keys
  6. 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-id

Usage

Running the Server

npm start

Using 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 dev

Testing

npm test

Dependencies

  • @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

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License

MIT

Support

For issues and questions:

Related MCP Servers

modelcontextprotocol/server-postgresVerified

๐Ÿ“‡ ๐Ÿ  - PostgreSQL database integration with schema inspection and query capabilities

๐Ÿ—„๏ธ Databases1 views
Aiven-Open/mcp-aiven

๐Ÿ โ˜๏ธ ๐ŸŽ–๏ธ - Navigate your Aiven projects and interact with the PostgreSQLยฎ, Apache Kafkaยฎ, ClickHouseยฎ and OpenSearchยฎ services

๐Ÿ—„๏ธ Databases0 views
alexanderzuev/supabase-mcp-server

Supabase MCP Server with support for SQL query execution and database exploration tools

๐Ÿ—„๏ธ Databases0 views
aliyun/alibabacloud-tablestore-mcp-server

โ˜• ๐Ÿ โ˜๏ธ - MCP service for Tablestore, features include adding documents, semantic search for documents based on vectors and scalars, RAG-friendly, and serverless.

๐Ÿ—„๏ธ Databases0 views

Engagement

Views
0
Installs
0
Upvotes
0

Views and upvotes are unique per visitor network (hashed IP). Installs count copy actions.

Status

Health: Not checked yet

We have not completed a health check for this listing yet.

No check timestamp yet.

Unclaimed listing (imported or pending owner verification). Claim it โ†’
โ˜… Spotlight Slot

Feature Your MCP Server

Get maximum visibility for your server across our directory, search results, and detail pages.

Spotlight Your Server

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to get the verified badge and attach your website.

Claim this listing

Promote this listing

Optional paid placement. Free listings stay free forever.

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.