MongoDB MCP Server
Official MongoDB MCP server for MongoDB databases and Atlas clusters. Version 3.4.0 (Nov 24, 2026) can infer a collection's schema from its validator, detects paused Atlas clusters in atlas-connect-cluster, rejects $out and $merge in explain, applies the MQL allow-list guard to update-many update documents, and makes Atlas Local default to the latest image instead of preview. Version 3.3.0 (Nov 9, 2026) can connect to a preconfigured connection at startup, supports named connections via connectionStrings, and fixes the setup command leaving --readOnly out of the MCP configs it generates for clients.
Install
npx -y mongodb-mcp-server@latest --readOnlyExample config (Cursor / Claude Desktop)
{
"mcpServers": {
"mongodb": {
"command": "npx",
"args": [
"-y",
"mongodb-mcp-server@latest",
"--readOnly"
],
"env": {
"MDB_MCP_API_CLIENT_SECRET": "<your-value>",
"MDB_MCP_VOYAGE_API_KEY": "<your-value>"
}
}
}
}The same mcpServers block works in Cursor, Claude Desktop and Devin Desktop. VS Code (Copilot) uses a "type" field, Claude Code is easiest with claude mcp add, and Codex uses TOML: see the setup guide for your app. On Windows, wrap npx with cmd /c (fix).
At a glance
| Repository | mongodb-js/mongodb-mcp-server |
| GitHub stars | 1,167 |
| Last commit | 2026-11-26 (4 days ago) |
| Status | maintained |
| Security advisories | No published advisories found as of 2026-11-30. Details |
| Clients mentioned in README | Claude Desktop, Cursor, VS Code, Codex |
| Auth | OAuth or API key/token · MDB_MCP_API_CLIENT_SECRET MDB_MCP_VOYAGE_API_KEY |
| Language / License | TypeScript / Apache-2.0 |
| Official MCP registry | Listed ✓ |
Security advisories
No published advisories found as of 2026-11-30.
Checked 2026-11-30 in the repo's GitHub security advisories and OSV.dev for mongodb-mcp-server (npm). No advisory doesn't prove a server is safe. How to stay updated.