Best for
- Developers and data analysts who want to interact with MongoDB via natural language
- Scenarios needing MongoDB integration into LLM workflows
- Teams using MongoDB Atlas looking to automate cluster management
Officially maintained by MongoDB, this MCP server is feature-rich, covering database and Atlas management, with read-only mode and security configs. Overall reliable, but security best practices should be followed.
The MongoDB MCP server is an official Model Context Protocol server maintained by MongoDB, enabling AI assistants to interact with MongoDB databases and MongoDB Atlas clusters through standard tools. It provides a comprehensive set of database operations (query, aggregation, index management) and Atlas management tools (cluster creation, performance advisor, stream processing), with features like read-only mode, index checking, and logging. Supports stdio and HTTP transports, configurable via environment variables or command-line arguments.
node -v).{
"mcpServers": {
"MongoDB": {
"command": "npx",
"args": ["-y", "mongodb-mcp-server@latest", "--readOnly"],
"env": {
"MDB_MCP_CONNECTION_STRING": "mongodb://localhost:27017/myDatabase"
}
}
}
}docker run --rm -i mongodb/mongodb-mcp-server:latest.--transport http.{
"mcpServers": {
"MongoDB": {
"command": "npx",
"args": [
"-y",
"mongodb-mcp-server@latest",
"--readOnly"
],
"env": {
"MDB_MCP_CONNECTION_STRING": "mongodb://localhost:27017/myDatabase"
}
}
}
}