mongodb-atlas-mcp-remote

Local stdio bridge to MongoDB's hosted Atlas MCP server, signed in with Atlas service credentials

Official · MongoDB TypeScript Remote (hosted) · Streamable HTTPLocal · stdio DatabasesCloud platforms

44 popularity score ★ 1.2k repo ↓ 172/wk

Connect your client

Remote (hosted)

Add in one click

Opens the app, which asks before it adds the server.

Or add it by command or config

Claude CodeTerminal
claude mcp add --transport http mongodb-atlas-remote https://mcp.mongodb.com
Claude (desktop and web)Settings → Connectors → Add custom connector
https://mcp.mongodb.com
ChatGPTSettings → Apps → Advanced → Developer mode, then Create app
https://mcp.mongodb.com
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "mongodb-atlas-remote": {
      "url": "https://mcp.mongodb.com"
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "mongodb-atlas-remote": {
      "type": "http",
      "url": "https://mcp.mongodb.com"
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.mongodb-atlas-remote]
url = "https://mcp.mongodb.com"
Gemini CLITerminal
gemini mcp add --scope user --transport http mongodb-atlas-remote https://mcp.mongodb.com
Local (npm)

Add in one click

Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.

Or add it by command or config

It needs MDB_MCP_API_CLIENT_ID, MDB_MCP_API_CLIENT_SECRET. Replace each <NAME> with your value.

Claude CodeTerminal
claude mcp add mongodb-atlas-remote -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
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "mongodb-atlas-remote": {
      "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>"
      }
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "mongodb-atlas-remote": {
      "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>"
      }
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "mongodb-atlas-remote": {
      "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>"
      }
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.mongodb-atlas-remote]
command = "npx"
args = ["-y", "mongodb-atlas-mcp-remote@latest"]

[mcp_servers.mongodb-atlas-remote.env]
MDB_MCP_API_CLIENT_ID = "<MDB_MCP_API_CLIENT_ID>"
MDB_MCP_API_CLIENT_SECRET = "<MDB_MCP_API_CLIENT_SECRET>"
Gemini CLITerminal
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-remote npx -- -y mongodb-atlas-mcp-remote@latest

Settings 4

MDB_MCP_API_CLIENT_ID Required: Client ID of your Atlas MCP configuration.
MDB_MCP_API_CLIENT_SECRET Required: Client Secret of your Atlas MCP configuration.
MDB_MCP_API_BASE_URL Optional: Hosted MCP endpoint to forward to; defaults to https://mcp.mongodb.com.
MDB_MCP_TOKEN_TIMEOUT_MS Optional: Timeout for fetching an access token, in milliseconds (default 10000).

What it does

mongodb-atlas-mcp-remote is a small Node.js program from MongoDB that runs on your machine as a stdio MCP server and passes every request on to the MongoDB Atlas Managed MCP Server at https://mcp.mongodb.com over streamable HTTP. It exists for MCP clients that cannot sign in to that hosted server themselves: the hosted server does not accept a static key sent over HTTP, so the wrapper takes a Client ID and Client Secret, exchanges them for short-lived OAuth access tokens at Atlas (client-credentials flow) and attaches the token to each forwarded request.

The tools themselves live on MongoDB's side. Through them an assistant can browse Atlas organizations, projects and clusters, connect to a cluster, query and aggregate collections, inspect schemas and indexes, and, unless the configuration is read-only, insert, update and delete documents, create collections and indexes, add database users and IP access entries, and build or run Atlas Stream Processing pipelines. Which tools appear depends on the roles and read-only setting of the Atlas MCP configuration the credentials belong to; tools outside that mode are not registered.

The package lives in the same repository as MongoDB's local mongodb-mcp-server but is a separate program: it carries no database driver and no tools of its own, and it only reaches Atlas-hosted clusters.

What it needs

To run it yourselfNode.js 20+

Node.js 20.19+, 22.13+ or 24+. A MongoDB Atlas account with an MCP configuration, whose Client ID and Client Secret go in MDB_MCP_API_CLIENT_ID and MDB_MCP_API_CLIENT_SECRET; creating one needs the Organization Owner or Project Owner role. These are not the ordinary Atlas API service-account credentials used by the local mongodb-mcp-server. Clusters must be hosted on Atlas.

Limits

Works only with Atlas-hosted clusters; Community and Enterprise Advanced deployments need the self-run server instead. Rate limits are 2,000 requests a minute per IP address and 500 per user, answered with HTTP 429 beyond that, and MongoDB says they may change without notice. Local-deployment tools (atlas-local-*) are not offered remotely. Some tools need an M10 or larger cluster (atlas-get-performance-advisor, atlas-pause-resume-cluster), and running stream processors are billed. The wrapper follows only same-origin 307/308 redirects, so the final endpoint URL must be used.

Who it suits

Suits teams already on MongoDB Atlas who want an assistant or unattended agent to work against their clusters with credentials scoped by an Atlas MCP configuration, from a client that cannot do the OAuth sign-in the hosted server expects. If your client is one MongoDB has pre-registered for browser sign-in (Claude Code, Cursor, Codex and others named in its docs), connecting it to the hosted server directly is simpler. For self-hosted MongoDB, a local connection string, or tools that run entirely on your own machine, pick MongoDB's local mongodb-mcp-server instead.

Tools 22

remote-atlas-connect
Connect the session to one Atlas cluster on the hosted server
atlas-list-orgs
List the Atlas organizations the credentials can see
atlas-list-projects
List Atlas projects
atlas-list-clusters
List clusters in a project
atlas-create-access-list
Add IP addresses or ranges to a project's access list
atlas-create-db-user
Create a database user in a project
list-databases
List databases on the connected cluster
list-collections
List collections in a database
collection-indexes
Show the indexes of a collection
find
Query documents in a collection
aggregate
Run an aggregation pipeline on a collection
count
Count documents matching a filter
insert-many
Insert documents into a collection
update-many
Update all documents matching a filter
delete-many
Delete documents matching a filter
create-collection
Create a new collection
create-index
Add an index to a collection
drop-database
Remove a whole database
atlas-streams-discover
Look up Atlas Stream Processing workspaces and processors
atlas-streams-build
Create stream processing workspaces, connections or processors
atlas-streams-manage
Start, stop or change stream processors
atlas-streams-teardown
Delete stream processing resources

Similar servers