MongoDB MCP Server
@yairsabag
About MongoDB MCP Server
No overview available yet
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"yairsabag-mongodb-mcp-server-new": {
"command": "npx",
"args": [
"-y",
"mongodb-mcp-server",
"--apiClientId=your-atlas-service-accounts-client-id",
"--apiClientSecret=your-atlas-service-accounts-client-secret"
]
}
}
}Tools
No tools detected
Fetch the live tool list by running this server in a temporary sandbox using the button above.
Overview
What is MongoDB MCP Server?
A Model Context Protocol (MCP) server that enables AI assistants to interact directly with MongoDB databases and MongoDB Atlas. It provides a set of tools for querying and managing MongoDB data and Atlas infrastructure, requiring either a MongoDB connection string or Atlas API credentials.
How to use MongoDB MCP Server?
The server can be run via npx or Docker, configured through command-line arguments, environment variables, or an MCP client configuration file. For example, add a mcpServers entry to your client’s config file with the command and arguments for your chosen connection method (connection string or Atlas API credentials) and the server will start automatically.
Key features of MongoDB MCP Server
- Interact with MongoDB databases using CRUD, aggregation, and indexing tools
- Manage MongoDB Atlas organizations, projects, clusters, and access lists
- Read-only mode to restrict tools to read and metadata operations only
- Disable specific tools, operation types, or entire categories (atlas, mongodb)
- Configurable telemetry collection with opt-out support
- Docker support for isolated execution without local Node.js
Use cases of MongoDB MCP Server
- Let an AI assistant run ad‑hoc MongoDB queries and aggregations in a natural language interface
- Automate common Atlas administration tasks like creating free clusters or managing access lists
- Enable read‑only analysis of MongoDB data for reporting or auditing without risk of modifications
- Integrate database schema exploration and index inspection into AI‑powered development workflows
FAQ from MongoDB MCP Server
What are the prerequisites for using MongoDB MCP Server?
Node.js v20.10.0 or later is required, plus either a MongoDB connection string or Atlas API credentials (service account credentials for Atlas tools). The server will not start unless at least one of these is configured.
How do I connect MongoDB MCP Server to my database?
You can provide a MongoDB connection string via the --connectionString argument, the MDB_MCP_CONNECTION_STRING environment variable, or specify it directly in the MCP client configuration file. The connection string can point to any MongoDB cluster—local or Atlas.
Can I restrict MongoDB MCP Server to read‑only operations?
Yes. Set readOnly to true via the --readOnly command-line argument or the MDB_MCP_READ_ONLY environment variable. This prevents any tool with create, update, or delete operation types from being registered.
What Atlas API tools are available?
Atlas tools include listing organizations, projects, and clusters; creating projects and free clusters; inspecting and modifying access lists; managing database users; and listing alerts. These tools require Atlas service account credentials.
Can I disable specific tools or categories?
Yes. Use the disabledTools configuration option with a list of tool names, operation types (create, update, delete, read, metadata), or categories (atlas, mongodb). Supply it as a comma‑separated string via environment variable or a space‑separated string via command line.
Frequently asked questions
What are the prerequisites for using MongoDB MCP Server?
Node.js v20.10.0 or later is required, plus either a MongoDB connection string or Atlas API credentials (service account credentials for Atlas tools). The server will not start unless at least one of these is configured.
How do I connect MongoDB MCP Server to my database?
You can provide a MongoDB connection string via the `--connectionString` argument, the `MDB_MCP_CONNECTION_STRING` environment variable, or specify it directly in the MCP client configuration file. The connection string can point to any MongoDB cluster—local or Atlas.
Can I restrict MongoDB MCP Server to read‑only operations?
Yes. Set `readOnly` to `true` via the `--readOnly` command-line argument or the `MDB_MCP_READ_ONLY` environment variable. This prevents any tool with create, update, or delete operation types from being registered.
What Atlas API tools are available?
Atlas tools include listing organizations, projects, and clusters; creating projects and free clusters; inspecting and modifying access lists; managing database users; and listing alerts. These tools require Atlas service account credentials.
Can I disable specific tools or categories?
Yes. Use the `disabledTools` configuration option with a list of tool names, operation types (create, update, delete, read, metadata), or categories (`atlas`, `mongodb`). Supply it as a comma‑separated string via environment variable or a space‑separated string via command line.
Basic information
More Databases MCP servers
Neon MCP Server
neondatabaseMCP server for interacting with Neon Management API and databases
Postgres Mcp
crystaldbaPostgres MCP Pro provides configurable read/write access and performance analysis for you and your AI agents.
Multi Database MCP Server
FreePeakA powerful multi-database server implementing the Model Context Protocol (MCP) to provide AI assistants with structured access to databases.
MongoDB MCP Server
mongodb-jsA Model Context Protocol server to connect to MongoDB databases and MongoDB Atlas Clusters.
MCP Server for Milvus
zilliztechModel Context Protocol Servers for Milvus
Comments