Servers › Databases › MongoDB

● MaintainedDatabases

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 --readOnly

Example 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

Repositorymongodb-js/mongodb-mcp-server
GitHub stars1,167
Last commit2026-11-26 (4 days ago)
Statusmaintained
Security advisoriesNo published advisories found as of 2026-11-30. Details
Clients mentioned in READMEClaude Desktop, Cursor, VS Code, Codex
AuthOAuth or API key/token · MDB_MCP_API_CLIENT_SECRET MDB_MCP_VOYAGE_API_KEY
Language / LicenseTypeScript / Apache-2.0
Official MCP registryListed ✓

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.

Common problems

Weekly MCP digest
New servers, breaking changes, and fresh fixes. One email a week.