mongodb-mcp-server
by mongodb-js·★ 1,023·Score 55
MongoDB MCP Server connects to MongoDB databases and Atlas clusters, offering tools for database operations and Atlas management.
Overview
The MongoDB MCP Server is a comprehensive implementation for interacting with MongoDB databases through the Model Context Protocol. It provides three categories of tools: MongoDB Atlas tools for cluster management, MongoDB database tools for CRUD operations, and MongoDB Assistant tools for advanced functionalities. The server supports multiple authentication methods including direct connection strings and Atlas API credentials, with built-in security features like read-only mode.
Try asking AI
After installing, here are 5 things you can ask your AI assistant:
When to choose this
Choose this when working with MongoDB databases or Atlas clusters and need secure AI access to your data without building custom integrations.
When NOT to choose this
Avoid if you need write access by default (must explicitly remove readOnly flag) or if you require support for non-MongoDB databases.
Tools this server exposes
12 tools extracted from the READMEquery_databaseExecute queries against MongoDB databases
create_documentCreate a new document in a MongoDB collection
update_documentUpdate an existing document in a MongoDB collection
delete_documentDelete documents from a MongoDB collection
list_databasesList available MongoDB databases
list_collectionsList collections in a MongoDB database
create_indexCreate an index in a MongoDB collection
get_atlas_clustersRetrieve MongoDB Atlas clusters
create_atlas_clusterCreate a new MongoDB Atlas cluster
get_atlas_performanceGet performance metrics for Atlas clusters
get_atlas_alertsRetrieve Atlas alerts
get_database_statsGet statistics for a MongoDB database
Note: Tool names and descriptions were inferred from the README's structure and categories (MongoDB Atlas Tools, MongoDB Database Tools, MongoDB Assistant Tools) but exact function signatures weren't provided in the documentation. The README ment
Comparable tools
Installation
Installation
Via NPM (for Claude Desktop)
{
"mcpServers": {
"MongoDB": {
"command": "npx",
"args": ["-y", "mongodb-mcp-server@latest", "--readOnly"],
"env": {
"MDB_MCP_CONNECTION_STRING": "mongodb://localhost:27017/myDatabase"
}
}
}
}Via Docker
{
"mcpServers": {
"MongoDB": {
"command": "docker",
"args": [
"run",
"--rm",
"-e",
"MDB_MCP_READ_ONLY=true",
"-i",
"mongodb/mongodb-mcp-server:latest"
]
}
}
}FAQ
- Can this MCP server connect to both local MongoDB instances and Atlas clusters?
- Yes, it supports connecting to both local MongoDB instances using connection strings and MongoDB Atlas clusters using either connection strings or Atlas API credentials.
- Is there a read-only mode available?
- Yes, the server includes a --readOnly flag that can be added to command arguments to ensure safe, read-only access to your data.
Compare mongodb-mcp-server with
Last updated · Auto-generated from public README + GitHub signals.