Official server by MongoDB
MongoDB MCP server
Query and manage MongoDB databases and Atlas clusters.
Install
Pick your agent and copy one line. Remote servers ask you to sign in on first use.
claude mcp add mongodb -- npx -y mongodb-mcp-server
# ~/.codex/config.toml [mcp_servers.mongodb] command = "npx" args = ["-y", "mongodb-mcp-server"]
gemini mcp add mongodb npx -y mongodb-mcp-server
{
"mcpServers": {
"mongodb": {
"command": "npx",
"args": [
"-y",
"mongodb-mcp-server"
]
}
}
}code --add-mcp '{"name":"mongodb","command":"npx","args":["-y","mongodb-mcp-server"]}'Comparing options? Database MCP servers compared →
What it can do
From MongoDB's own MCP documentation.
Sign in
Connection string in MDB_MCP_CONNECTION_STRING, or Atlas API service account in MDB_MCP_API_CLIENT_ID and MDB_MCP_API_CLIENT_SECRET.
Tools
connectfindaggregatecountinsert-manyupdate-manydelete-manycreate-collectioncreate-indexdrop-collectiondrop-databaselist-databaseslist-collectionscollection-schemacollection-indexesexplainexportdb-statsatlas-list-orgsatlas-list-projectsatlas-list-clustersatlas-create-free-clusteratlas-connect-clusteratlas-create-db-useratlas-get-performance-advisor
Options
- --readOnly (MDB_MCP_READ_ONLY) turns off create, update and delete tools.
- --disabledTools (MDB_MCP_DISABLED_TOOLS) hides tools by name, operation type or category.
- --indexCheck (MDB_MCP_INDEX_CHECK) rejects queries that do a collection scan.
- --transport (MDB_MCP_TRANSPORT): stdio or http.
- --confirmationRequiredTools sets which tools ask before running.
Good to know
- Needs Node.js 22.13.0 or later.
- Atlas tools only appear when Atlas credentials are set.
- Drop and delete tools ask for confirmation by default, but only if the client supports elicitation.
- maxDocumentsPerQuery defaults to 100 and maxBytesPerQuery to 16777216.
- Server-side JavaScript is off by default.
- The docs recommend env vars over CLI args for secrets.
Details
- Registry name
- io.github.mongodb-js/mongodb-mcp-server
- Latest version
- 3.3.0 (updated 2026-11-09)
- Packages
mongodb-mcp-server (npm)
docker.io/mongodb/mongodb-mcp-server:3.3.0 (oci)
- Links
- MongoDB docsSource
More in Databases
Reviewed Oct 21, 2026. Official means published under MongoDB's namespace in the MCP registry. It is not a security audit.
Built an MCP server? Get it listed everywhere →
Shipping an Android app? Google Play needs 12 testers for 14 days first. Get them with Tester Exchange →