MongoDB Atlas MCP Server
Manage MongoDB Atlas projects, including cluster creation, user management, and network access configuration.
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
Watch the demonstration video to see MongoDB Atlas MCP Server in action.
Features
MCP Tools
create_atlas_cluster- Create a new MongoDB Atlas cluster in an existing projectsetup_atlas_network_access- Configure network access for an Atlas projectcreate_atlas_user- Create a new database user with atlasAdmin roleget_atlas_connection_strings- Retrieve connection strings for a clusterlist_atlas_projects- List all Atlas projects accessible with the provided API keylist_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:
- Name:
atlas(or any name you prefer) - Command:
npx mcp-mongodb-atlas - 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": []
}
}
}
- Environment Variables (Optional):
ATLAS_PUBLIC_KEY: Your MongoDB Atlas public keyATLAS_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:
- Log in to your MongoDB Atlas account
- Go to Access Manager > API Keys
- Create a new API key with the appropriate permissions
- 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
Related Servers
Materials Project MCP
Query the Materials Project database using the mp_api client. Requires an MP_API_KEY environment variable.
MLB SportRadar
Access MLB game data, standings, and player statistics using the SportRadar API.
DuckDB Knowledge Graph Memory
An MCP memory server that uses a DuckDB backend for persistent knowledge graph storage.
BioMCP
Connects AI assistants to authoritative biomedical data sources like PubMed and ClinicalTrials.gov, enabling natural language queries.
GraphRAG
Query a hybrid graph (Neo4j) and vector (Qdrant) database for powerful semantic and graph-based document retrieval.
MariaDB / MySQL
Provides access to MariaDB and MySQL databases for querying and data manipulation.
SQL Server Express
An MCP server for interacting with Microsoft SQL Server Express databases.
dbt
Official MCP server for dbt (data build tool) providing integration with dbt Core/Cloud CLI, project metadata discovery, model information, and semantic layer querying capabilities.
Google Data Catalog by CData
A read-only MCP server for Google Data Catalog, powered by CData. Requires a separate CData JDBC Driver for operation.
Quran Cloud
Access the Quran API from alquran.cloud to retrieve accurate Quranic text and reduce LLM hallucinations.
