Registry / database / mcp-mongodb-atlas

mcp-mongodb-atlas

JSON →
library0.1.10jsnpmunverified

An MCP (Model Context Protocol) server for managing MongoDB Atlas projects, providing tools to create clusters, manage users, configure network access, retrieve connection strings, and list projects/clusters. Version 0.1.10 is the latest stable release, actively maintained by MongoDB. It differentiates from direct Atlas API usage by offering a standardized MCP interface compatible with AI assistants like Claude, Cline, and Cursor. The package includes TypeScript type definitions and supports both environment variable and command-line argument authentication.

npm install mcp-mongodb-atlas
INSTALL
IMPORT
SIG · MCP-MONGODB-ATLAS
M
mcp-mongodb-atlas
databasejavascriptv0.1.10
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import mcpMongodbAtlas from 'mcp-mongodb-atlas'; or run via CLI: npx mcp-mongodb-atlas
const mcpMongodbAtlas = require('mcp-mongodb-atlas');
This package is primarily a CLI tool; programmatic usage imports the server class. ESM-only since v0.1.0.
AtlasMCP
import { AtlasMCP } from 'mcp-mongodb-atlas';
const AtlasMCP = require('mcp-mongodb-atlas').AtlasMCP;
Named export for the main server class.
ToolName type
import type { ToolName } from 'mcp-mongodb-atlas';
TypeScript users should use type import for enums/types to avoid runtime overhead.

Shows installation, environment variable setup, CLI invocation, and integration with MCP inspector or Claude Desktop.

// 1. Install npm install mcp-mongodb-atlas // 2. Set environment variables export ATLAS_PUBLIC_KEY='your-public-key' export ATLAS_PRIVATE_KEY='your-private-key' // 3. Run the MCP server npx mcp-mongodb-atlas // 4. In another terminal, test with MCP inspector npx @modelcontextprotocol/inspector npx mcp-mongodb-atlas // 5. Or use with Claude Desktop config: // ~/Library/Application Support/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" // } // } // } // }
Debug
Known issues
breakingPackage requires Node.js >=16.0.0. Older versions will fail to run.
fix
Upgrade Node.js to v16 or later.
affects: <16.0.0
gotchaAPI keys must have appropriate Atlas permissions (Project Owner or Org Owner) for cluster operations; insufficient permissions cause silent failures.
fix
Ensure API key has 'Project Owner' role at minimum for cluster creation.
affects: all
deprecatedPassing API keys as CLI arguments is supported but deprecated in favor of environment variables for security.
fix
Use ATLAS_PUBLIC_KEY and ATLAS_PRIVATE_KEY environment variables instead of command-line arguments.
affects: <=0.1.10
Errors
Common errors & fixes
Error: Cannot find module 'mcp-mongodb-atlas'
Package not installed globally or module path not resolved.
fix
Run 'npx mcp-mongodb-atlas' instead of bare command, or install with 'npm install -g mcp-mongodb-atlas'.
TypeError: Cannot read properties of undefined (reading 'MCP')
Wrong import path or CommonJS require() used instead of ESM import.
fix
Use 'import { AtlasMCP } from 'mcp-mongodb-atlas'' or run via CLI; avoid 'require'.
Error: ATLAS_PUBLIC_KEY and ATLAS_PRIVATE_KEY must be provided
Missing environment variables or CLI arguments.
fix
Set ATLAS_PUBLIC_KEY and ATLAS_PRIVATE_KEY environment variables, or pass them as CLI arguments.
Upgrade
Version history
0.1.10latest on npm
Audit
Dependencies
@modelcontextprotocol/sdkrequiredCore MCP server framework for tool registration and transport
mongodb-atlas-api-clientrequiredOfficial MongoDB Atlas API client for REST interactions
Agent activity
4 hits · last 30 days
node
4
Resources
mcp-mongodb-atlas — npm install mcp-mongodb-atlas · libregistry