MongoDB MCP Server
OFFICIAL SERVERQuery and manage MongoDB databases and MongoDB Atlas clusters, projects and users from an assistant
MongoDB's hosted MCP endpoint for querying Atlas clusters and administering Atlas projects
Official · MongoDB TypeScript Remote (hosted) · Streamable HTTPLocal · stdio DatabasesCloud platforms
44 popularity score ★ 1.2k repo ↓ 177/wk
Opens the app, which asks before it adds the server.
claude mcp add --transport http mongodb-atlas-managed https://mcp.mongodb.com/https://mcp.mongodb.com/https://mcp.mongodb.com/{
"mcpServers": {
"mongodb-atlas-managed": {
"url": "https://mcp.mongodb.com/"
}
}
}{
"servers": {
"mongodb-atlas-managed": {
"type": "http",
"url": "https://mcp.mongodb.com/"
}
}
}[mcp_servers.mongodb-atlas-managed]
url = "https://mcp.mongodb.com/"gemini mcp add --scope user --transport http mongodb-atlas-managed https://mcp.mongodb.com/Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.
It needs MDB_MCP_API_CLIENT_ID, MDB_MCP_API_CLIENT_SECRET. Replace each <NAME> with your value.
claude mcp add mongodb-atlas-managed -e MDB_MCP_API_CLIENT_ID=<MDB_MCP_API_CLIENT_ID> -e MDB_MCP_API_CLIENT_SECRET=<MDB_MCP_API_CLIENT_SECRET> -- npx -y mongodb-atlas-mcp-remote@latest{
"mcpServers": {
"mongodb-atlas-managed": {
"command": "npx",
"args": [
"-y",
"mongodb-atlas-mcp-remote@latest"
],
"env": {
"MDB_MCP_API_CLIENT_ID": "<MDB_MCP_API_CLIENT_ID>",
"MDB_MCP_API_CLIENT_SECRET": "<MDB_MCP_API_CLIENT_SECRET>"
}
}
}
}{
"mcpServers": {
"mongodb-atlas-managed": {
"command": "npx",
"args": [
"-y",
"mongodb-atlas-mcp-remote@latest"
],
"env": {
"MDB_MCP_API_CLIENT_ID": "<MDB_MCP_API_CLIENT_ID>",
"MDB_MCP_API_CLIENT_SECRET": "<MDB_MCP_API_CLIENT_SECRET>"
}
}
}
}{
"servers": {
"mongodb-atlas-managed": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mongodb-atlas-mcp-remote@latest"
],
"env": {
"MDB_MCP_API_CLIENT_ID": "<MDB_MCP_API_CLIENT_ID>",
"MDB_MCP_API_CLIENT_SECRET": "<MDB_MCP_API_CLIENT_SECRET>"
}
}
}
}[mcp_servers.mongodb-atlas-managed]
command = "npx"
args = ["-y", "mongodb-atlas-mcp-remote@latest"]
[mcp_servers.mongodb-atlas-managed.env]
MDB_MCP_API_CLIENT_ID = "<MDB_MCP_API_CLIENT_ID>"
MDB_MCP_API_CLIENT_SECRET = "<MDB_MCP_API_CLIENT_SECRET>"gemini mcp add --scope user -e MDB_MCP_API_CLIENT_ID=<MDB_MCP_API_CLIENT_ID> -e MDB_MCP_API_CLIENT_SECRET=<MDB_MCP_API_CLIENT_SECRET> mongodb-atlas-managed npx -- -y mongodb-atlas-mcp-remote@latestMDB_MCP_API_CLIENT_ID |
Required: Client ID of the service account Atlas creates for an MCP configuration (npm bridge only). |
|---|---|
MDB_MCP_API_CLIENT_SECRET |
Required: Secret for that client ID, created with the MCP Configuration API (npm bridge only). |
MDB_MCP_API_BASE_URL |
Optional: Endpoint the bridge forwards to; https://mcp.mongodb.com by default. |
MDB_MCP_TOKEN_TIMEOUT_MS |
Optional: Timeout for the token request in milliseconds; 10000 by default. |
The Atlas Managed MCP Server is the version of the MongoDB MCP Server that MongoDB runs for you at https://mcp.mongodb.com. Nothing runs on your machine: an AI client connects to the endpoint and works against clusters hosted in MongoDB Atlas, both their data (queries, aggregations, inserts, updates, indexes, collections) and the Atlas account around them (organizations, projects, clusters, database users, alerts, Performance Advisor, Stream Processing).
There are two ways in. With user-delegated access, a person signs in with OAuth from a client MongoDB has registered (Claude Code, Claude Desktop and web, ChatGPT, Codex, Cursor, Devin and a few others) and the client acts with that person's own Atlas roles. With programmatic access, an administrator creates an MCP configuration through the Atlas Admin API; Atlas issues a service account for it, and an agent connects through the small npm bridge `mongodb-atlas-mcp-remote`, which reads `MDB_MCP_API_CLIENT_ID` and `MDB_MCP_API_CLIENT_SECRET`, exchanges them for a token at cloud.mongodb.com and forwards stdio traffic to the hosted endpoint.
The tool set is not the same as the self-run mongodb-mcp-server. MongoDB's tools table marks 41 tools as available on the managed server: it adds `remote-atlas-connect`, `aggregate-db` and `atlas-load-sample-dataset`, and leaves out `connect`, `atlas-connect-cluster`, `atlas-create-access-list`, `update-one`, `export`, `mongodb-logs`, `switch-connection` and the `atlas-local-*` tools. In read mode, write tools are not registered at all, so the client does not see them.
| To run it yourself | Node.js |
|---|
A MongoDB Atlas account with clusters hosted in Atlas. For OAuth sign-in: a client from MongoDB's supported list, an Organization Owner who has turned on AI client access under App Connections (off by default except for organizations created at sign-up), and one of the Atlas roles allowed to authorize clients. For the npm bridge: Node.js with npx, plus a client ID and secret from an MCP configuration created through the Atlas Admin API (the docs use Atlas CLI 1.58.0 or later).
Works only with Atlas-hosted clusters; Community or Enterprise deployments need the self-run server. Rate limits are 2,000 requests per minute per IP and 500 per user; MongoDB says they may change without notice and cannot be raised on request. OAuth access lapses after 7 days idle or 30 days from grant, then the user signs in again. AI client access is set per organization: no per-user, per-cluster or per-client controls, and owners cannot revoke one user's connection. Tools that write files or need a Voyage AI key locally (`export`, embedding generation) are not offered.
Suits Atlas users who want an assistant to explore and change their cluster data and Atlas resources without running anything locally, and teams that want actions tied to an Atlas user or a dedicated service account in the audit log. Pick the self-run mongodb-mcp-server (which we also list) for MongoDB outside Atlas, for local Atlas deployments, for tools such as `export` or `mongodb-logs`, for a client MongoDB has not registered without setting up an MCP configuration, or when traffic would exceed the hosted rate limits.
atlas-list-orgsatlas-list-projectsatlas-create-projectatlas-list-clustersatlas-inspect-clusteratlas-create-free-clusteratlas-get-regionsatlas-upgrade-clusteratlas-create-clusteratlas-pause-resume-clusteratlas-inspect-access-listatlas-list-db-usersatlas-create-db-useratlas-list-alertsatlas-get-performance-advisoratlas-load-sample-datasetremote-atlas-connectatlas-streams-discoveratlas-streams-buildatlas-streams-manageatlas-streams-teardownfindaggregateaggregate-dbcountexplaininsert-manycreate-indexdrop-indexupdate-manyrename-collectioncreate-collectiondelete-manydrop-collectiondrop-databaselist-databaseslist-collectionscollection-indexescollection-schemacollection-storage-sizedb-stats