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.
Strongest · Documentation 16/20 Weakest · Reliability 10/20
Static review · not runListed 2026-08-07
Read the FMRS scoring method →Runtime:Node.js 22.13+ · Docker
MDB_MCP_CONNECTION_STRING
MongoDB connection string, e.g. mongodb://localhost:27017/myDatabase, pointing to a local or Atlas instance.
MDB_MCP_API_CLIENT_ID
Atlas Service Account API client ID, created in the MongoDB Atlas console; needed for Atlas tools.
MDB_MCP_API_CLIENT_SECRET
Atlas Service Account API secret paired with the client ID; only needed for Atlas tools.
MDB_MCP_VOYAGE_API_KEY
Voyage AI embeddings API key, only required for Atlas Local deployments with auto-embed vector search.
MDB_MCP_READ_ONLY
Set to true to allow only read, connect, and metadata operations, disabling writes and deletes.
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"
}
}
}
}
Shown for Claude Desktop. Other clients may use a different file or key (VS Code uses "servers") — the configurator below converts it.
{
"servers": {
"MongoDB": {
"command": "npx",
"args": [
"-y",
"mongodb-mcp-server@latest",
"--readOnly"
],
"env": {
"MDB_MCP_CONNECTION_STRING": "mongodb://localhost:27017/myDatabase"
}
}
}
}
Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).
claude mcp add MongoDB -e MDB_MCP_CONNECTION_STRING=mongodb://localhost:27017/myDatabase -- npx -y mongodb-mcp-server@latest --readOnly
Run it in a terminal; replace any <…> placeholders with your own values first.
After adding the server config, check that tools like find and list-databases appear in your MCP client's tool list; ask the AI to run list-databases — a returned database list confirms the connection works.
Once connected, you can ask your AI assistant things like:
No matching tools
Listed from the project's documentation, not tested by this site.
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.
Connect ClickHouse to your AI assistants
Unofficial MCP server providing advanced access to the ChEMBL chemical database
Google's official database MCP toolbox — define AI-accessible database tools via config
Bytebase's official, minimalist two-tool database MCP server
Source revision c0f436fd5dc5 Data synced 2026-10-11 Read the FMRS scoring method